1#ifndef CYCLUS_SRC_XML_FILE_LOADER_H_
2#define CYCLUS_SRC_XML_FILE_LOADER_H_
7#include <boost/shared_ptr.hpp>
27 std::string
format=
"none");
41 std::string
format=
"none");
a holding class for information related to a TradeExecutor
The abstract base class used by all types of agents that live and interact in a simulation.
boost::shared_ptr< Composition > Ptr
A simulation context provides access to necessary simulation-global functions and state.
A class for extracting information from a given XML parser.
Interface implemented by backends that support rudimentary querying.
Collects and manages output data generation for the cyclus core and agents during a simulation.
Controls simulation timestepping and inter-timestep phases.
Handles initialization of a database with information from a cyclus xml input file.
void LoadRecipe(InfileTree *qe)
loads a specific recipe
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 ba...
void LoadPackages()
Loads packages.
void LoadRecipes()
Method to load recipes from either the primary input file or a recipeBook catalog.
std::string format_
the input file format
void LoadControlParams()
Method to load the simulation control parameters.
boost::shared_ptr< XMLParser > parser_
the parser
void LoadSolver()
Method to load the simulation exchange solver.
void LoadSpecs()
Load agent specs from the input file to a map by alias.
bool ms_print_
flag to indicate printing master schema
virtual std::string master_schema()
std::string schema_path_
filepath to the schema
void LoadTransportUnits()
Loads Transport Units.
std::map< std::string, AgentSpec > specs_
virtual void LoadInitialAgents()
Creates all initial agent instances from the input file.
Agent * BuildAgent(std::string proto, Agent *parent)
Creates and builds an agent, notifying its parent.
void ProcessCommodities(std::map< std::string, double > *commodity_priority)
Processes commodity priorities, such that any without a defined priority (i.e., are nonpositive),...
std::string file_
the input file name
virtual void LoadSim()
Load an entire simulation from the inputfile.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
void LoadRawStringstreamFromFile(std::stringstream &stream, std::string file)
Reads the given file path into the passed stream without modification.
Composition::Ptr ReadRecipe(InfileTree *qe)
Creates a composition from the recipe in the query engine.
void LoadStringstreamFromFile(std::stringstream &stream, std::string file, std::string format)
Reads the given file path as XML into the passed stream.
std::string BuildMasterSchema(std::string schema_path, std::string infile, std::string format)
Builds and returns a master cyclus input xml schema that includes the sub-schemas defined by all inst...
std::string LoadStringFromFile(std::string file, std::string format)
Reads the given file path and returns an XML string.
std::vector< AgentSpec > ParseSpecs(std::string infile, std::string format)
Returns a list of the full module+agent spec for all agents in the given input file.
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters