FairRoot/PandaRoot
|
Documentation Sample Class. More...
#include <PndDocuSample.h>
Public Member Functions | |
PndDocuSample () | |
Default constructor does not need much of a description. More... | |
PndDocuSample (std::string _s, int _i) | |
Proper constructor. More... | |
~PndDocuSample () | |
Default destructor. More... | |
void | SetString (std::string _s) |
Set the string. More... | |
void | SetNumber (int _i) |
Set the number. More... | |
std::string | GetString () |
Returns the current string. More... | |
int | GetNumber () |
Return the current number. More... | |
void | PrintValues () |
You can either document in the header file... More... | |
void | AddString () |
Adds the current string to itself. More... | |
void | SquareNumber () |
Squares the current number. More... | |
Private Attributes | |
bool | fInitialized |
Easiest way to document data member variables. More... | |
std::string | fString |
This more verbose method can be used as well. More... | |
int | fNumber |
This is the fastest, though. More... | |
Int_t | fTransient |
! A transient member More... | |
Documentation Sample Class.
This file highlights documentation with Doxygen
. Please see the individual parts for more information.
The current paragraph is designated for a long description of the class, possibly also with run / invocation instructions. Since this can be quite extensive, Doxygen provides functionality to properly format text. Two ways of styling text are supported, HTML
and Markdown
syntax. I will shortly highlight the latter, as it is a neat, quite natural way of styling text.
Markdown is the a markup language which lets you write styled text.
Headings are created with a number of consecutive hashes (#
), text can be bold or in italics. The following paragraph concisely highlights some features and is followed by the code used to generate it.
For more, see the original page or this slightly more extensive example.
This text can be italic, can be bold, or with fixed-width
. Also, a link can be set and an image included:
Code (uninterpreted) can be included in a block with three tildes (both for start and end of block). Optionally, a language can be specified which is used to generate syntax highlighted code.
And
The code used to generated the last section is the following:
If your class / method needs some mathematical description, you can use LaTeX to create formulas
\[ 55 = \sum_{i = 1}^{10} i \]
The formulas are rendered either in-browser with MathJax or during generation of the documentation as an image, depending on the configuration in the doxygen config file.
Definition at line 77 of file PndDocuSample.h.
PndDocuSample::PndDocuSample | ( | ) |
Default constructor does not need much of a description.
Definition at line 6 of file PndDocuSample.cxx.
PndDocuSample::PndDocuSample | ( | std::string | _s, |
int | _i | ||
) |
Proper constructor.
Use this constructor to directly initialize the class
_s | A string with some information |
_i | Some integer. Does not need to be 42. |
Definition at line 9 of file PndDocuSample.cxx.
References PrintValues().
PndDocuSample::~PndDocuSample | ( | ) |
Default destructor.
void PndDocuSample::AddString | ( | ) |
Adds the current string to itself.
Definition at line 37 of file PndDocuSample.cxx.
References fString.
|
inline |
Return the current number.
fNumber
Definition at line 123 of file PndDocuSample.h.
References fNumber.
|
inline |
Returns the current string.
fString
Definition at line 118 of file PndDocuSample.h.
References fString.
void PndDocuSample::PrintValues | ( | ) |
You can either document in the header file...
... or in the declaration file
This is true for all descriptions. They are combined.
With the header file documentations coming first.
Definition at line 20 of file PndDocuSample.cxx.
References fNumber, and fString.
Referenced by PndDocuSample().
|
inline |
Set the number.
_i | Number |
Definition at line 112 of file PndDocuSample.h.
References fNumber.
|
inline |
Set the string.
[in] | _s | The input string. |
You can give additional directions of the variable. It can be an input, which should be the case usually, or on output, e.g. if you provide a pointer or reference to a variable to be filled in the course of this method.
Notice that in the description of this method the usually one-line param
description was extended by using parblock
.
Definition at line 105 of file PndDocuSample.h.
References fString.
void PndDocuSample::SquareNumber | ( | ) |
Squares the current number.
Squares fNumber
Definition at line 30 of file PndDocuSample.cxx.
References fNumber.
|
private |
Easiest way to document data member variables.
Definition at line 134 of file PndDocuSample.h.
|
private |
This is the fastest, though.
Definition at line 142 of file PndDocuSample.h.
Referenced by GetNumber(), PrintValues(), SetNumber(), and SquareNumber().
|
private |
This more verbose method can be used as well.
And you can use a detailed comment if you feel the need.
Surely, also with Markdown and \(\LaTeX\).
Definition at line 141 of file PndDocuSample.h.
Referenced by AddString(), GetString(), PrintValues(), and SetString().
|
private |
! A transient member
Definition at line 143 of file PndDocuSample.h.