Dan
Dan

Reputation: 1942

Doxygen detailed description bleeds into the brief description

My doxygen for the following code shows up like this:

Spawns two mettaurs on the fieldMay optionally spawn an empty tile for challenge

Where the brief description should be. Notice it's merging the brief and the detailed description.

/*! \brief Spawns two mettaurs on the field
 *  \class TwoMettaurMob
 * 
 * May optionally spawn an empty tile for challenge
 */

#pragma once
#include "bnMobFactory.h"
#include "bnMettaur.h"
#include "bnMettaurIdleState.h"

class TwoMettaurMob :
  public MobFactory
{
public:
  TwoMettaurMob(Field* field);
  ~TwoMettaurMob();

  /**
   * @brief Builds and returns the mob
   * @return Mob pointer. must be deleted manually.
   */
  Mob* Build();
};

I'm following doxygen's example for doc blocks:

/*! \brief Brief description.
 *         Brief description continued.
 *
 *  Detailed description starts here.
 */

Anyone know a solution?

Upvotes: 0

Views: 1464

Answers (1)

albert
albert

Reputation: 9037

I could reproduce the problem with the current (1.8.15) version of doxygen.

The solution of @Someprogrammerdude does work

The order of commands is a bit strange I would have expected first the \class followed by the \brief description, also the \class is not necessary as the documentation is (in this case) directly in front of the class.

Another solution is to place a . at the end of the sentence and have JAVADOC_AUTOBRIEF or QT_AUTOBRIEF set to YES.

The background of the problem is that \class is not seen as a ending the \brief documentation. It might be worthwhile to submit an issue report at https://github.com/doxygen/doxygen/issues/new (so either it can be fixed or some extra objections can be given against using \class, and others with similar meaning, for terminating a brief description.

Upvotes: 1

Related Questions