CYCLUS
Loading...
Searching...
No Matches
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

◆ InfileTree() [1/2]

cyclus::InfileTree::InfileTree ( XMLParser & parser)

constructor given a parser

Parameters
parserthe xml parser

Definition at line 22 of file infile_tree.cc.

◆ ~InfileTree()

cyclus::InfileTree::~InfileTree ( )
virtual

Definition at line 31 of file infile_tree.cc.

◆ InfileTree() [2/2]

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

constructor given a node

Parameters
nodethe node to set as the current node

Definition at line 27 of file infile_tree.cc.

Member Function Documentation

◆ GetElementName()

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 100 of file infile_tree.cc.

◆ GetEngineFromQuery()

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 120 of file infile_tree.cc.

◆ GetString()

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 62 of file infile_tree.cc.

◆ NElements()

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

Definition at line 42 of file infile_tree.cc.

◆ NMatches()

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 57 of file infile_tree.cc.

◆ SetCurrentNode()

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

sets the current node to a given node

Parameters
nodethe new current node

◆ SubTree()

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 139 of file infile_tree.cc.


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