Stores the pointers to the StatHandler's stat functions.
More...
#include <statrecorder.h>
|
| | StatRecorder () |
| |
| void | set (std::string T, std::string N, age_t AGE, unsigned int ARG1, unsigned int ARG2, double(S::*getNoArg)(void), double(S::*getOneArg)(unsigned int), double(S::*getTwoArg)(unsigned int, unsigned int), void(S::*setStat)(void)) |
| | Sets the recorder attributes. More...
|
| |
| void | setHandler (S *theHandler) |
| | Sets the pointer to the StatHandler that owns this recorder. More...
|
| |
| virtual double | setVal (age_t AGE) |
| | Calls the linked stat function and returns the result. More...
|
| |
| | StatRecBase () |
| |
| virtual | ~StatRecBase () |
| |
| void | set (std::string T, std::string N, age_t AGE, unsigned int ARG1, unsigned int ARG2) |
| | Sets the recorder attributes. More...
|
| |
| void | setName (std::string N) |
| |
| std::string | getTitle () |
| |
| std::string | getName () |
| |
| age_t | getAge () |
| |
| unsigned int | getArg1 () |
| |
| unsigned int | getArg2 () |
| |
|
| double(S::* | _getStat )(void) |
| | Pointer to a 'stat getter' function of S using no argument. More...
|
| |
| double(S::* | _getStatOneArg )(unsigned int) |
| | Pointer to a 'stat getter' function of S using a single unsigned int argument. More...
|
| |
| double(S::* | _getStatTwoArg )(unsigned int, unsigned int) |
| | Pointer to a 'stat getter' function of S using two unsigned int arguments. More...
|
| |
| void(S::* | _setStat )(void) |
| | Pointer to a 'stat setter' function of S using no argument. More...
|
| |
| S * | _myHandler |
| | Pointer to the owner of this recorder. More...
|
| |
template<class S>
class StatRecorder< S >
Stores the pointers to the StatHandler's stat functions.
◆ StatRecorder()
double(S::* _getStat)(void)
Pointer to a 'stat getter' function of S using no argument.
Definition: statrecorder.h:96
double(S::* _getStatOneArg)(unsigned int)
Pointer to a 'stat getter' function of S using a single unsigned int argument.
Definition: statrecorder.h:98
void(S::* _setStat)(void)
Pointer to a 'stat setter' function of S using no argument.
Definition: statrecorder.h:104
double(S::* _getStatTwoArg)(unsigned int, unsigned int)
Pointer to a 'stat getter' function of S using two unsigned int arguments.
Definition: statrecorder.h:100
S * _myHandler
Pointer to the owner of this recorder.
Definition: statrecorder.h:106
◆ set()
template<class S >
| void StatRecorder< S >::set |
( |
std::string |
T, |
|
|
std::string |
N, |
|
|
age_t |
AGE, |
|
|
unsigned int |
ARG1, |
|
|
unsigned int |
ARG2, |
|
|
double(S::*)(void) |
getNoArg, |
|
|
double(S::*)(unsigned int) |
getOneArg, |
|
|
double(S::*)(unsigned int, unsigned int) |
getTwoArg, |
|
|
void(S::*)(void) |
setStat |
|
) |
| |
Sets the recorder attributes.
- Parameters
-
| T | the stat title |
| N | the stat name (headers in the output file) |
| AGE | age on which the stat should be processed |
| ARG1 | the frist argument to pass to the S function |
| ARG2 | the second argument to pass to the S function |
| getNoArg | function ptr to a S getter, taking no arguments |
| getOneArg | function ptr to a S getter with a single uint argument |
| getTwoArg | function ptr to a S getter with two uint arguments |
| setStat | ptr to a setter function in class S |
void set(std::string T, std::string N, age_t AGE, unsigned int ARG1, unsigned int ARG2)
Sets the recorder attributes.
Definition: statrecorder.h:65
References StatRecBase::set().
Referenced by StatHandler< SH >::add().
◆ setHandler()
◆ setVal()
Calls the linked stat function and returns the result.
- Returns
- the stat value that will be recorded in the output file
- Parameters
-
| AGE | age class on which the stat should be processed |
Implements StatRecBase.
165 double statValue = 0;
189 fatal(
"StatRecorder \"%s\" has no _getStat funct ptr !!\n",
getName().c_str());
age_t getAge()
Definition: statrecorder.h:80
unsigned int getArg2()
Definition: statrecorder.h:82
unsigned int getArg1()
Definition: statrecorder.h:81
std::string getName()
Definition: statrecorder.h:79
void fatal(const char *str,...)
Definition: output.cc:96
void message(const char *message,...)
Definition: output.cc:40
References fatal(), and message().
◆ _getStat
Pointer to a 'stat getter' function of S using no argument.
◆ _getStatOneArg
template<class S >
| double(S::* StatRecorder< S >::_getStatOneArg) (unsigned int) |
|
private |
Pointer to a 'stat getter' function of S using a single unsigned int argument.
◆ _getStatTwoArg
template<class S >
| double(S::* StatRecorder< S >::_getStatTwoArg) (unsigned int, unsigned int) |
|
private |
Pointer to a 'stat getter' function of S using two unsigned int arguments.
◆ _myHandler
◆ _setStat
Pointer to a 'stat setter' function of S using no argument.
A setter function only sets some inner variables subsequently fetched by getter's
The documentation for this class was generated from the following file: