All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
Modulo_recorder< Recorder > Class Template Reference

#include <sample_recorder.h>

Public Types

typedef Recorder::Model_type Model_type
typedef Recorder::Value_type Value_type

Public Member Functions

 BOOST_CONCEPT_ASSERT ((ModelRecorder< Recorder >))
 Modulo_recorder (const Recorder &recorder, int interval, int start=0)
virtual void operator() (const Model_type &m, const Step_log< Model_type > &step_log)
const Value_typeget () const

Detailed Description

template<class Recorder>
class Modulo_recorder< Recorder >

"Wraps" and existing recorder, making it only record every Nth entry. Results are still obtained through the wrapped recorder, not this object.

Template Parameters
RecorderA type implemeting the ModelRecorder concept.
The wrapped recorder is stored by reference, so the caller must ensure it isn't freed while Modulo_recorder is in use.

Member Typedef Documentation

template<class Recorder >
typedef Recorder::Model_type Modulo_recorder< Recorder >::Model_type
template<class Recorder >
typedef Recorder::Value_type Modulo_recorder< Recorder >::Value_type

Constructor & Destructor Documentation

template<class Recorder >
Modulo_recorder< Recorder >::Modulo_recorder ( const Recorder &  recorder,
int  interval,
int  start = 0 
recorderThe recorder to wrap. This will be stored be value, so the caller is responsible for making sure the recorder remains in scope
intervalOne in every interval entries will be recorded
startWhere to start the counter. When counter % interval == 0, the entry will be recorded. By default, the first entry is recorded.

Member Function Documentation

template<class Recorder >
Modulo_recorder< Recorder >::BOOST_CONCEPT_ASSERT ( (ModelRecorder< Recorder >)  )
template<class Recorder >
const Value_type& Modulo_recorder< Recorder >::get ( ) const
template<class Recorder >
virtual void Modulo_recorder< Recorder >::operator() ( const Model_type m,
const Step_log< Model_type > &  step_log 

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