Menu

Hiding private variables / functions

General
2010-08-18
2013-03-08
  • Alex Miller

    Alex Miller - 2010-08-18

    Is there anyway to make NaturalDocs ignore certain variables or functions
    (like private ones)? It bugs me that all of the private stuff in my classes is
    visibile in the documentation. I'd prefer to hide my private parts ;)

    Anyway to do this?

     
  • Ilya Shlyakhter

    Ilya Shlyakhter - 2010-08-18

    You can define separate topics, e.g. "Private var:" and "Public var:", and
    have different Topics.txt files -- one that includes the "Private var:" topic,
    and one that doesn't.

     
  • Ilya Shlyakhter

    Ilya Shlyakhter - 2010-08-18

    (Or, have one topic but in one case have both "Private var:" and "Public var:"
    as keywords in that topic, and in the other case have just "Public var").

     
  • Alex Miller

    Alex Miller - 2010-08-18

    Oh sweet! I had never really looked inside Topics.txt. Just what I needed,
    thanks!

     
  • Alex Miller

    Alex Miller - 2010-08-18

    Okay wait... Spoke too soon. I thought maybe I could use "ignore" to make
    NaturalDocs ignore certain topics... But it looks like you can only ignore
    keywords, not entire topics. Is there a way to make NaturalDocs not include
    elements from a certain topic in the documentation?

     
  • Ilya Shlyakhter

    Ilya Shlyakhter - 2010-08-18

    I think, you need to keep separate Topics.txt files for generating public or
    private documentation.

    You can just omit a topic from one of the versions of your Topics.txt files,
    and then it won't be recognized

    as documentation.

     
  • Michael Baker

    Michael Baker - 2013-03-08

    I was able to solve this problem for c# by removing 'private' from the modifier hashes in Modules/NaturalDocs/Languages/CSharp.pm in the NaturalDocs install dir. would be convenient to have a modifier category in the local Topics.txt config file...

     

Log in to post a comment.