ESyS-Particle  4.0.1
Public Member Functions | Protected Attributes
CCounter Class Reference

#include <Counter.h>

List of all members.

Public Member Functions

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

Protected Attributes

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

Detailed Description

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


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