views:

412

answers:

2

Doxygen unable to document for functions in .cpp like Hello All, I have a .cpp file and found that doxygen is unable to document function which contains the following format:

//! //! \brief Test //! and perform operations on those points. //! void CTest::TestTri() EH_Start("CTest::TestTri") { } EH_Stop

The EH_Start and EH_Stop are exception handling mechanisem and causing issues. How can we exclude those? Awaiting for an early positive reply.

+3  A: 

Try using a more explicit doxygen format - the following tells doxygen exactly which function you wish to document, so it doesn't have to understand your code to work out what to attach the documentation to:

/// \fn void CTest::TestTri()
/// \brief Test and perform operations on those points
EH_STart("CTest::TestTri") {} EH_Stop
Jason Williams
+1  A: 

Assuming EH_Start and EH_Stop are defines, you can have doxgen expand those macros when it processes the code

EXPAND_AS_DEFINED = EH_Start EH_Stop

We have a number of macros for function and class declarations. Without EXPAND_AS_DEFINED, Doxygen will not generate the correct documentation

For example:

/* C++ Code */
#define STANDARD_CONSTRUCTORS_HEADER(iCLASS) \
  public:  iCLASS(); \
  public:  virtual ~iCLASS(); \
  private: iCLASS(const iCLASS & iCopy); \
  private: iCLASS& operator=(const iCLASS &);

class Foo {
  STANDARD_CONSTRUCTORS_HEADER(Foo)
}

/* Doxyfile */
EXPAND_AS_DEFINED = STANDARD_CONSTRUCTORS_HEADER

Without EXPAND_AS_DEFINED, you won't get the Foo constructors in the documentation.

John Naegle