CYCLUS
Loading...
Searching...
No Matches
db_init.h
Go to the documentation of this file.
1#ifndef CYCLUS_SRC_DB_INIT_H_
2#define CYCLUS_SRC_DB_INIT_H_
3
4#include "datum.h"
5
6namespace cyclus {
7
8class Agent;
9
10/// DbInit provides an interface for agents to record data to the output db that
11/// automatically injects the agent's id and current timestep alongside all
12/// recorded data. The prefix 'AgentState' + [spec] (e.g.
13/// MyReactor) is also added to the datum title
14class DbInit {
15 public:
16 DbInit(Agent* m);
17
18 /// Using this constructor prevents the [spec] from being injected into
19 /// the title.
20 DbInit(Agent* m, bool dummy);
21
22 /// Returns a new datum to be used exactly as the Context::NewDatum method.
23 /// Users must not add fields to the datum that are automatically injected:
24 /// 'SimId', 'AgentId', and 'SimTime'.
25 Datum* NewDatum(std::string title);
26
27 private:
28 bool full_prefix_;
29 Agent* m_;
30};
31
32} // namespace cyclus
33
34#endif // CYCLUS_SRC_DB_INIT_H_
The abstract base class used by all types of agents that live and interact in a simulation.
Definition agent.h:49
Used to specify and send a collection of key-value pairs to the Recorder for recording.
Definition datum.h:15
DbInit provides an interface for agents to record data to the output db that automatically injects th...
Definition db_init.h:14
Datum * NewDatum(std::string title)
Returns a new datum to be used exactly as the Context::NewDatum method.
Definition db_init.cc:12
DbInit(Agent *m)
Definition db_init.cc:8
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
Definition agent.cc:14
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters