Counter Class Reference

#include <Statistics.h>

Inheritance diagram for Counter:

Receptor List of all members.

Public Member Functions

 Counter ()
virtual void init ()
virtual void print (std::ostream &stream) const
void increment ()
void decrement ()
void set (unsigned long v)
void add (unsigned long v)
unsigned long getValue () const

Protected Attributes

unsigned long _value
 value of the counter

Detailed Description

Counter stores interger value

Definition at line 45 of file Statistics.h.


Constructor & Destructor Documentation

Counter  )  [inline]
 

Constructor

Definition at line 53 of file Statistics.h.


Member Function Documentation

void add unsigned long  v  )  [inline]
 

Adds value to the counter

Parameters:
v addition value

Definition at line 80 of file Statistics.h.

References Counter::_value.

void decrement  )  [inline]
 

Decrements the counter by one

Definition at line 66 of file Statistics.h.

References Counter::_value.

unsigned long getValue  )  const [inline]
 

Returns:
actual value of the counter

Definition at line 85 of file Statistics.h.

References Counter::_value.

void increment  )  [inline]
 

Increments the counter by one

Definition at line 61 of file Statistics.h.

References Counter::_value.

virtual void init  )  [inline, virtual]
 

Initializes/clears receptor

Implements Receptor.

Definition at line 55 of file Statistics.h.

References Counter::_value.

virtual void print std::ostream &  stream  )  const [inline, virtual]
 

Prints statistics

Parameters:
stream output stream to print to

Implements Receptor.

Definition at line 56 of file Statistics.h.

References Counter::_value.

void set unsigned long  v  )  [inline]
 

Sets the counter

Parameters:
v new value of the counter

Definition at line 73 of file Statistics.h.

References Counter::_value.


Member Data Documentation

unsigned long _value [protected]
 

value of the counter

Definition at line 47 of file Statistics.h.

Referenced by Counter::add(), Counter::decrement(), Counter::getValue(), Counter::increment(), Counter::init(), Counter::print(), and Counter::set().


The documentation for this class was generated from the following file:
Generated on Wed Jun 28 12:24:36 2006 for esg by  doxygen 1.4.6