synaptik
synaptik

Reputation: 9509

C++ Doxygen hide comments

I'm trying to figure out how to place comments in my source (or header) files such that they won't show up on my Doxygen docs. Currently, I don't have a good sense of which comments do and don't show up.

Often I have code such as this in one of my source files (.cpp):

///* OCBA P(CS) implementation for "max" problems */
//void OCBA_PCS() {
//    
// Code goes here...
//
//}     


/*! OCBA minimize simulation cost for "max" problems */
void OCBA_SC() {
// Code goes here...
}

Here, you can see that the function OCBA_PCS() is currently commented out, perhaps because it's not working and I wish to exclude it from build. However, when I run Doxygen, it puts

* OCBA P(CS) implementation for "max" problems */ 

into the detailed documentation section for OCBA_SC(). How can I prevent this from happening?

Below are the relevant Doxygen configuration settings that I'm using:

#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL            = YES
EXTRACT_PRIVATE        = YES
EXTRACT_STATIC         = YES
EXTRACT_LOCAL_CLASSES  = YES
EXTRACT_LOCAL_METHODS  = NO
EXTRACT_ANON_NSPACES   = YES
HIDE_UNDOC_MEMBERS     = YES
HIDE_UNDOC_CLASSES     = NO
HIDE_FRIEND_COMPOUNDS  = NO
HIDE_IN_BODY_DOCS      = YES
INTERNAL_DOCS          = NO
CASE_SENSE_NAMES       = NO
HIDE_SCOPE_NAMES       = NO
SHOW_INCLUDE_FILES     = YES
FORCE_LOCAL_INCLUDES   = YES
INLINE_INFO            = YES
SORT_MEMBER_DOCS       = YES
SORT_BRIEF_DOCS        = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES       = NO
SORT_BY_SCOPE_NAME     = NO
GENERATE_TODOLIST      = YES
GENERATE_TESTLIST      = YES
GENERATE_BUGLIST       = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS       = 
MAX_INITIALIZER_LINES  = 30
SHOW_USED_FILES        = YES
SHOW_DIRECTORIES       = NO
SHOW_FILES             = YES
SHOW_NAMESPACES        = YES
FILE_VERSION_FILTER    = 
LAYOUT_FILE            = 

Upvotes: 1

Views: 2428

Answers (1)

alestanis
alestanis

Reputation: 21863

If you just comment with // it won't appear on doxygen. Doxygen only parses comments starting with certain tokens, such as /** or /*!.

Parsed tokens are described in the doxygen documentation.

Upvotes: 4

Related Questions