ssim::SimpleReport< T > Class Template Reference

SimpleReport class for collecting data for homogeneous fields of type T with string names. More...

`#include <microsimulation.h>`

Collaboration diagram for ssim::SimpleReport< T >:
[legend]

## Public Types

typedef map< string, vector< T > > | Map
| Map typedef for a map of strings to vector<T> More...

## Public Member Functions

void | record (string field, T value)
| record adds a value for a given field into the SimpleReport More...
void | revise (string field, T value)
| revise changes the last value in a given field. Reminder: std::map::operator[] creates an element for a key if it does not exist. More...
void | clear ()
| clear the report data More...
SEXP | wrap ()
| wrap the report as a DataFrame or a List More...
void | append (SimpleReport< T > &obj)
| append another SimpleReport, which is useful for aggregating multiple reports. More...

## Public Attributes

Map | _data
| _data class member of a map from strings to vector<T>. More...

## Detailed Description

### template<class T = double>
class ssim::SimpleReport< T >

SimpleReport class for collecting data for homogeneous fields of type T with string names.

Definition at line 1099 of file microsimulation.h.

## Member Typedef Documentation

## Map

template<class T = double>

typedef map<string,vector<T> > ssim::SimpleReport< T >::Map

Map typedef for a map of strings to vector<T>

Definition at line 1104 of file microsimulation.h.

## Member Function Documentation

## append()

template<class T = double>

void ssim::SimpleReport< T >::append | ( | SimpleReport< T > & | obj | ) |

inline

append another SimpleReport, which is useful for aggregating multiple reports.

Definition at line 1133 of file microsimulation.h.

## clear()

template<class T = double>

void ssim::SimpleReport< T >::clear | ( |  | ) |

inline

clear the report data

Definition at line 1123 of file microsimulation.h.

## record()

template<class T = double>

void ssim::SimpleReport< T >::record | ( | string | field,
|  | T | value
| ) |  |

inline

record adds a value for a given field into the SimpleReport

Definition at line 1108 of file microsimulation.h.

## revise()

template<class T = double>

void ssim::SimpleReport< T >::revise | ( | string | field,
|  | T | value
| ) |  |

inline

revise changes the last value in a given field. Reminder: std::map::operator[] creates an element for a key if it does not exist.

Definition at line 1115 of file microsimulation.h.

## wrap()

template<class T = double>

SEXP ssim::SimpleReport< T >::wrap | ( |  | ) |

inline

wrap the report as a DataFrame or a List

Definition at line 1127 of file microsimulation.h.

## Member Data Documentation

## _data

template<class T = double>

Map ssim::SimpleReport< T >::_data

_data class member of a map from strings to vector<T>.

Definition at line 1141 of file microsimulation.h.

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

- /home/marcle/src/R/microsimulation/inst/include/microsimulation.h