Documentation for protected/private methods
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Software Development Tools についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!