ewmscp  ..
Public Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
statCollector::base Class Referenceabstract

#include <statCollector.h>

Inheritance diagram for statCollector::base:
[legend]
Collaboration diagram for statCollector::base:
[legend]

Public Member Functions

 base (const std::string &aName, const std::string &aUnit="s")
 
virtual void print (std::ostream &) const =0
 
virtual void reset ()=0
 
const std::string & getName () const
 
const std::string & getUnit () const
 
decltype(ngetN () const
 

Protected Attributes

unsigned long long n
 

Private Attributes

std::string name
 
std::string unit
 

Friends

std::ostream & operator<< (std::ostream &stream, const base &obj)
 

Detailed Description

Definition at line 5 of file statCollector.h.

Constructor & Destructor Documentation

◆ base()

statCollector::base::base ( const std::string &  aName,
const std::string &  aUnit = "s" 
)
inline

Definition at line 12 of file statCollector.h.

13  : name(aName), unit(aUnit) {};

Member Function Documentation

◆ getN()

decltype(n) statCollector::base::getN ( ) const
inline

Definition at line 26 of file statCollector.h.

26  {
27  return n;
28  };

References n.

◆ getName()

const std::string& statCollector::base::getName ( ) const
inline

Definition at line 20 of file statCollector.h.

20  {
21  return name;
22  };

References name.

Referenced by statCollector::typed< decltype(tWorkDone - tWorkStart) >::_print(), and statCollector::typed< decltype(tWorkDone - tWorkStart) >::print().

Here is the caller graph for this function:

◆ getUnit()

const std::string& statCollector::base::getUnit ( ) const
inline

Definition at line 23 of file statCollector.h.

23  {
24  return unit;
25  };

References unit.

Referenced by statCollector::typed< decltype(tWorkDone - tWorkStart) >::_print().

Here is the caller graph for this function:

◆ print()

virtual void statCollector::base::print ( std::ostream &  ) const
pure virtual

◆ reset()

virtual void statCollector::base::reset ( )
pure virtual

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const base obj 
)
friend

Definition at line 16 of file statCollector.h.

16  {
17  obj.print(stream);
18  return stream;
19  }

Member Data Documentation

◆ n

unsigned long long statCollector::base::n
protected

◆ name

std::string statCollector::base::name
private

Definition at line 7 of file statCollector.h.

Referenced by getName().

◆ unit

std::string statCollector::base::unit
private

Definition at line 8 of file statCollector.h.

Referenced by getUnit().


The documentation for this class was generated from the following file:
statCollector::base::name
std::string name
Definition: statCollector.h:7
statCollector::base::n
unsigned long long n
Definition: statCollector.h:10
statCollector::base::unit
std::string unit
Definition: statCollector.h:8