|
ESyS-Particle
4.0.1
|
#include <Counter.h>
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 |
Provide a basic "counter", a counter has a Name and a value and an optional Id.
1.7.6.1