MATLAB Answers

how to wrangle the "doc" system when writing a class?

1 view (last 30 days)
Ben Mitch
Ben Mitch on 13 Oct 2011
Hi
I have written a class which is quite complex (hundred or so methods). It exposes two public interfaces; one is to the framework within which it functions, the other is to the user. When I run "doc MyClass", the "Method Summary" provides an alphabetical list of all public methods.
Now, the ability to to "doc MyClass" and have HTML help automatically generated is fantastic, saves me a lot of double-documenting. But... my users are only supposed to see a handful of the methods.
i) Can I hide all the framework methods? They do not appear under Method Summary if I make them private, but that makes them inaccessible to the framework.
ii) Can I generally take more control of what appears on the front page of "doc MyClass"? If I could author all of that myself, the nice linked-to pages for each method would make for a natty set of documentation. At least, can I take control over what appears (and in what order) under Method Summary?
Thanks!

  1 Comment

Ben Mitch
Ben Mitch on 13 Oct 2011
ps. i realise that i can author the top section of the doc page by providing comments at the top of the file, but if i have to list all the methods manually there that kind of takes the automatisation out of the process. plus, i'll still be left with the "Method Summary" section underneath with all the spurious methods - what am I to do, tell the reader "do not read below this line!"? :)

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by