HELP - exampleCmd
HelpCommand ReferenceexampleCmd
Description  
Adding an example ( example )
Indicates that the following text is an example, and causes the text to be formatted as such. It's possible to have as many examples as one desires per entity/page.
Syntax
\example <filename>


The filename should be relative either to the current directory or relative to the root of the EXAMPLE_PATH (see InputOptions), or it can be an absolute path. Note that this is different from the original Doxygen behaviour

Alternatively:
\example
int MyFunction(const int iParam1, const float fParam2)
{
  int iRes = iParam1 * static_cast<int>(fParam2);
  return iRes;
}
\endexample


Output
The example tag will include and format the <filename> file in the examples section of the documented entity. See at the bottom of this page.

Layout
For the standard examples both in example groups and all other entities we also have two options for showing the examples using EXAMPLES_USE_TABS. If set to YES (default), DoxyS will display examples on all pages as tabs. If set to NO examples will be shown (classical) using expand/collapse icons.
See also
  • codeCmd for inlining formatted code in place (ie. where it's written)
  • HowToDocument::ExampleInclude, HowToDocument::ExampleInline
  • Examples
    int MyFunction(const int iParam1, const float fParam2)
    {
      int iRes = iParam1 * static_cast<int>(fParam2);
      return iRes;
    }