OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Types | Private Attributes | List of all members
Statistics< T > Class Template Reference

#include <Statistics.h>

Public Member Functions

 Statistics (std::string name)
 
 ~Statistics ()
 
void registerStatistic (std::string name, T initial_value=0)
 
void changeStatisticBy (std::string name, T change_by_value)
 
T getStatisticValue (std::string name)
 
void dumpStatistics ()
 
void dumpStatistics (std::ostringstream &stream)
 

Private Types

typedef std::map< std::string, Tstatistics_t
 
typedef std::map< std::string,
T >::iterator 
statistics_iterator_t
 

Private Attributes

statistics_t statistics_
 
std::string stat_name_
 

Detailed Description

template<typename T>
class Statistics< T >

Definition at line 9 of file Statistics.h.

Member Typedef Documentation

template<typename T >
typedef std::map<std::string, T>::iterator Statistics< T >::statistics_iterator_t
private

Definition at line 68 of file Statistics.h.

template<typename T >
typedef std::map<std::string, T> Statistics< T >::statistics_t
private

Definition at line 67 of file Statistics.h.

Constructor & Destructor Documentation

template<typename T >
Statistics< T >::Statistics ( std::string  name)
inline

Definition at line 13 of file Statistics.h.

template<typename T >
Statistics< T >::~Statistics ( )
inline

Definition at line 14 of file Statistics.h.

Member Function Documentation

template<typename T >
void Statistics< T >::changeStatisticBy ( std::string  name,
T  change_by_value 
)
inline

Definition at line 24 of file Statistics.h.

References endl(), and Statistics< T >::statistics_.

Here is the call graph for this function:

template<typename T >
void Statistics< T >::dumpStatistics ( )
inline

Definition at line 38 of file Statistics.h.

References endl(), Statistics< T >::stat_name_, Statistics< T >::statistics_, sum(), and T.

Here is the call graph for this function:

template<typename T >
void Statistics< T >::dumpStatistics ( std::ostringstream &  stream)
inline

Definition at line 51 of file Statistics.h.

References endl(), Statistics< T >::stat_name_, Statistics< T >::statistics_, sum(), and T.

Here is the call graph for this function:

template<typename T >
T Statistics< T >::getStatisticValue ( std::string  name)
inline

Definition at line 34 of file Statistics.h.

References name, and Statistics< T >::statistics_.

template<typename T >
void Statistics< T >::registerStatistic ( std::string  name,
T  initial_value = 0 
)
inline

Definition at line 16 of file Statistics.h.

References endl(), and Statistics< T >::statistics_.

Here is the call graph for this function:

Member Data Documentation

template<typename T >
std::string Statistics< T >::stat_name_
private

Definition at line 71 of file Statistics.h.

Referenced by Statistics< T >::dumpStatistics().

template<typename T >
statistics_t Statistics< T >::statistics_
private

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