classdef (Hidden = true) MiscellaneousTarget < handle

    % Copyright 2012-2013 The MathWorks, Inc.

    properties
        
        Description
        
        % <NAME> : <DEPENDENCIES>
        %   <COMMANDS>
        
        Target
        Dependencies
        Rules
    end
    
    properties(Hidden)
        SpecialTarget = true;
    end

    methods
        % -----------------------------------------------------------------
        % Constructor
        % -----------------------------------------------------------------
        function h = MiscellaneousTarget(aDesc)
            if nargin==1
                h.Description = aDesc;
            end
            h.Rules = coder.make.util.OrderedList('coder.make.Rule');
        end
        
        % -----------------------------------------------------------------
        % GET/SET METHODS
        % -----------------------------------------------------------------
        function set.Description(h, value)
            if ~ischar(value)
                error(message('CoderFoundation:utility:InvalidProperty', ...
                    'Description', class(h), 'string'))
            end
            h.Description = value;
        end
        
        function set.Target(h, value)
            if ~ischar(value)
                error(message('CoderFoundation:utility:InvalidProperty', ...
                    'Target', class(h), 'string'))
            end
            h.Target = value;
        end
        
        function set.Dependencies(h, value)
            if ~isempty(value) && ~ischar(value) && ~iscell(value) %% ~iscellstr(value)
                error(message('CoderFoundation:utility:InvalidProperty', ...
                    'Dependencies', class(h), 'string'))
            end
            h.Dependencies = value;
        end
        
        function set.Rules(h, value)
            validType = 'coder.make.util.OrderedList';
            if ~isempty(value) && ~isa(value, validType)
                error(message('CoderFoundation:utility:InvalidProperty', ...
                    'Rules', class(h), validType))
            end
            h.Rules = value;
        end
                
    end
end

