classdef EconAppReport < mlreportgen.report.Report
    %ECONAPPREPORT Report class for EconModeler
    
    %Copyright 2017 The MathWorks, Inc.

    methods 
        function rpt = EconAppReport(varargin) 
            rpt = rpt@mlreportgen.report.Report(varargin{:});
        end        
    end 
    
    methods (Static, Hidden)
        k = key()
    end
    
    methods (Access=protected, Hidden)
        function result = openImpl(report, impl)
            %openImpl Opens report generator object implementation.
            %   This method opens the DOM document that implements this
            %   report generator object. The DOM document is of a type
            %   that can run without a Report Generator license if you
            %   pass a key to its open method. The value of the key is
            %   a function of the DOM document class name, the class name
            %   of this report generator (FreeReport in this case),and
            %   the contents of the report generator's templates. See
            %   the key method in this example for information on how to
            %   generate the key.           
            result = open(impl, internal.EconModeler.EconAppReport.key, report);
        end
    end
    

    methods (Hidden) 
        function templatePath = getDefaultTemplatePath(rpt) 
            path = internal.EconModeler.EconAppReport.getClassFolder(); 
            templatePath = ... 
                mlreportgen.report.ReportForm.getFormTemplatePath(... 
                path, rpt.Type); 
        end 

    end 

    methods (Static) 
        function path = getClassFolder() 
            [path] = fileparts(mfilename('fullpath')); 
        end 

        function createTemplate(templatePath, type) 
            path = internal.EconModeler.EconAppReport.getClassFolder(); 
            mlreportgen.report.ReportForm.createFormTemplate(... 
                templatePath, type, path); 
        end 

        function customizeReporter(toClasspath) 
            mlreportgen.report.ReportForm.customizeClass(... 
                toClasspath, "FreeReport"); 
        end 

    end  
end