ESyS-Particle  2.3
CCounter Class Reference

#include <Counter.h>

Public Member Functions

 CCounter ()
 
 CCounter (char *Name, int Id=0)
 
virtual ~CCounter ()
 
void create (char *Name, int Id=0)
 create counter, call by constructor More...
 
CCounteroperator+= (int n)
 increment counter by n More...
 
CCounteroperator-= (int n)
 decrement counter by n More...
 
CCounteroperator++ ()
 increment counter by 1 More...
 
CCounteroperator-- ()
 decrement counter by 1 More...
 
CCounteroperator++ (int)
 increment counter by 1 More...
 
CCounteroperator-- (int)
 decrement counter by 1 More...
 
CCounterreset ()
 reset the counter to 0 More...
 
char * getName ()
 return name of counter More...
 
 operator int ()
 return the value of the counter More...
 
ostream & print (ostream &Out)
 method to print the value More...
 

Protected Attributes

char * Name
 Name is allocated or deallocated on construction or destruction, respectively. More...
 
int Value
 
int Id
 

Detailed Description

Provide a basic "counter", a counter has a Name and a value and an optional Id.

Constructor & Destructor Documentation

CCounter::CCounter ( )

References Id, Name, NULL, and Value.

CCounter::CCounter ( char *  Name,
int  Id = 0 
)

References create().

Here is the call graph for this function:

CCounter::~CCounter ( )
virtual

References Name.

Member Function Documentation

void CCounter::create ( char *  Name,
int  Id = 0 
)

create counter, call by constructor

References Id, Name, and Value.

Referenced by CCounter().

Here is the caller graph for this function:

char * CCounter::getName ( )

return name of counter

References Name.

Referenced by CCounterList::counter(), and CCounterList::operator<<().

Here is the caller graph for this function:

CCounter::operator int ( )

return the value of the counter

CCounter & CCounter::operator++ ( )

increment counter by 1

References Value.

CCounter & CCounter::operator++ ( int  )

increment counter by 1

References Value.

CCounter & CCounter::operator+= ( int  n)

increment counter by n

References Value.

CCounter & CCounter::operator-- ( )

decrement counter by 1

References Value.

CCounter & CCounter::operator-- ( int  )

decrement counter by 1

References Value.

CCounter & CCounter::operator-= ( int  n)

decrement counter by n

References Value.

ostream & CCounter::print ( ostream &  Out)

method to print the value

References Name, and Value.

Referenced by operator<<(), and CCounterList::print().

Here is the caller graph for this function:

CCounter & CCounter::reset ( )

reset the counter to 0

References Value.

Member Data Documentation

int CCounter::Id
protected

Referenced by CCounter(), and create().

char* CCounter::Name
protected

Name is allocated or deallocated on construction or destruction, respectively.

Referenced by CCounter(), create(), getName(), print(), and ~CCounter().

int CCounter::Value
protected

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