CYCLUS
|
a CommodityRecipeContext contains relationships between commodities, recipes and resources
Definition at line 19 of file commodity_recipe_context.h.
#include <commodity_recipe_context.h>
Public Member Functions | |
void | AddInCommod (std::string in_commod, std::string in_recipe, std::string out_commod, std::string out_recipe) |
void | AddRsrc (std::string commod, Resource::Ptr rsrc) |
virtual CommodityRecipeContext * | Clone () |
std::string | commod (Resource::Ptr rsrc) |
const std::set< std::string > & | in_commods () const |
std::string | in_recipe (std::string in_commod) |
virtual void | InfileToDb (InfileTree *qe, DbInit di) |
virtual void | InitFrom (QueryableBackend *b) |
bool | operator!= (const CommodityRecipeContext &other) const |
bool | operator== (const CommodityRecipeContext &other) const |
std::string | out_commod (std::string in_commod) |
const std::set< std::string > & | out_commods () const |
std::string | out_recipe (std::string in_commod) |
void | RemoveRsrc (Resource::Ptr rsrc) |
virtual std::string | schema () |
virtual void | Snapshot (DbInit di) |
void | UpdateInRec (std::string in_commod, std::string recipe) |
void | UpdateRsrc (std::string commod, Resource::Ptr rsrc) |
void cyclus::toolkit::CommodityRecipeContext::AddInCommod | ( | std::string | in_commod, |
std::string | in_recipe, | ||
std::string | out_commod, | ||
std::string | out_recipe ) |
add an input commodity and its relations
Definition at line 9 of file commodity_recipe_context.cc.
void cyclus::toolkit::CommodityRecipeContext::AddRsrc | ( | std::string | commod, |
Resource::Ptr | rsrc ) |
add a resource and its commodity affiliation
Definition at line 21 of file commodity_recipe_context.cc.
|
virtual |
Return a newly created/allocated object that is an exact copy of this.
Subclasses are expected to override the return type with their own concrete type.
Implements cyclus::StateWrangler.
Definition at line 41 of file commodity_recipe_context.cc.
|
inline |
Definition at line 66 of file commodity_recipe_context.h.
|
inline |
Definition at line 40 of file commodity_recipe_context.h.
|
inline |
Definition at line 55 of file commodity_recipe_context.h.
|
virtual |
Translates info for the object from input file information to the database by reading parameters from the passed InfileTree and recording data via the DbInit variable.
The simulation and agent id's are automatically injected in all data transfered through di.
Agent parameters in the InfileTree are scoped in the "config/*" path. The superclass InitFrom expects the InfileTree passed to it to be scoped identically to the tree passed to the agent's InitFrom. - do NOT pass a changed-scope tree to the superclass.
Implements cyclus::StateWrangler.
Definition at line 45 of file commodity_recipe_context.cc.
|
virtual |
Intializes an agent's internal state from an output database.
Appropriate simulation id, agent id, and time filters are automatically included in all queries.
Implements cyclus::StateWrangler.
Definition at line 58 of file commodity_recipe_context.cc.
|
inline |
Definition at line 79 of file commodity_recipe_context.h.
|
inline |
Definition at line 70 of file commodity_recipe_context.h.
|
inline |
Definition at line 50 of file commodity_recipe_context.h.
|
inline |
Definition at line 45 of file commodity_recipe_context.h.
|
inline |
Definition at line 60 of file commodity_recipe_context.h.
void cyclus::toolkit::CommodityRecipeContext::RemoveRsrc | ( | Resource::Ptr | rsrc | ) |
removes a resource from the context
Definition at line 26 of file commodity_recipe_context.cc.
|
virtual |
Returns an object's xml rng schema for initializing from input files.
Implements cyclus::StateWrangler.
Definition at line 99 of file commodity_recipe_context.cc.
Snapshots agent-internal state to the output db via di.
This method MUST call the superclass' Snapshot method before doing any work. The simulation and agent id's in addition to the snapshot time are automatically included in all information transfered through di.
Implements cyclus::StateWrangler.
Definition at line 78 of file commodity_recipe_context.cc.
void cyclus::toolkit::CommodityRecipeContext::UpdateInRec | ( | std::string | in_commod, |
std::string | recipe ) |
update an input recipe and its commodity affiliation
Definition at line 36 of file commodity_recipe_context.cc.
void cyclus::toolkit::CommodityRecipeContext::UpdateRsrc | ( | std::string | commod, |
Resource::Ptr | rsrc ) |
update a resource and its commodity affiliation
Definition at line 31 of file commodity_recipe_context.cc.