classdef BuildInfo < hgsetget & matlab.mixin.Copyable
    
    properties (SetAccess=immutable)
        BuildInfoDMR = [];
        Repository = [];
        RepositoryHelper = [];
    end
    
    methods  % constructors
  
        function bi = BuildInfo(varargin)
            
            if (nargin == 0)
                return;
            else
                location = varargin{1};
            end
            if ~ischar(location)
                error('a:b:toDo','error, must be a char input');
            end
    
            bi.RepositoryHelper = coder.make.RepositoryHelper;
            if exist(location,'file')
                bi.Repository = coder.make.Repository(location);
                bi.BuildInfoDMR = bi.RepositoryHelper.getBuildInfo(bi.Repository);
            else
                bi.Repository = coder.make.Repository(location);
                bi.BuildInfoDMR = coder.make.BuildInfoDMR(bi.Repository);
            end
            
        end  % 

        
    end  % constructor block
    
    methods (Access = public)

    end
    
end % classdef