Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/languages/c/language_tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ keyword.operator.plus.exponent.decimal.c
keyword.operator.plus.exponent.hexadecimal.c
keyword.operator.sizeof.c
keyword.operator.ternary.c
keyword.other.parameter.direction.$0.c
keyword.other.static_assert.c
keyword.other.typedef.c
keyword.other.unit.binary.c
Expand Down
1 change: 1 addition & 0 deletions source/languages/cpp/cpp-scopes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ keyword.other.namespace.alias.cpp
keyword.other.namespace.definition.cpp
keyword.other.namespace.directive.cpp
keyword.other.operator.overload.cpp
keyword.other.parameter.direction.$0.cpp
keyword.other.static_assert.cpp
keyword.other.typedef.cpp
keyword.other.typename.cpp
Expand Down
215 changes: 132 additions & 83 deletions source/languages/cpp/examples/feature_doxygen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*!
* ... text ...
*/

/*!
... text ...
*/
Expand All @@ -19,17 +19,26 @@
/// ... text ...
/////////////////////////////////////////////////

/**
* @param p0 is the first p.
* @param[in] p0 is an input parameter
* @param[in,out] io is an in-out paramater
* @param [in] p1 is a param with a space
* @param[ out] dest
*/


//! Brief description, which is
//! really a detailed description since it spans multiple lines.
/*! Another detailed description!
*/

int var; /*!< Detailed description after the member */

/********************************************//**
* ... text
***********************************************/
/********************************************/ /**
* ... text
***********************************************/

/**
* A brief history of JavaDoc-style (C-style) comments.
*
Expand All @@ -39,8 +48,8 @@ int var; /*!< Detailed description after the member */
* @param theory Even if there is only one possible unified theory. it is just a
* set of rules and equations.
*/
void cstyle( int theory );
void cstyle(int theory);

/*******************************************************************************
* A brief history of JavaDoc-style (C-style) banner comments.
*
Expand All @@ -60,87 +69,127 @@ void cstyle( int theory );
* @param theory Even if there is only one possible unified theory. it is just a
* set of rules and equations.
******************************************************************************/
void javadocBanner( int theory );

/***************************************************************************//**
* A brief history of Doxygen-style banner comments.
*
* This is a Doxygen-style C-style "banner" comment. It starts with a "normal"
* comment and is then converted to a "special" comment block near the end of
* the first line. It is written this way to be more "visible" to developers
* who are reading the source code.
* This style of commenting behaves poorly with clang-format.
*
* @param theory Even if there is only one possible unified theory. it is just a
* set of rules and equations.
******************************************************************************/
void doxygenBanner( int theory );

void javadocBanner(int theory);

/***************************************************************************/ /**
* A brief
*history of
*Doxygen-style
*banner
*comments.
*
* This is a
*Doxygen-style
*C-style
*"banner"
*comment.
*It starts
*with a
*"normal"
* comment
*and is
*then
*converted
*to a
*"special"
*comment
*block near
*the end of
* the first
*line. It
*is written
*this way
*to be more
*"visible"
*to
*developers
* who are
*reading
*the source
*code. This
*style of
*commenting
*behaves
*poorly
*with
*clang-format.
*
* @param
*theory
*Even if
*there is
*only one
*possible
*unified
*theory. it
*is just a
* set
*of rules
*and
*equations.
******************************************************************************/
void doxygenBanner(int theory);


//! A test class.
//! A test class.
/*!
A more elaborate class description.
*/

class QTstyle_Test
{

class QTstyle_Test {
public:

//! An enum.
/*! More detailed enum description. */
enum TEnum {
TVal1, /*!< Enum value TVal1. */
TVal2, /*!< Enum value TVal2. */
TVal3 /*!< Enum value TVal3. */
}
//! Enum pointer.
/*! Details. */
*enumPtr,
//! Enum variable.
/*! Details. */
enumVar;

//! A constructor.
/*!
A more elaborate description of the constructor.
*/
QTstyle_Test();

//! A destructor.
/*!
A more elaborate description of the destructor.
*/
~QTstyle_Test();

//! A normal member taking two arguments and returning an integer value.
/*!
\param a an integer argument.
\param s a constant character pointer.
\return The test results
\sa QTstyle_Test(), ~QTstyle_Test(), testMeToo() and publicVar()
*/
int testMe(int a,const char *s);

//! A pure virtual member.
/*!
\sa testMe()
\param c1 the first argument.
\param c2 the second argument.
*/
virtual void testMeToo(char c1,char c2) = 0;

//! A public variable.
/*!
Details.
*/
int publicVar;

//! A function variable.
/*!
Details.
*/
int (*handler)(int a,int b);
//! An enum.
/*! More detailed enum description. */
enum TEnum {
TVal1, /*!< Enum value TVal1. */
TVal2, /*!< Enum value TVal2. */
TVal3 /*!< Enum value TVal3. */
}
//! Enum pointer.
/*! Details. */
* enumPtr,
//! Enum variable.
/*! Details. */
enumVar;

//! A constructor.
/*!
A more elaborate description of the constructor.
*/
QTstyle_Test();

//! A destructor.
/*!
A more elaborate description of the destructor.
*/
~QTstyle_Test();

//! A normal member taking two arguments and returning an integer value.
/*!
\param a an integer argument.
\param s a constant character pointer.
\return The test results
\sa QTstyle_Test(), ~QTstyle_Test(), testMeToo() and publicVar()
*/
int testMe(int a, const char *s);

//! A pure virtual member.
/*!
\sa testMe()
\param c1 the first argument.
\param c2 the second argument.
*/
virtual void testMeToo(char c1, char c2) = 0;

//! A public variable.
/*!
Details.
*/
int publicVar;

//! A function variable.
/*!
Details.
*/
int (*handler)(int a, int b);
};

Loading