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...
|
|
virtual double | setVal (age_t AGE)=0 |
| Stores the value in the vector following the ordering option. 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 |
152{
154
159}
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.
164{
165 double statValue = 0;
166
168#ifdef _DEBUG_
170#endif
171
173
174
176
178
180
182
184
186
187 else {
188
189 fatal(
"StatRecorder \"%s\" has no _getStat funct ptr !!\n",
getName().c_str());
190
191 }
192 }
193
194 return statValue;
195}
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
Pointer to a 'stat getter' function of S using a single unsigned int argument.
◆ _getStatTwoArg
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: