CYCLUS
Public Member Functions | Protected Member Functions | List of all members
cyclus::InfileTree Class Reference

Detailed Description

A class for extracting information from a given XML parser.

Definition at line 22 of file infile_tree.h.

#include <infile_tree.h>

Public Member Functions

virtual std::string GetElementName (int index=0)
 
virtual std::string GetString (std::string query, int index=0)
 
 InfileTree (XMLParser &parser)
 
virtual int NElements ()
 
virtual int NMatches (std::string query)
 
InfileTreeSubTree (std::string query, int index=0)
 
virtual ~InfileTree ()
 

Protected Member Functions

virtual InfileTreeGetEngineFromQuery (std::string query, int index)
 
 InfileTree (xmlpp::Node *node)
 
void SetCurrentNode (xmlpp::Node *node)
 

Constructor & Destructor Documentation

cyclus::InfileTree::InfileTree ( XMLParser parser)

constructor given a parser

Parameters
parserthe xml parser

Definition at line 14 of file infile_tree.cc.

cyclus::InfileTree::~InfileTree ( )
virtual

Definition at line 23 of file infile_tree.cc.

cyclus::InfileTree::InfileTree ( xmlpp::Node *  node)
protected

constructor given a node

Parameters
nodethe node to set as the current node

Definition at line 19 of file infile_tree.cc.

Member Function Documentation

std::string cyclus::InfileTree::GetElementName ( int  index = 0)
virtual

investigates the current status and returns a string representing the name of a given index

Parameters
indexthe index of the queried element

Definition at line 93 of file infile_tree.cc.

InfileTree * cyclus::InfileTree::GetEngineFromQuery ( std::string  query,
int  index 
)
protectedvirtual

every derived infile must return a new instance initialized by a query.

Parameters
querythe query
indexthe index of the queried element
Returns
a infile initialized via the snippet

Definition at line 113 of file infile_tree.cc.

std::string cyclus::InfileTree::GetString ( std::string  query,
int  index = 0 
)
virtual

investigates the current status and returns a string representing the content of a query at a given index

Parameters
querythe query
indexthe index of the queried element

Definition at line 54 of file infile_tree.cc.

int cyclus::InfileTree::NElements ( )
virtual
Returns
the number of elements in the current query state

Definition at line 34 of file infile_tree.cc.

int cyclus::InfileTree::NMatches ( std::string  query)
virtual

investigates the current status and returns the number of elements matching a query

Parameters
querythe query
Returns
the number of elements matching the query

Definition at line 49 of file infile_tree.cc.

void cyclus::InfileTree::SetCurrentNode ( xmlpp::Node *  node)
protected

sets the current node to a given node

Parameters
nodethe new current node
InfileTree * cyclus::InfileTree::SubTree ( std::string  query,
int  index = 0 
)

populates a child infile based on a query and index

Parameters
querythe query
indexthe index of the queried element
Returns
a initialized infile based on the query and index

Definition at line 132 of file infile_tree.cc.


The documentation for this class was generated from the following files: