classdef ReferenceItem < handle & matlab.mixin.Heterogeneous
    properties
        filename
    end
    
    methods (Abstract)
        show(obj)
    end
    
    
    methods
        % public
        function obj=ReferenceItem(fname)
            if exist(fname,'file')
                obj.filename=fname;
            else
                error('File %s does not exist',fname);
            end
        end
        
        function fn=getfilename(obj)
        fn=obj.filename;
        end
       
        %private
        function b=eq(obj1,obj2)
            b=eq(obj1.getfilename,obj2.getfilename);
        end
        
        
    end
end