FairRoot/PandaRoot
Public Member Functions | Private Attributes | List of all members
PndDocuSample Class Reference

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...
 

Detailed Description

Documentation Sample Class.

Sample Documentation 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

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.

Example

This text can be italic, can be bold, or with fixed-width. Also, a link can be set and an image included:

PANDA Logo

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.

* int i = 0;
* i++;
*

Lists

And

  1. A numbered
  2. List is done
  3. Like this

Code

The code used to generated the last section is the following:

* ### Example
* This text can be *italic*, can be *bold*, or with `fixed-width`. Also, a [link](http://panda.gsi.de) can be set and an image included:
* ![PANDA Logo](http://www-panda.gsi.de/html/org/logo/PandaLogo2_web.gif "The PANDA logo")
*
* #### Lists
* * An unnumbered
* * list is done
* * Like this
*
* And
*
* 1. A numbered
* 2. List is done
* 3. Like this
*

Formulas

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.

Author
Andreas Herten a.her.nosp@m.ten@.nosp@m.fz-ju.nosp@m.elic.nosp@m.h.de, FZJ
Version
1.0
Date
May 11, 2015

Definition at line 77 of file PndDocuSample.h.

Constructor & Destructor Documentation

PndDocuSample::PndDocuSample ( )

Default constructor does not need much of a description.

Definition at line 6 of file PndDocuSample.cxx.

6  :
7  fInitialized(false) {};
bool fInitialized
Easiest way to document data member variables.
PndDocuSample::PndDocuSample ( std::string  _s,
int  _i 
)

Proper constructor.

Use this constructor to directly initialize the class

Remarks
You should use this constructor
Parameters
_sA string with some information
_iSome integer. Does not need to be 42.

Definition at line 9 of file PndDocuSample.cxx.

References PrintValues().

9  :
10  fString(_s),
11  fNumber(_i),
12  fInitialized(true) {
13  PrintValues();
14 }
void PrintValues()
You can either document in the header file...
std::string fString
This more verbose method can be used as well.
int fNumber
This is the fastest, though.
bool fInitialized
Easiest way to document data member variables.
PndDocuSample::~PndDocuSample ( )

Default destructor.

Member Function Documentation

void PndDocuSample::AddString ( )

Adds the current string to itself.

Definition at line 37 of file PndDocuSample.cxx.

References fString.

37  {
38  fString += fString;
39 }
std::string fString
This more verbose method can be used as well.
int PndDocuSample::GetNumber ( )
inline

Return the current number.

Returns
The current content of fNumber

Definition at line 123 of file PndDocuSample.h.

References fNumber.

123 { return fNumber; };
int fNumber
This is the fastest, though.
std::string PndDocuSample::GetString ( void  )
inline

Returns the current string.

Returns
The current content of fString

Definition at line 118 of file PndDocuSample.h.

References fString.

118 { return fString; };
std::string fString
This more verbose method can be used as well.
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().

20  {
21  std::cout << "Values are currently set to: " << std::endl;
22  std::cout << " fString: " << fString << std::endl;
23  std::cout << " fNumber: " << fNumber << std::endl;
24 }
std::string fString
This more verbose method can be used as well.
int fNumber
This is the fastest, though.
void PndDocuSample::SetNumber ( int  _i)
inline

Set the number.

Note
Notes are different ways of giving attention to something specific. Like this panda.
Parameters
_iNumber

Definition at line 112 of file PndDocuSample.h.

References fNumber.

112 { fNumber = _i; };
int fNumber
This is the fastest, though.
void PndDocuSample::SetString ( std::string  _s)
inline

Set the string.

Parameters
[in]_sThe 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.

105 { fString = _s; };
std::string fString
This more verbose method can be used as well.
void PndDocuSample::SquareNumber ( )

Squares the current number.

Squares fNumber

Definition at line 30 of file PndDocuSample.cxx.

References fNumber.

30  {
31  fNumber *= fNumber;
32 }
int fNumber
This is the fastest, though.

Member Data Documentation

bool PndDocuSample::fInitialized
private

Easiest way to document data member variables.

Definition at line 134 of file PndDocuSample.h.

int PndDocuSample::fNumber
private

This is the fastest, though.

Definition at line 142 of file PndDocuSample.h.

Referenced by GetNumber(), PrintValues(), SetNumber(), and SquareNumber().

std::string PndDocuSample::fString
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().

Int_t PndDocuSample::fTransient
private

! A transient member

Definition at line 143 of file PndDocuSample.h.


The documentation for this class was generated from the following files: