23#ifndef RECORDABLES_MAP_H
24#define RECORDABLES_MAP_H
59template <
typename HostNode >
60class RecordablesMap :
public std::map< std::string, double ( HostNode::* )() const >
62 typedef std::map< std::string, double ( HostNode::* )() const >
Base_;
89 std::vector< std::string >
92 std::vector< std::string > recordables;
93 for (
typename Base_::const_iterator it = this->begin(); it != this->end(); ++it )
95 recordables.push_back( it->first );
108 Base_::insert( std::make_pair( n, f ) );
125template <
typename HostNode >
134template <
typename HostNode >
168template <
typename HostNode >
171 typedef std::map< std::string, const DataAccessFunctor< HostNode > >
Base_;
198 std::vector< std::string >
201 std::vector< std::string > recordables;
202 for (
typename Base_::const_iterator it = this->begin(); it != this->end(); ++it )
204 recordables.push_back( it->first );
213 Base_::insert( std::make_pair( n, f ) );
223 if ( it == this->end() )
225 throw KeyError( n,
"DynamicRecordablesMap",
"erase" );
232template <
typename HostNode >
Class that reads out state vector elements, used by UniversalDataLogger.
Definition recordables_map.h:136
HostNode * parent_
Definition recordables_map.h:139
double operator()() const
Definition recordables_map.h:148
DataAccessFunctor(HostNode &n, size_t elem)
Definition recordables_map.h:143
size_t elem_
Definition recordables_map.h:140
Map names of recordables to DataAccessFunctors.
Definition recordables_map.h:170
void insert(const std::string &n, const DataAccessFct &f)
Insertion functions to be used in create(), adds entry to map and list.
Definition recordables_map.h:211
std::vector< std::string > get_list() const
Obtain list of all recordables, for use by get_status().
Definition recordables_map.h:199
virtual ~DynamicRecordablesMap()
Definition recordables_map.h:174
std::map< std::string, const DataAccessFunctor< HostNode > > Base_
Definition recordables_map.h:171
void create(HostNode &n)
Create the map.
Definition recordables_map.h:234
void erase(const std::string &n)
Erase functions to be used when setting state, removes entry from map and list.
Definition recordables_map.h:219
DataAccessFunctor< HostNode > DataAccessFct
Datatype for access callable.
Definition recordables_map.h:179
Exception to be thrown if when trying to delete an entry from DynamicRecordablesMap that does not exi...
Definition exceptions.h:1187
Map names of recordables to data access functions.
Definition recordables_map.h:61
virtual ~RecordablesMap()
Definition recordables_map.h:65
void create()
Create the map.
Definition recordables_map.h:127
double(HostNode::* DataAccessFct)() const
Datatype for access functions.
Definition recordables_map.h:70
std::map< std::string, double(HostNode::*)() const > Base_
Definition recordables_map.h:62
std::vector< std::string > get_list() const
Obtain list of all recordables, for use by get_status().
Definition recordables_map.h:90
void insert_(const std::string &n, const DataAccessFct f)
Insertion functions to be used in create(), adds entry to map and list.
Definition recordables_map.h:106
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
long find(const NodeCollectionPTR nc, size_t node_id)
Definition nest.cpp:404