Nemo  2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
StatRecBase Class Referenceabstract

Base class for the StatRecorder's, declares the interface to record stat values. More...

#include <statrecorder.h>

+ Inheritance diagram for StatRecBase:
+ Collaboration diagram for StatRecBase:

Public Member Functions

 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...
 
Accessors
void setName (std::string N)
 
std::string getTitle ()
 
std::string getName ()
 
age_t getAge ()
 
unsigned int getArg1 ()
 
unsigned int getArg2 ()
 

Private Attributes

std::string _title
 The title of the stat recorder, longer and more explicite than the name. More...
 
std::string _name
 Name of the stat, should be short (20 char) and R compliant (no '-', '+', ' ') More...
 
unsigned int _arg1
 A argument to be passed to one of the function variable stored in the StatRecorder structure. More...
 
unsigned int _arg2
 
age_t _age
 The age class for which this stat applies. More...
 

Detailed Description

Base class for the StatRecorder's, declares the interface to record stat values.

Constructor & Destructor Documentation

◆ StatRecBase()

StatRecBase::StatRecBase ( )
inline
53: _title(""), _name(""), _arg1(0), _arg2(0), _age(ALL) { }
unsigned int _arg2
Definition: statrecorder.h:47
age_t _age
The age class for which this stat applies.
Definition: statrecorder.h:49
std::string _title
The title of the stat recorder, longer and more explicite than the name.
Definition: statrecorder.h:42
std::string _name
Name of the stat, should be short (20 char) and R compliant (no '-', '+', ' ')
Definition: statrecorder.h:44
unsigned int _arg1
A argument to be passed to one of the function variable stored in the StatRecorder structure.
Definition: statrecorder.h:46
#define ALL
All ages age class flag.
Definition: types.h:56

◆ ~StatRecBase()

virtual StatRecBase::~StatRecBase ( )
inlinevirtual
56{ }

Member Function Documentation

◆ getAge()

age_t StatRecBase::getAge ( )
inline
80{return _age;}

References _age.

◆ getArg1()

unsigned int StatRecBase::getArg1 ( )
inline
81{return _arg1;}

References _arg1.

◆ getArg2()

unsigned int StatRecBase::getArg2 ( )
inline
82{return _arg2;}

References _arg2.

◆ getName()

std::string StatRecBase::getName ( )
inline
79{return _name;}

References _name.

◆ getTitle()

std::string StatRecBase::getTitle ( )
inline
78{return _title;}

References _title.

◆ set()

void StatRecBase::set ( std::string  T,
std::string  N,
age_t  AGE,
unsigned int  ARG1,
unsigned int  ARG2 
)
inline

Sets the recorder attributes.

Parameters
Tthe stat title (not printed in output)
Nthe stat name (headers in the output file)
AGEthe age class for which the stat will be recorded
ARG1the argument to pass to the S function
ARG2the argument to pass to the S function
67 {
68 _title = T;
69 _name = N;
70 _age = AGE;
71 _arg1 = ARG1;
72 _arg2 = ARG2;
73 }

References _age, _arg1, _arg2, _name, and _title.

Referenced by StatRecorder< S >::set().

+ Here is the caller graph for this function:

◆ setName()

void StatRecBase::setName ( std::string  N)
inline
77{_name = N;}

References _name.

◆ setVal()

virtual double StatRecBase::setVal ( age_t  AGE)
pure virtual

Member Data Documentation

◆ _age

age_t StatRecBase::_age
private

The age class for which this stat applies.

Referenced by getAge(), and set().

◆ _arg1

unsigned int StatRecBase::_arg1
private

A argument to be passed to one of the function variable stored in the StatRecorder structure.

Referenced by getArg1(), and set().

◆ _arg2

unsigned int StatRecBase::_arg2
private

Referenced by getArg2(), and set().

◆ _name

std::string StatRecBase::_name
private

Name of the stat, should be short (20 char) and R compliant (no '-', '+', ' ')

Referenced by getName(), set(), and setName().

◆ _title

std::string StatRecBase::_title
private

The title of the stat recorder, longer and more explicite than the name.

Referenced by getTitle(), and set().


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

Generated for Nemo v2.3.56 by  doxygen 1.9.0 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR