41 for (std::set<Agent*>::const_iterator
inst =
children().begin();
44 s += (*inst)->prototype() +
", ";
The abstract base class used by all types of agents that live and interact in a simulation.
virtual void InitFrom(QueryableBackend *b)
Intializes an agent's internal state from the database.
virtual void Build(Agent *parent)
Called when the agent enters the smiulation as an active participant and is only ever called once.
Context * context() const
Returns this agent's simulation context.
const std::set< Agent * > & children() const
Returns a list of children this agent has.
virtual void Decommission()
Decommissions the agent, removing it from the simulation.
std::string kind_
describes the agent subclass (e.g.
Agent * parent() const
Returns parent of this agent. Returns NULL if the agent has no parent.
virtual std::string str()
Description of this agent.
A simulation context provides access to necessary simulation-global functions and state.
void RegisterTimeListener(TimeListener *tl)
Registers an agent to receive tick/tock notifications every timestep.
void UnregisterTimeListener(TimeListener *tl)
Removes an agent from receiving tick/tock notifications.
The Region class is the abstract class/interface used by all region agents.
virtual void InitFrom(QueryableBackend *b)
Intializes an agent's internal state from the database.
virtual void EnterNotify()
Called to give the agent an opportunity to register for services (e.g.
virtual std::string str()
every agent should be able to print a verbose description
Region(Context *ctx)
Default constructor for Region Class.
virtual void Build(Agent *parent)
perform actions required when entering the simulation
virtual void Decommission()
Decommissions the agent, removing it from the simulation.
Code providing rudimentary logging capability for the Cyclus core.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters