Documentation for protected/private methods
2 views (last 30 days)
Show older comments
Hello!
I find the Matlab built-in solution for automatically generating classdef documentation page to be quite a handy solution:
doc MyClassdef
Following some basic commenting rules it makes rapid documentation lot easier.
However, I bumped into an issue, for which I couldn't find a work-around yet... I define some static methods using some external m-files. The external file contains all the explanations and help for the user, so that the main classdef can be kept relatively clean. These 'documentation-snippets' however cannot be accessed over the rapid Matlab documentation tool if they are set to private or protected, thus all the help is hidden...
classdef MyClassdef
methods
function SomeUserTriggeredFunction(varargin)
a = obj.ExternalStaticMethod(varargin);
end
end
methods (Static, Access = ?Protected)
a = ExternalStaticMethod(varargin)
end
end
A fast-foreward solution would be to get rid of the external m-file and copy every single comment line directly in the 'SomeUserTriggeredFunction' methodm, but I would end up with a classdef containing tons of comments.
What would be your proposed solution for the situation? Do you have any idea for keeping the main classdef clean, but also giving the user the possibility to access the helps?
Many thanks in advance! BOPe
0 Comments
Answers (0)
See Also
Categories
Find more on Software Development Tools in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!