CYCLUS
|
Handles initialization of a database with information from a cyclus xml input file.
Definition at line 51 of file xml_file_loader.h.
#include <xml_file_loader.h>
Public Member Functions | |
virtual void | LoadSim () |
XMLFileLoader (Recorder *r, QueryableBackend *b, std::string schema_file, const std::string input_file="", const std::string format="none", bool ms_print=false) | |
virtual | ~XMLFileLoader () |
Protected Member Functions | |
Agent * | BuildAgent (std::string proto, Agent *parent) |
void | LoadControlParams () |
virtual void | LoadInitialAgents () |
void | LoadPackages () |
void | LoadRecipe (InfileTree *qe) |
void | LoadRecipes () |
void | LoadSolver () |
void | LoadSpecs () |
void | LoadTransportUnits () |
virtual std::string | master_schema () |
void | ProcessCommodities (std::map< std::string, double > *commodity_priority) |
Protected Attributes | |
QueryableBackend * | b_ |
Context * | ctx_ |
std::string | file_ |
std::string | format_ |
bool | ms_print_ |
boost::shared_ptr< XMLParser > | parser_ |
Recorder * | rec_ |
std::string | schema_path_ |
std::map< std::string, AgentSpec > | specs_ |
Timer | ti_ |
cyclus::XMLFileLoader::XMLFileLoader | ( | Recorder * | r, |
QueryableBackend * | b, | ||
std::string | schema_file, | ||
const std::string | input_file = "", | ||
const std::string | format = "none", | ||
bool | ms_print = false ) |
Create a new loader reading from the xml simulation input file and writing to and initializing the backends in r.
r must already have b registered. schema_file identifies the master xml rng schema used to validate the input file. The format specifies the input file format from one of: "none", "xml", "json", or "py".
Definition at line 160 of file xml_file_loader.cc.
|
virtual |
Definition at line 182 of file xml_file_loader.cc.
Creates and builds an agent, notifying its parent.
The agent init info is translated and stored in the output db.
Definition at line 449 of file xml_file_loader.cc.
|
protected |
Method to load the simulation control parameters.
Definition at line 458 of file xml_file_loader.cc.
|
protectedvirtual |
Creates all initial agent instances from the input file.
Reimplemented in cyclus::XMLFlatLoader.
Definition at line 378 of file xml_file_loader.cc.
|
protected |
Loads packages.
Definition at line 331 of file xml_file_loader.cc.
|
protected |
loads a specific recipe
|
protected |
Method to load recipes from either the primary input file or a recipeBook catalog.
Definition at line 316 of file xml_file_loader.cc.
|
virtual |
Load an entire simulation from the inputfile.
use_flat_schema | whether or not to use the flat schema |
Definition at line 190 of file xml_file_loader.cc.
|
protected |
Method to load the simulation exchange solver.
Definition at line 207 of file xml_file_loader.cc.
|
protected |
Load agent specs from the input file to a map by alias.
Definition at line 371 of file xml_file_loader.cc.
|
protected |
Loads Transport Units.
Definition at line 352 of file xml_file_loader.cc.
|
protectedvirtual |
Reimplemented in cyclus::XMLFlatLoader.
Definition at line 186 of file xml_file_loader.cc.
|
protected |
Processes commodity priorities, such that any without a defined priority (i.e., are nonpositive), are given priority lower than the last known commodity.
Definition at line 294 of file xml_file_loader.cc.
|
protected |
Definition at line 108 of file xml_file_loader.h.
|
protected |
Definition at line 107 of file xml_file_loader.h.
|
protected |
the input file name
Definition at line 123 of file xml_file_loader.h.
|
protected |
the input file format
Definition at line 126 of file xml_file_loader.h.
|
protected |
flag to indicate printing master schema
Definition at line 111 of file xml_file_loader.h.
|
protected |
the parser
Definition at line 120 of file xml_file_loader.h.
|
protected |
Definition at line 105 of file xml_file_loader.h.
|
protected |
filepath to the schema
Definition at line 114 of file xml_file_loader.h.
|
protected |
Definition at line 117 of file xml_file_loader.h.
|
protected |
Definition at line 106 of file xml_file_loader.h.