DataManagers handle sets of DataNode objects that all have the same tracking settings.
More...
#include <DataManager.h>
template<typename VAL_TYPE, emp::data... MODS>
class emp::DataManager< VAL_TYPE, MODS >
DataManagers handle sets of DataNode objects that all have the same tracking settings.
template<typename VAL_TYPE, emp::data... MODS>
template<typename VAL_TYPE, emp::data... MODS>
template<typename VAL_TYPE, emp::data... MODS>
template<typename... Ts>
void emp::DataManager< VAL_TYPE, MODS >::AddData |
( |
const std::string & |
name, |
|
|
Ts... |
extra |
|
) |
| |
|
inline |
Adds data to a node in the DataManager.
- Parameters
-
name | is the node to add the data to. All subsequent arguments are the data to add to that node, and should be of whatever type all of the nodes in this maanger expect. |
Example:
DataManager<int, data::Current, data::Range> my_data_manager; my_data_manager.Add("my_node_name"); my_data_manager.AddData("my_node_name", 1, 2, 3, 4, 5);
template<typename VAL_TYPE, emp::data... MODS>
Deletes the DataNode with the name
- Parameters
-
name. | Throws an error if there is no node with that name in this manager. |
template<typename VAL_TYPE, emp::data... MODS>
Returns a const reference to the node named
- Parameters
-
name. | Throws an error if there is no node with that name in this manager |
template<typename VAL_TYPE, emp::data... MODS>
Returns a reference to the node named
- Parameters
-
name. | Throws an error if there is no node with that name in this manager |
template<typename VAL_TYPE, emp::data... MODS>
Returns the std::map mapping node names (strings) to DataNodes.
template<typename VAL_TYPE, emp::data... MODS>
template<typename VAL_TYPE, emp::data... MODS>
template<typename VAL_TYPE, emp::data... MODS>
Creates and adds a new DataNode, with the name specified in.
- Parameters
-
template<typename VAL_TYPE, emp::data... MODS>
Resets all nodes in this manager. For nodes without the data::Archive attribute, this clears all of their data except current. For nodes with the data::Archive attribute, this creates a new vector to start storing data, retaining the old one in the archive.
The documentation for this class was generated from the following file: