pion-net  4.0.9
Public Member Functions | Protected Member Functions | List of all members
pion::PionCounter Class Reference

#include <PionCounter.hpp>

Public Member Functions

 PionCounter (unsigned long n=0)
 default constructor initializes counter
 
virtual ~PionCounter ()
 virtual destructor: class may be extended
 
 PionCounter (const PionCounter &c)
 copy constructor
 
const PionCounteroperator= (const PionCounter &c)
 assignment operator
 
const PionCounteroperator++ (void)
 prefix increment
 
const PionCounteroperator-- (void)
 prefix decrement
 
template<typename IntegerType >
const PionCounteroperator+= (const IntegerType &n)
 adds integer value to the counter
 
template<typename IntegerType >
const PionCounteroperator-= (const IntegerType &n)
 subtracts integer value from the counter
 
template<typename IntegerType >
const PionCounteroperator= (const IntegerType &n)
 assigns integer value to the counter
 
template<typename IntegerType >
bool operator== (const IntegerType &n) const
 compares an integer value to the counter
 
template<typename IntegerType >
bool operator> (const IntegerType &n) const
 compares an integer value to the counter
 
template<typename IntegerType >
bool operator< (const IntegerType &n) const
 compares an integer value to the counter
 
template<typename IntegerType >
bool operator>= (const IntegerType &n) const
 compares an integer value to the counter
 
template<typename IntegerType >
bool operator<= (const IntegerType &n) const
 compares an integer value to the counter
 
void reset (void)
 resets the counter to zero
 
boost::uint64_t getValue (void) const
 returns the value of the counter
 

Protected Member Functions

void increment (void)
 increments the value of the counter
 
void decrement (void)
 decrement the value of the counter
 
template<typename IntegerType >
void add (const IntegerType &n)
 adds a value to the counter
 
template<typename IntegerType >
void subtract (const IntegerType &n)
 subtracts a value from the counter
 
template<typename IntegerType >
void assign (const IntegerType &n)
 assigns a new value to the counter
 

Detailed Description

PionCounter: thread-safe 64-bit integer counter

Definition at line 24 of file PionCounter.hpp.


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