Cantera
2.0
|
Class XML_Node is a tree-based representation of the contents of an XML file. More...
#include <xml.h>
Public Member Functions | |
XML_Node (const char *cnm=0) | |
Default constructor for XML_Node, representing a tree structure. | |
XML_Node (const std::string nm, XML_Node *const parent) | |
Default constructor for XML_Node, representing a tree structure. | |
XML_Node (const XML_Node &right) | |
Copy constructor. | |
XML_Node & | operator= (const XML_Node &right) |
Assignment operator for XML trees. | |
virtual | ~XML_Node () |
Destructor for the object. | |
void | addComment (const std::string &comment) |
Add a child node to the current node containing a comment. | |
XML_Node & | mergeAsChild (XML_Node &node) |
Merge an existing node as a child node to the current node. | |
XML_Node & | addChild (const XML_Node &node) |
XML_Node & | addChild (const std::string &sname) |
Add a child node to the current node with a specified name. | |
XML_Node & | addChild (const char *cstring) |
Add a child node to the current node with a specified name. | |
XML_Node & | addChild (const std::string &name, const std::string &value) |
Add a child node to the current xml node, and at the same time add a value to the child. | |
XML_Node & | addChild (const std::string &name, const doublereal value, const std::string fmt="%g") |
Add a child node to the current xml node, and at the same time add a formatted value to the child. | |
void | removeChild (const XML_Node *const node) |
Remove a child from this node's list of children. | |
void | addValue (const std::string &val) |
Modify the value for the current node. | |
void | addValue (const doublereal val, const std::string fmt="%g") |
Modify the value for the current node. | |
std::string | value () const |
Return the value of an XML node as a string. | |
std::string | operator() () const |
Overloaded parenthesis operator returns the value of the Node. | |
std::string | value (const std::string &cname) const |
Return the value of an XML child node as a string. | |
std::string | operator() (std::string cname) const |
The Overloaded parenthesis operator with one augment returns the value of an XML child node as a string. | |
doublereal | fp_value () const |
Return the value of an XML node as a single double. | |
integer | int_value () const |
Return the value of an XML node as a single int. | |
void | addAttribute (const std::string &attrib, const std::string &value) |
Add or modify an attribute of the current node. | |
void | addAttribute (const std::string &attrib, const doublereal value, const std::string fmt="%g") |
Add or modify an attribute to the double, value. | |
std::string | operator[] (const std::string &attr) const |
The operator[] is overloaded to provide a lookup capability on attributes for the current XML element. | |
std::string | attrib (const std::string &attr) const |
Function returns the value of an attribute. | |
void | clear () |
Clear the current node and everything under it. | |
const std::map< std::string, std::string > & | attribsConst () const |
Returns an unchangeable value of the attributes map for the current node. | |
void | setLineNumber (const int n) |
Set the line number. | |
int | lineNumber () const |
Return the line number. | |
XML_Node * | parent () const |
Returns a pointer to the parent node of the current node. | |
XML_Node * | setParent (XML_Node *const p) |
Sets the pointer for the parent node of the current node. | |
bool | hasChild (const std::string ch) const |
Tests whether the current node has a child node with a particular name. | |
bool | hasAttrib (std::string a) const |
Tests whether the current node has an attribute with a particular name. | |
std::string | name () const |
Returns the name of the XML node. | |
void | setName (std::string name) |
Sets the name of the XML node. | |
std::string | id () const |
Return the id attribute, if present. | |
XML_Node & | child (const size_t n) const |
Return a changeable reference to the n'th child of the current node. | |
const std::vector< XML_Node * > & | children () const |
Return an unchangeable reference to the vector of children of the current node. | |
size_t | nChildren (bool discardComments=false) const |
Return the number of children. | |
bool | isComment () const |
Boolean function indicating whether a comment. | |
void | _require (const std::string &a, const std::string &v) const |
Require that the current xml node have an attribute named by the first argument, a, and that this attribute have the the string value listed in the second argument, v. | |
XML_Node * | findNameID (const std::string &nameTarget, const std::string &idTarget) const |
This routine carries out a recursive search for an XML node based on both the xml element name and the attribute ID. | |
XML_Node * | findNameIDIndex (const std::string &nameTarget, const std::string &idTarget, const int index) const |
This routine carries out a search for an XML node based on both the xml element name and the attribute ID and an integer index. | |
XML_Node * | findID (const std::string &id, const int depth=100) const |
This routine carries out a recursive search for an XML node based on the xml element attribute, "id". | |
XML_Node * | findByAttr (const std::string &attr, const std::string &val, int depth=100000) const |
This routine carries out a recursive search for an XML node based on an attribute of each XML node. | |
const XML_Node * | findByName (const std::string &nm, int depth=100000) const |
This routine carries out a recursive search for an XML node based on the name of the node. | |
XML_Node * | findByName (const std::string &nm, int depth=100000) |
This routine carries out a recursive search for an XML node based on the name of the node. | |
void | getChildren (const std::string &name, std::vector< XML_Node * > &children) const |
Get a vector of pointers to XML_Node containing all of the children of the current node which matches the input name. | |
XML_Node & | child (const std::string &loc) const |
Return a changeable reference to a child of the current node, named by the argument. | |
void | writeHeader (std::ostream &s) |
Write the header to the xml file to the specified ostream. | |
void | write (std::ostream &s, const int level=0, int numRecursivesAllowed=60000) const |
Write an XML subtree to an output stream. | |
XML_Node & | root () const |
Return the root of the current XML_Node tree. | |
void | setRoot (const XML_Node &root) |
Set the root XML_Node value within the current node. | |
void | build (std::istream &f) |
Main routine to create an tree-like representation of an XML file. | |
void | copyUnion (XML_Node *const node_dest) const |
Copy all of the information in the current XML_Node tree into the destination XML_Node tree, doing a union operation as we go. | |
void | copy (XML_Node *const node_dest) const |
Copy all of the information in the current XML_Node tree into the destination XML_Node tree, doing a complete copy as we go. | |
void | lock () |
Set the lock for this node and all of its children. | |
void | unlock () |
Unset the lock for this node and all of its children. | |
Protected Attributes | |
std::string | m_name |
XML node name of the node. | |
std::string | m_value |
Value of the xml node. | |
std::multimap< std::string, XML_Node * > | m_childindex |
Map containing an index between the node name and the pointer to the node. | |
std::map< std::string, std::string > | m_attribs |
Storage of attributes for a node. | |
XML_Node * | m_parent |
Pointer to the parent XML_Node for the current node. | |
XML_Node * | m_root |
Pointer to the root XML_Node for the current node. | |
bool | m_locked |
Lock for this node. | |
std::vector< XML_Node * > | m_children |
Vector of pointers to child nodes. | |
size_t | m_nchildren |
Number of children of this node. | |
bool | m_iscomment |
True if the current node is a comment node. | |
int | m_linenum |
The member data m_linenum. | |
Private Member Functions | |
std::map< std::string, std::string > & | attribs () |
Returns a changeable value of the attributes map for the current node. | |
void | write_int (std::ostream &s, int level=0, int numRecursivesAllowed=60000) const |
Write an XML subtree to an output stream. | |
Class XML_Node is a tree-based representation of the contents of an XML file.
Class XML_Node is a tree-based representation of the contents of an XML file.
There are routines for adding to the tree.
There are routines for querying and searching the tree.
Additionally, there are routines for writing the tree out to an output file.
XML_Node | ( | const char * | cnm = 0 | ) |
Default constructor for XML_Node, representing a tree structure.
Constructor for an XML_Node, which is a node in a tree-like structure representing an XML file.
cnm | Name of the node. The default name of the node is "–" |
Definition at line 423 of file xml.cpp.
References XML_Node::m_name, and XML_Node::m_root.
Referenced by XML_Node::addChild().
Default constructor for XML_Node, representing a tree structure.
Constructor for an XML_Node, which is a node in a tree-like structure representing an XML file.
nm | Name of the node. The default name of the node is "–" |
parent | Pointer to the parent for this node in the tree. A value of 0 indicates this is the top of the tree. |
Definition at line 452 of file xml.cpp.
References XML_Node::m_root, and XML_Node::root().
Copy constructor.
right | Object to be copied |
Definition at line 473 of file xml.cpp.
References XML_Node::copy(), XML_Node::m_name, XML_Node::m_root, and XML_Node::m_value.
|
virtual |
Destructor for the object.
Definition at line 512 of file xml.cpp.
References XML_Node::m_children, XML_Node::m_locked, XML_Node::name(), and XML_Node::parent().
Assignment operator for XML trees.
right | XML tree to copy |
Definition at line 493 of file xml.cpp.
References XML_Node::copy(), XML_Node::m_children, and XML_Node::parent().
void addComment | ( | const std::string & | comment | ) |
Add a child node to the current node containing a comment.
Child node will have the name, comment.
comment | Content of the comment |
Definition at line 556 of file xml.cpp.
Referenced by XML_Node::build().
Merge an existing node as a child node to the current node.
This will merge an XML_Node as a child to the current node. Note, this actually adds the node. Therefore, the current node is changed. There is no copy made of the child node. The child node should not be deleted in the future
node | Reference to a child XML_Node object |
This will merge an XML_Node as a child to the current node. Note, this actually adds the node. Therefore, the current node is changed. There is no copy made of the child node. The child node should not be deleted in the future.
node | Reference to a child XML_Node object |
Definition at line 572 of file xml.cpp.
References XML_Node::m_childindex, XML_Node::m_children, XML_Node::m_nchildren, XML_Node::name(), XML_Node::root(), XML_Node::setParent(), and XML_Node::setRoot().
XML_Node & addChild | ( | const std::string & | sname | ) |
Add a child node to the current node with a specified name.
This will add an XML_Node as a child to the current node. The node will be blank except for the specified name.
sname | Name of the new child |
Definition at line 612 of file xml.cpp.
References XML_Node::m_childindex, XML_Node::m_children, XML_Node::m_nchildren, XML_Node::root(), XML_Node::setParent(), XML_Node::setRoot(), and XML_Node::XML_Node().
XML_Node & addChild | ( | const char * | cstring | ) |
Add a child node to the current node with a specified name.
This will add an XML_Node as a child to the current node. The node will be blank except for the specified name.
cstring | Name of the new child as a c string |
XML_Node & addChild | ( | const std::string & | name, |
const std::string & | value | ||
) |
Add a child node to the current xml node, and at the same time add a value to the child.
Resulting XML string: <name> value </name>
Definition at line 638 of file xml.cpp.
References XML_Node::addValue().
XML_Node & addChild | ( | const std::string & | name, |
const doublereal | value, | ||
const std::string | fmt = "%g" |
||
) |
Add a child node to the current xml node, and at the same time add a formatted value to the child.
This version supplies a formatting string (printf format) to the output of the value.
Resulting XML string: <name> value </name>
name | Name of the child XML_Node object |
value | Value of the XML_Node - double. |
fmt | Format of the output for value |
Definition at line 660 of file xml.cpp.
References XML_Node::addValue().
void removeChild | ( | const XML_Node *const | node | ) |
Remove a child from this node's list of children.
This function removes an XML_Node from the children of this node.
node | Pointer to the node to be removed. Note, this node isn't modified in any way. |
Definition at line 675 of file xml.cpp.
References XML_Node::m_childindex, XML_Node::m_children, XML_Node::m_nchildren, and XML_Node::name().
void addValue | ( | const std::string & | val | ) |
Modify the value for the current node.
This functions fills in the m_value field of the current node
val | string Value that the node will be assigned |
Definition at line 698 of file xml.cpp.
References XML_Node::m_iscomment, XML_Node::m_name, and XML_Node::m_value.
Referenced by XML_Node::addChild(), XML_Node::build(), XML_Node::copy(), and XML_Node::copyUnion().
void addValue | ( | const doublereal | val, |
const std::string | fmt = "%g" |
||
) |
Modify the value for the current node.
This functions fills in the m_value field of the current node with a formatted double value
val | double Value that the node will be assigned |
fmt | Format of the printf string conversion of the double. Default is "%g". Must be less than 63 chars |
Definition at line 715 of file xml.cpp.
References Cantera::fp2str(), XML_Node::m_value, and Cantera::stripws().
std::string value | ( | ) | const |
Return the value of an XML node as a string.
This is a simple accessor routine
Definition at line 724 of file xml.cpp.
References XML_Node::m_value.
Referenced by XML_Node::addAttribute(), ctml::getFloatArray(), ctml::getNamedStringValue(), ctml::getStringArray(), XML_Node::operator()(), HMWSoln::readXMLBinarySalt(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), and XML_Node::value().
std::string operator() | ( | ) | const |
Overloaded parenthesis operator returns the value of the Node.
Definition at line 733 of file xml.cpp.
References XML_Node::m_value.
std::string value | ( | const std::string & | cname | ) | const |
Return the value of an XML child node as a string.
cname | Name of the child node to the current node, for which you want the value |
Definition at line 763 of file xml.cpp.
References XML_Node::child(), and XML_Node::value().
std::string operator() | ( | std::string | cname | ) | const |
The Overloaded parenthesis operator with one augment returns the value of an XML child node as a string.
cname | Name of the child node to the current node, for which you want the value |
Definition at line 774 of file xml.cpp.
References XML_Node::value().
doublereal fp_value | ( | ) | const |
Return the value of an XML node as a single double.
This accesses the value string, and then tries to interpret it as a single double value.
Definition at line 743 of file xml.cpp.
References Cantera::atofCheck(), and XML_Node::m_value.
integer int_value | ( | ) | const |
Return the value of an XML node as a single int.
This accesses the value string, and then tries to interpret it as a single int value.
Definition at line 753 of file xml.cpp.
References XML_Node::m_value.
void addAttribute | ( | const std::string & | attrib, |
const std::string & | value | ||
) |
Add or modify an attribute of the current node.
This functions fills in the m_value field of the current node with a string value
attrib | String name for the attribute to be assigned |
value | String value that the attribute will have |
Definition at line 787 of file xml.cpp.
References XML_Node::attrib(), XML_Node::m_attribs, and XML_Node::value().
Referenced by ctml::addBool(), ctml::addFloat(), ctml::addFloatArray(), ctml::addInteger(), ctml::addIntegerArray(), ctml::addString(), XML_Node::copy(), XML_Node::copyUnion(), FixedChemPotSSTP::FixedChemPotSSTP(), MetalSHEelectrons::makeDefaultXMLTree(), Inlet1D::save(), StFlow::save(), Empty1D::save(), Symm1D::save(), OutletRes1D::save(), Surf1D::save(), and ReactingSurf1D::save().
void addAttribute | ( | const std::string & | attrib, |
const doublereal | value, | ||
const std::string | fmt = "%g" |
||
) |
Add or modify an attribute to the double, value.
This functions fills in the attribute field, named attrib, with the double value, value. A formatting string is used.
attrib | String name for the attribute to be assigned |
value | double Value that the node will be assigned |
fmt | Format of the printf string conversion of the double. Default is "%g". |
Definition at line 802 of file xml.cpp.
References XML_Node::attrib(), Cantera::fp2str(), and XML_Node::m_attribs.
std::string operator[] | ( | const std::string & | attr | ) | const |
The operator[] is overloaded to provide a lookup capability on attributes for the current XML element.
For example xmlNode["id"] will return the value of the attribute "id" for the current XML element. It will return the blank std::string if there isn't an attribute with that name.
attr | attribute string to look up |
Definition at line 823 of file xml.cpp.
References XML_Node::attrib().
std::string attrib | ( | const std::string & | attr | ) | const |
Function returns the value of an attribute.
This function searches the attributes vector for the parameter std::string attribute. If a match is found, the attribute value is returned as a string. If no match is found, the empty string is returned.
attr | Std::String containing the attribute to be searched for. |
Definition at line 841 of file xml.cpp.
References XML_Node::m_attribs.
Referenced by XML_Node::_require(), XML_Node::addAttribute(), MolarityIonicVPSSTP::constructPhaseXML(), RedlichKisterVPSSTP::constructPhaseXML(), MargulesVPSSTP::constructPhaseXML(), MixedSolventElectrolyte::constructPhaseXML(), PhaseCombo_Interaction::constructPhaseXML(), IonsFromNeutralVPSSTP::constructPhaseXML(), IdealSolidSolnPhase::constructPhaseXML(), DebyeHuckel::constructPhaseXML(), HMWSoln::constructPhaseXML(), XML_Node::copyUnion(), XML_Node::findByAttr(), XML_Node::findID(), XML_Node::findNameIDIndex(), TransportFactory::getLiquidInteractionsTransportData(), Cantera::getRateCoefficient(), Cantera::getSpeciesThermoTypes(), Cantera::getVPSSMgrTypes(), XML_Node::id(), LiquidTranInteraction::init(), SimpleTransport::initLiquid(), IdealSolnGasVPSS::initThermoXML(), MolarityIonicVPSSTP::initThermoXML(), MineralEQ3::initThermoXML(), PhaseCombo_Interaction::initThermoXML(), RedlichKisterVPSSTP::initThermoXML(), MargulesVPSSTP::initThermoXML(), MixedSolventElectrolyte::initThermoXML(), IdealMolalSoln::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), TransportFactory::newTransport(), XML_Node::operator[](), HMWSoln::readXMLBinarySalt(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), RedlichKwongMFTP::readXMLCrossFluid(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), RedlichKwongMFTP::readXMLPureFluid(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), and HMWSoln::readXMLZetaCation().
void clear | ( | ) |
Clear the current node and everything under it.
The value, attributes and children are all zeroed. The name and the parent information is kept.
Definition at line 528 of file xml.cpp.
References XML_Node::m_attribs, XML_Node::m_childindex, XML_Node::m_children, XML_Node::m_iscomment, XML_Node::m_linenum, XML_Node::m_nchildren, XML_Node::m_value, and XML_Node::parent().
Referenced by Cantera::importPhase().
|
private |
Returns a changeable value of the attributes map for the current node.
Note this is a simple accessor routine. And, it is a private function. It's used in some internal copy and assignment routines
Definition at line 855 of file xml.cpp.
References XML_Node::m_attribs.
Referenced by XML_Node::build().
const std::map< std::string, std::string > & attribsConst | ( | ) | const |
Returns an unchangeable value of the attributes map for the current node.
Definition at line 860 of file xml.cpp.
References XML_Node::m_attribs.
void setLineNumber | ( | const int | n | ) |
Set the line number.
n | the member data m_linenum is set to n |
Definition at line 869 of file xml.cpp.
References XML_Node::m_linenum.
Referenced by XML_Node::build(), and XML_Node::copy().
int lineNumber | ( | ) | const |
Return the line number.
Definition at line 878 of file xml.cpp.
References XML_Node::m_linenum.
Referenced by XML_Node::child().
XML_Node * parent | ( | ) | const |
Returns a pointer to the parent node of the current node.
Definition at line 884 of file xml.cpp.
References XML_Node::m_parent.
Referenced by XML_Node::build(), XML_Node::clear(), ctml::getByTitle(), Cantera::importKinetics(), XML_Node::operator=(), and XML_Node::~XML_Node().
Sets the pointer for the parent node of the current node.
p | Pointer to the parent node |
Definition at line 895 of file xml.cpp.
References XML_Node::m_parent.
Referenced by XML_Node::addChild(), and XML_Node::mergeAsChild().
bool hasChild | ( | const std::string | ch | ) | const |
Tests whether the current node has a child node with a particular name.
ch | Name of the child node to test |
Definition at line 907 of file xml.cpp.
References XML_Node::m_childindex.
Referenced by Elements::addElementsFromXML(), Phase::addElementsFromXML(), Elements::addUniqueElement(), Phase::addUniqueElement(), PDSS_HKFT::constructPDSSXML(), MolarityIonicVPSSTP::constructPhaseXML(), RedlichKisterVPSSTP::constructPhaseXML(), MargulesVPSSTP::constructPhaseXML(), MixedSolventElectrolyte::constructPhaseXML(), PhaseCombo_Interaction::constructPhaseXML(), IonsFromNeutralVPSSTP::constructPhaseXML(), IdealMolalSoln::constructPhaseXML(), IdealSolidSolnPhase::constructPhaseXML(), DebyeHuckel::constructPhaseXML(), HMWSoln::constructPhaseXML(), ctml::getChildValue(), ctml::getFloat(), ctml::getInteger(), TransportFactory::getLiquidInteractionsTransportData(), TransportFactory::getLiquidSpeciesTransportData(), ctml::getNamedStringValue(), ctml::getOptionalFloat(), ctml::getOptionalModel(), Cantera::getReagents(), Cantera::getSpeciesThermoTypes(), Cantera::getVPSSMgrTypes(), Cantera::importKinetics(), Cantera::importPhase(), LiquidTranInteraction::init(), SimpleTransport::initLiquid(), IdealSolnGasVPSS::initThermoXML(), MolarityIonicVPSSTP::initThermoXML(), StoichSubstanceSSTP::initThermoXML(), MetalSHEelectrons::initThermoXML(), MineralEQ3::initThermoXML(), RedlichKwongMFTP::initThermoXML(), FixedChemPotSSTP::initThermoXML(), PhaseCombo_Interaction::initThermoXML(), RedlichKisterVPSSTP::initThermoXML(), MargulesVPSSTP::initThermoXML(), MixedSolventElectrolyte::initThermoXML(), IdealMolalSoln::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), ThermoPhase::initThermoXML(), HMWSoln::initThermoXML(), Cantera::installAdsorbateThermoFromXML(), Cantera::installMu0ThermoFromXML(), Cantera::installNasa9ThermoFromXML(), rxninfo::installReaction(), Cantera::installReactionArrays(), Cantera::installSpecies(), SpeciesThermoFactory::installThermoForSpecies(), LTPspecies::LTPspecies(), TransportFactory::newTransport(), VPSSMgrFactory::newVPSSMgr(), HMWSoln::readXMLCroppingCoefficients(), MetalSHEelectrons::setParametersFromXML(), SurfPhase::setStateFromXML(), MixtureFugacityTP::setStateFromXML(), MolalityVPSSTP::setStateFromXML(), ThermoPhase::setStateFromXML(), and TransportFactory::setupLiquidTransport().
bool hasAttrib | ( | std::string | a | ) | const |
Tests whether the current node has an attribute with a particular name.
a | Name of the attribute to test |
Definition at line 918 of file xml.cpp.
References XML_Node::m_attribs.
Referenced by XML_Node::_require(), Elements::addElementsFromXML(), Phase::addElementsFromXML(), Elements::addUniqueElement(), Phase::addUniqueElement(), XML_Node::copyUnion(), XML_Node::findByAttr(), XML_Node::findID(), XML_Node::id(), Cantera::importPhase(), MineralEQ3::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), Cantera::installAdsorbateThermoFromXML(), Cantera::installNasaThermoFromXML(), rxninfo::installReaction(), and Cantera::installShomateThermoFromXML().
|
inline |
Returns the name of the XML node.
The name is the XML node is the XML node name
Definition at line 470 of file xml.h.
References XML_Node::m_name.
Referenced by XML_Node::_require(), XML_Node::build(), PDSS_ConstVol::constructPDSSXML(), PDSS_HKFT::constructPDSSXML(), PDSS_IonsFromNeutral::constructPDSSXML(), PDSS_SSVol::constructPDSSXML(), XML_Node::copy(), XML_Node::copyUnion(), VPSSMgr_IdealGas::createInstallPDSS(), VPSSMgr_ConstVol::createInstallPDSS(), VPSSMgr_Water_ConstVol::createInstallPDSS(), XML_Node::findByName(), XML_Node::findNameID(), XML_Node::findNameIDIndex(), Cantera::findXMLPhase(), XML_Node::getChildren(), ctml::getFloat(), ctml::getFloatArray(), ctml::getFloatCurrent(), ctml::getInteger(), TransportFactory::getLiquidInteractionsTransportData(), TransportFactory::getLiquidSpeciesTransportData(), ctml::getNamedStringValue(), Cantera::getRateCoefficient(), ctml::getString(), Cantera::importPhase(), LiquidTranInteraction::init(), VPSSMgr_ConstVol::initThermoXML(), MolarityIonicVPSSTP::initThermoXML(), RedlichKwongMFTP::initThermoXML(), PhaseCombo_Interaction::initThermoXML(), RedlichKisterVPSSTP::initThermoXML(), MargulesVPSSTP::initThermoXML(), MixedSolventElectrolyte::initThermoXML(), HMWSoln::initThermoXML(), Cantera::installNasa9ThermoFromXML(), rxninfo::installReaction(), Cantera::installSpecies(), SpeciesThermoFactory::installThermoForSpecies(), LTPspecies_Arrhenius::LTPspecies_Arrhenius(), LTPspecies_Const::LTPspecies_Const(), XML_Node::mergeAsChild(), HMWSoln::readXMLBinarySalt(), MolarityIonicVPSSTP::readXMLBinarySpecies(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), RedlichKwongMFTP::readXMLCrossFluid(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), RedlichKwongMFTP::readXMLPureFluid(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), XML_Node::removeChild(), XML_Node::setName(), Cantera::speciesXML_Node(), and XML_Node::~XML_Node().
|
inline |
Sets the name of the XML node.
name | The name of the XML node |
Definition at line 478 of file xml.h.
References XML_Node::m_name, and XML_Node::name().
Referenced by XML_Node::copy().
std::string id | ( | ) | const |
Return the id attribute, if present.
Returns the id attribute if present. If not it return the empty string
Definition at line 684 of file xml.cpp.
References XML_Node::attrib(), and XML_Node::hasAttrib().
Referenced by MolarityIonicVPSSTP::constructPhaseXML(), LatticePhase::constructPhaseXML(), RedlichKisterVPSSTP::constructPhaseXML(), MargulesVPSSTP::constructPhaseXML(), MixedSolventElectrolyte::constructPhaseXML(), PhaseCombo_Interaction::constructPhaseXML(), IonsFromNeutralVPSSTP::constructPhaseXML(), IdealMolalSoln::constructPhaseXML(), IdealSolidSolnPhase::constructPhaseXML(), DebyeHuckel::constructPhaseXML(), HMWSoln::constructPhaseXML(), XML_Node::findNameID(), XML_Node::findNameIDIndex(), Cantera::findXMLPhase(), Cantera::importPhase(), and IdealMolalSoln::initThermoXML().
XML_Node & child | ( | const size_t | n | ) | const |
Return a changeable reference to the n'th child of the current node.
n | Number of the child to return |
Definition at line 927 of file xml.cpp.
References XML_Node::m_children.
Referenced by Elements::addElementsFromXML(), Phase::addElementsFromXML(), Elements::addUniqueElement(), Phase::addUniqueElement(), PDSS_ConstVol::constructPDSSFile(), PDSS_HKFT::constructPDSSFile(), PDSS_IonsFromNeutral::constructPDSSFile(), PDSS_SSVol::constructPDSSFile(), MolarityIonicVPSSTP::constructPhaseXML(), RedlichKisterVPSSTP::constructPhaseXML(), MargulesVPSSTP::constructPhaseXML(), MixedSolventElectrolyte::constructPhaseXML(), PhaseCombo_Interaction::constructPhaseXML(), IonsFromNeutralVPSSTP::constructPhaseXML(), IdealSolidSolnPhase::constructPhaseXML(), DebyeHuckel::constructPhaseXML(), HMWSoln::constructPhaseXML(), electrodeElectron::electrodeElectron(), FixedChemPotSSTP::FixedChemPotSSTP(), XML_Node::getChildren(), ctml::getFloat(), ctml::getFunction(), ctml::getInteger(), TransportFactory::getLiquidInteractionsTransportData(), TransportFactory::getLiquidSpeciesTransportData(), ctml::getNamedStringValue(), ctml::getOptionalModel(), Cantera::getRateCoefficient(), Cantera::getReagents(), Cantera::getSpeciesThermoTypes(), TransportFactory::getTransportData(), Cantera::getVPSSMgrTypes(), Cantera::importKinetics(), Cantera::importPhase(), LiquidTranInteraction::init(), SimpleTransport::initLiquid(), VPSSMgr_ConstVol::initThermoXML(), VPSSMgr_Water_ConstVol::initThermoXML(), VPSSMgr_Water_HKFT::initThermoXML(), IdealSolnGasVPSS::initThermoXML(), MolarityIonicVPSSTP::initThermoXML(), StoichSubstanceSSTP::initThermoXML(), MetalSHEelectrons::initThermoXML(), MineralEQ3::initThermoXML(), RedlichKwongMFTP::initThermoXML(), FixedChemPotSSTP::initThermoXML(), PhaseCombo_Interaction::initThermoXML(), RedlichKisterVPSSTP::initThermoXML(), MargulesVPSSTP::initThermoXML(), MixedSolventElectrolyte::initThermoXML(), IdealMolalSoln::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), ThermoPhase::initThermoXML(), HMWSoln::initThermoXML(), Cantera::installAdsorbateThermoFromXML(), Cantera::installNasa9ThermoFromXML(), Cantera::installNasaThermoFromXML(), rxninfo::installReaction(), Cantera::installReactionArrays(), Cantera::installShomateThermoFromXML(), LatticeSolidPhase::installSlavePhases(), Cantera::installSpecies(), SpeciesThermoFactory::installThermoForSpecies(), MetalSHEelectrons::MetalSHEelectrons(), MineralEQ3::MineralEQ3(), KineticsFactory::newKinetics(), Cantera::newPhase(), TransportFactory::newTransport(), VPSSMgrFactory::newVPSSMgr(), HMWSoln::readXMLBinarySalt(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), HMWSoln::readXMLCroppingCoefficients(), RedlichKwongMFTP::readXMLCrossFluid(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), RedlichKwongMFTP::readXMLPureFluid(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), LatticeSolidPhase::setParametersFromXML(), TransportFactory::setupLiquidTransport(), StoichSubstanceSSTP::StoichSubstanceSSTP(), SurfPhase::SurfPhase(), and XML_Node::value().
const std::vector< XML_Node * > & children | ( | ) | const |
Return an unchangeable reference to the vector of children of the current node.
Each of the individual XML_Node child pointers, however, is to a changeable xml node object.
Definition at line 939 of file xml.cpp.
References XML_Node::m_children.
Referenced by XML_Node::copy(), XML_Node::copyUnion(), Cantera::findXMLPhase(), and SpeciesThermoFactory::installThermoForSpecies().
size_t nChildren | ( | bool | discardComments = false | ) | const |
Return the number of children.
discardComments | If true comments are discarded when adding up the number of children. Defaults to false. |
Definition at line 948 of file xml.cpp.
References XML_Node::isComment(), XML_Node::m_children, and XML_Node::m_nchildren.
Referenced by XML_Node::copy(), XML_Node::copyUnion(), XML_Node::findByAttr(), XML_Node::findByName(), XML_Node::findID(), Cantera::findXMLPhase(), XML_Node::getChildren(), TransportFactory::getLiquidInteractionsTransportData(), TransportFactory::getLiquidSpeciesTransportData(), Cantera::getRateCoefficient(), LiquidTranInteraction::init(), MolarityIonicVPSSTP::initThermoXML(), RedlichKwongMFTP::initThermoXML(), PhaseCombo_Interaction::initThermoXML(), RedlichKisterVPSSTP::initThermoXML(), MargulesVPSSTP::initThermoXML(), MixedSolventElectrolyte::initThermoXML(), HMWSoln::initThermoXML(), HMWSoln::readXMLBinarySalt(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), RedlichKwongMFTP::readXMLCrossFluid(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), RedlichKwongMFTP::readXMLPureFluid(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), and HMWSoln::readXMLZetaCation().
bool isComment | ( | ) | const |
Boolean function indicating whether a comment.
Definition at line 963 of file xml.cpp.
References XML_Node::m_iscomment.
Referenced by XML_Node::nChildren().
void _require | ( | const std::string & | a, |
const std::string & | v | ||
) | const |
Require that the current xml node have an attribute named by the first argument, a, and that this attribute have the the string value listed in the second argument, v.
a | attribute name |
v | required value of the attribute |
If the condition is not true, an exception is thrown
Definition at line 977 of file xml.cpp.
References XML_Node::attrib(), XML_Node::hasAttrib(), and XML_Node::name().
Referenced by SemiconductorPhase::setParametersFromXML(), EdgePhase::setParametersFromXML(), MetalPhase::setParametersFromXML(), SurfPhase::setParametersFromXML(), StoichSubstance::setParametersFromXML(), ConstDensityThermo::setParametersFromXML(), WaterSSTP::setParametersFromXML(), PureFluidPhase::setParametersFromXML(), LatticeSolidPhase::setParametersFromXML(), and LatticePhase::setParametersFromXML().
XML_Node * findNameID | ( | const std::string & | nameTarget, |
const std::string & | idTarget | ||
) | const |
This routine carries out a recursive search for an XML node based on both the xml element name and the attribute ID.
If exact matches are found for both fields, the pointer to the matching XML Node is returned.
The ID attribute may be defaulted by setting it to "". In this case the pointer to the first xml element matching the name only is returned.
nameTarget | Name of the XML Node that is being searched for |
idTarget | "id" attribute of the XML Node that the routine looks for |
This algorithm does a lateral search of first generation children first before diving deeper into each tree branch.
Definition at line 1011 of file xml.cpp.
References XML_Node::findNameID(), XML_Node::id(), XML_Node::m_children, XML_Node::m_nchildren, and XML_Node::name().
Referenced by XML_Node::findNameID(), and Cantera::get_XML_NameID().
XML_Node * findNameIDIndex | ( | const std::string & | nameTarget, |
const std::string & | idTarget, | ||
const int | index | ||
) | const |
This routine carries out a search for an XML node based on both the xml element name and the attribute ID and an integer index.
If exact matches are found for all fields, the pointer to the matching XML Node is returned. The search is only carried out on the current element and the child elements of the current element.
The "id" attribute may be defaulted by setting it to "". In this case the pointer to the first xml element matching the name only is returned.
nameTarget | Name of the XML Node that is being searched for |
idTarget | "id" attribute of the XML Node that the routine looks for |
index | Integer describing the index. The index is an attribute of the form index = "3" |
Definition at line 1064 of file xml.cpp.
References XML_Node::attrib(), XML_Node::id(), Cantera::int2str(), XML_Node::m_children, XML_Node::m_nchildren, and XML_Node::name().
XML_Node * findID | ( | const std::string & | id, |
const int | depth = 100 |
||
) | const |
This routine carries out a recursive search for an XML node based on the xml element attribute, "id".
If exact match is found, the pointer to the matching XML Node is returned. If not, 0 is returned.
The ID attribute may be defaulted by setting it to "". In this case the pointer to the first xml element matching the name only is returned.
id | "id" attribute of the XML Node that the routine looks for |
depth | Depth of the search. |
This algorithm does a lateral search of first generation children first before diving deeper into each tree branch.
Definition at line 1121 of file xml.cpp.
References XML_Node::attrib(), XML_Node::hasAttrib(), XML_Node::m_children, and XML_Node::nChildren().
Referenced by Cantera::get_XML_Node(), and Sim1D::restore().
XML_Node * findByAttr | ( | const std::string & | attr, |
const std::string & | val, | ||
int | depth = 100000 |
||
) | const |
This routine carries out a recursive search for an XML node based on an attribute of each XML node.
If exact match is found with respect to the attribute name and value of the attribute, the pointer to the matching XML Node is returned. If not, 0 is returned.
attr | Attribute of the XML Node that the routine looks for |
val | Value of the attribute |
depth | Depth of the search. A value of 1 means that only the immediate children are searched. |
Definition at line 1155 of file xml.cpp.
References XML_Node::attrib(), XML_Node::hasAttrib(), XML_Node::m_children, and XML_Node::nChildren().
Referenced by Elements::addElementsFromXML(), Phase::addElementsFromXML(), PDSS_ConstVol::constructPDSSFile(), PDSS_HKFT::constructPDSSFile(), PDSS_IonsFromNeutral::constructPDSSFile(), PDSS_SSVol::constructPDSSFile(), Cantera::formSpeciesXMLNodeList(), ctml::getByTitle(), VPSSMgr_ConstVol::initThermoXML(), VPSSMgr_Water_ConstVol::initThermoXML(), VPSSMgr_Water_HKFT::initThermoXML(), IdealMolalSoln::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), and HMWSoln::initThermoXML().
const XML_Node * findByName | ( | const std::string & | nm, |
int | depth = 100000 |
||
) | const |
This routine carries out a recursive search for an XML node based on the name of the node.
If exact match is found with respect to XML_Node name, the pointer to the matching XML Node is returned. If not, 0 is returned. This is the const version of the routine.
nm | Name of the XML node |
depth | Depth of the search. A value of 1 means that only the immediate children are searched. |
Definition at line 1215 of file xml.cpp.
References XML_Node::m_children, XML_Node::name(), and XML_Node::nChildren().
Referenced by PDSS_ConstVol::constructPDSSXML(), PDSS_HKFT::constructPDSSXML(), PDSS_IonsFromNeutral::constructPDSSXML(), PDSS_SSVol::constructPDSSXML(), VPSSMgr_IdealGas::createInstallPDSS(), VPSSMgr_ConstVol::createInstallPDSS(), VPSSMgr_Water_ConstVol::createInstallPDSS(), VPSSMgr_Water_HKFT::createInstallPDSS(), VPSSMgr_ConstVol::initThermoXML(), VPSSMgr_Water_ConstVol::initThermoXML(), VPSSMgr_Water_HKFT::initThermoXML(), IdealMolalSoln::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), and VPSSMgr_General::returnPDSS_ptr().
XML_Node * findByName | ( | const std::string & | nm, |
int | depth = 100000 |
||
) |
This routine carries out a recursive search for an XML node based on the name of the node.
If exact match is found with respect to XML_Node name, the pointer to the matching XML Node is returned. If not, 0 is returned. This is the non-const version of the routine.
nm | Name of the XML node |
depth | Depth of the search. A value of 1 means that only the immediate children are searched. |
Definition at line 1187 of file xml.cpp.
References XML_Node::m_children, XML_Node::name(), and XML_Node::nChildren().
void getChildren | ( | const std::string & | name, |
std::vector< XML_Node * > & | children | ||
) | const |
Get a vector of pointers to XML_Node containing all of the children of the current node which matches the input name.
name | Name of the XML_Node children to search on |
children | output vector of pointers to XML_Node children with the matching name |
Definition at line 1418 of file xml.cpp.
References XML_Node::child(), XML_Node::name(), and XML_Node::nChildren().
Referenced by Cantera::formSpeciesXMLNodeList(), ctml::getFloatArray(), ctml::getFloats(), ctml::getIntegers(), Cantera::getReagents(), Cantera::importPhase(), Cantera::installReactionArrays(), LatticeSolidPhase::installSlavePhases(), LatticeSolidPhase::setParametersFromXML(), and Cantera::speciesXML_Node().
XML_Node & child | ( | const std::string & | loc | ) | const |
Return a changeable reference to a child of the current node, named by the argument.
Note the underlying data allows for more than one XML element with the same name. This routine returns the first child with the given name.
loc | Name of the child to return |
Definition at line 1433 of file xml.cpp.
References XML_Node::lineNumber(), XML_Node::m_childindex, XML_Node::m_name, and Cantera::npos.
void writeHeader | ( | std::ostream & | s | ) |
void write | ( | std::ostream & | s, |
const int | level = 0 , |
||
int | numRecursivesAllowed = 60000 |
||
) | const |
Write an XML subtree to an output stream.
This is a wrapper around the static routine write_int(). All this does is add an endl on to the output stream. write_int() is fine, but the last endl wasn't being written. It also checks for the special name "–". If found and we are at the root of the xml tree, then the block is skipped and the children are processed. "–" is used to denote the top of the tree.
s | ostream to write to |
level | Indentation level to work from |
numRecursivesAllowed | Number of recursive calls allowed |
Definition at line 1601 of file xml.cpp.
References XML_Node::m_children, XML_Node::m_name, XML_Node::m_nchildren, XML_Node::m_root, and XML_Node::write_int().
Referenced by XML_NoChild::XML_NoChild().
XML_Node & root | ( | ) | const |
Return the root of the current XML_Node tree.
Returns a reference to the root of the current XML tree
Definition at line 1614 of file xml.cpp.
References XML_Node::m_root.
Referenced by XML_Node::addChild(), Elements::addElementsFromXML(), Phase::addElementsFromXML(), PDSS_ConstVol::constructPDSSFile(), PDSS_HKFT::constructPDSSFile(), PDSS_IonsFromNeutral::constructPDSSFile(), PDSS_SSVol::constructPDSSFile(), Cantera::importPhase(), VPSSMgr_ConstVol::initThermoXML(), VPSSMgr_Water_ConstVol::initThermoXML(), VPSSMgr_Water_HKFT::initThermoXML(), IdealMolalSoln::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), HMWSoln::initThermoXML(), Cantera::installReactionArrays(), XML_Node::mergeAsChild(), XML_Node::setRoot(), and XML_Node::XML_Node().
void setRoot | ( | const XML_Node & | root | ) |
Set the root XML_Node value within the current node.
root | Value of the root XML_Node. |
Definition at line 1619 of file xml.cpp.
References XML_Node::m_children, XML_Node::m_nchildren, XML_Node::m_root, and XML_Node::root().
Referenced by XML_Node::addChild(), and XML_Node::mergeAsChild().
void build | ( | std::istream & | f | ) |
Main routine to create an tree-like representation of an XML file.
Given an input stream, this routine will read matched XML tags representing the ctml file until an EOF is read from the file. This routine is called by the root XML_Node object.
f | Input stream containing the ascii input file |
Definition at line 1249 of file xml.cpp.
References XML_Node::addComment(), XML_Node::addValue(), XML_Node::attribs(), XML_Reader::m_line, XML_Node::m_name, XML_Node::m_root, XML_Node::name(), XML_Node::parent(), XML_Reader::readTag(), XML_Reader::readValue(), and XML_Node::setLineNumber().
Referenced by PDSS_IdealGas::constructPDSSFile(), PDSS_ConstVol::constructPDSSFile(), PDSS_HKFT::constructPDSSFile(), PDSS_IonsFromNeutral::constructPDSSFile(), PDSS_Water::constructPDSSFile(), PDSS_SSVol::constructPDSSFile(), MolarityIonicVPSSTP::constructPhaseFile(), LatticePhase::constructPhaseFile(), RedlichKisterVPSSTP::constructPhaseFile(), MargulesVPSSTP::constructPhaseFile(), MixedSolventElectrolyte::constructPhaseFile(), WaterSSTP::constructPhaseFile(), PhaseCombo_Interaction::constructPhaseFile(), IonsFromNeutralVPSSTP::constructPhaseFile(), IdealMolalSoln::constructPhaseFile(), IdealSolidSolnPhase::constructPhaseFile(), DebyeHuckel::constructPhaseFile(), HMWSoln::constructPhaseFile(), ctml::get_CTML_Tree(), ThermoPhase::initThermoFile(), and Sim1D::restore().
void copyUnion | ( | XML_Node *const | node_dest | ) | const |
Copy all of the information in the current XML_Node tree into the destination XML_Node tree, doing a union operation as we go.
Note this is a const function because the current XML_Node and its children isn't altered by this operation. copyUnion() doesn't duplicate existing entries in the destination XML_Node tree.
node_dest | This is the XML node to receive the information |
Definition at line 1304 of file xml.cpp.
References XML_Node::addAttribute(), XML_Node::addValue(), XML_Node::attrib(), XML_Node::children(), XML_Node::copyUnion(), XML_Node::hasAttrib(), XML_Node::m_attribs, XML_Node::m_children, XML_Node::m_iscomment, XML_Node::m_name, XML_Node::m_nchildren, XML_Node::m_value, XML_Node::name(), and XML_Node::nChildren().
Referenced by XML_Node::copyUnion().
void copy | ( | XML_Node *const | node_dest | ) | const |
Copy all of the information in the current XML_Node tree into the destination XML_Node tree, doing a complete copy as we go.
Note this is a const function because the current XML_Node and its children isn't altered by this operation.
node_dest | This is the XML node to receive the information |
Definition at line 1367 of file xml.cpp.
References XML_Node::addAttribute(), XML_Node::addValue(), XML_Node::children(), XML_Node::copy(), XML_Node::m_attribs, XML_Node::m_children, XML_Node::m_linenum, XML_Node::m_name, XML_Node::m_nchildren, XML_Node::m_value, XML_Node::name(), XML_Node::nChildren(), XML_Node::setLineNumber(), and XML_Node::setName().
Referenced by MolarityIonicVPSSTP::constructPhaseFile(), LatticePhase::constructPhaseFile(), RedlichKisterVPSSTP::constructPhaseFile(), MargulesVPSSTP::constructPhaseFile(), MixedSolventElectrolyte::constructPhaseFile(), WaterSSTP::constructPhaseFile(), PhaseCombo_Interaction::constructPhaseFile(), IonsFromNeutralVPSSTP::constructPhaseFile(), IdealMolalSoln::constructPhaseFile(), IdealSolidSolnPhase::constructPhaseFile(), DebyeHuckel::constructPhaseFile(), HMWSoln::constructPhaseFile(), XML_Node::copy(), Cantera::importPhase(), ThermoPhase::initThermoFile(), XML_Node::operator=(), and XML_Node::XML_Node().
void lock | ( | ) |
Set the lock for this node and all of its children.
Definition at line 1393 of file xml.cpp.
References XML_Node::m_children, XML_Node::m_locked, and XML_Node::m_nchildren.
void unlock | ( | ) |
Unset the lock for this node and all of its children.
Definition at line 1402 of file xml.cpp.
References XML_Node::m_children, XML_Node::m_locked, and XML_Node::m_nchildren.
|
private |
Write an XML subtree to an output stream.
This is the main recursive routine. It doesn't put a final endl on. This is fixed up in the public method. A method to only write out a limited amount of the xml tree has been added.
s | ostream to write to |
level | Indentation level to work from |
numRecursivesAllowed | Number of recursive calls allowed |
Definition at line 1467 of file xml.cpp.
References XML_Node::m_attribs, XML_Node::m_children, XML_Node::m_iscomment, XML_Node::m_name, XML_Node::m_nchildren, XML_Node::m_value, and Cantera::npos.
Referenced by XML_Node::write().
|
protected |
XML node name of the node.
For example, if we were in the XML_Node where
* <phase dim="3" id="gas"> * </phase> *
Then, this string would be equal to "phase". "dim" and "id" are attributes of the XML_Node.
Definition at line 767 of file xml.h.
Referenced by XML_Node::addValue(), XML_Node::build(), XML_Node::child(), XML_Node::copy(), XML_Node::copyUnion(), XML_Node::name(), XML_Node::setName(), XML_Node::write(), XML_Node::write_int(), and XML_Node::XML_Node().
|
protected |
Value of the xml node.
This is the string contents of the XML node. For example. The xml node named eps:
\<eps\> valueString \</eps\>
has a m_value string containing "valueString".
Definition at line 780 of file xml.h.
Referenced by XML_Node::addValue(), XML_Node::clear(), XML_Node::copy(), XML_Node::copyUnion(), XML_Node::fp_value(), XML_Node::int_value(), XML_Node::operator()(), XML_Node::value(), XML_Node::write_int(), and XML_Node::XML_Node().
|
protected |
Map containing an index between the node name and the pointer to the node.
m_childindex[node.name()] = XML_Node *pointer
This object helps to speed up searches.
Definition at line 789 of file xml.h.
Referenced by XML_Node::addChild(), XML_Node::child(), XML_Node::clear(), XML_Node::hasChild(), XML_Node::mergeAsChild(), and XML_Node::removeChild().
|
protected |
Storage of attributes for a node.
m_attribs[attribName] = attribValue
Definition at line 795 of file xml.h.
Referenced by XML_Node::addAttribute(), XML_Node::attrib(), XML_Node::attribs(), XML_Node::attribsConst(), XML_Node::clear(), XML_Node::copy(), XML_Node::copyUnion(), XML_Node::hasAttrib(), and XML_Node::write_int().
|
protected |
Pointer to the parent XML_Node for the current node.
Note, the top node has a parent value of 0
Definition at line 801 of file xml.h.
Referenced by XML_Node::parent(), and XML_Node::setParent().
|
protected |
Pointer to the root XML_Node for the current node.
Note, the top node has a root value equal to itself
Definition at line 807 of file xml.h.
Referenced by XML_Node::build(), XML_Node::root(), XML_Node::setRoot(), XML_Node::write(), and XML_Node::XML_Node().
|
protected |
Lock for this node.
Currently, unimplemented functionality. If locked, it means you can't delete this node.
Definition at line 814 of file xml.h.
Referenced by XML_Node::lock(), XML_Node::unlock(), and XML_Node::~XML_Node().
|
protected |
Vector of pointers to child nodes.
Definition at line 817 of file xml.h.
Referenced by XML_Node::addChild(), XML_Node::child(), XML_Node::children(), XML_Node::clear(), XML_Node::copy(), XML_Node::copyUnion(), XML_Node::findByAttr(), XML_Node::findByName(), XML_Node::findID(), XML_Node::findNameID(), XML_Node::findNameIDIndex(), XML_Node::lock(), XML_Node::mergeAsChild(), XML_Node::nChildren(), XML_Node::operator=(), XML_Node::removeChild(), XML_Node::setRoot(), XML_Node::unlock(), XML_Node::write(), XML_Node::write_int(), and XML_Node::~XML_Node().
|
protected |
Number of children of this node.
Definition at line 820 of file xml.h.
Referenced by XML_Node::addChild(), XML_Node::clear(), XML_Node::copy(), XML_Node::copyUnion(), XML_Node::findNameID(), XML_Node::findNameIDIndex(), XML_Node::lock(), XML_Node::mergeAsChild(), XML_Node::nChildren(), XML_Node::removeChild(), XML_Node::setRoot(), XML_Node::unlock(), XML_Node::write(), and XML_Node::write_int().
|
protected |
True if the current node is a comment node.
Definition at line 823 of file xml.h.
Referenced by XML_Node::addValue(), XML_Node::clear(), XML_Node::copyUnion(), XML_Node::isComment(), and XML_Node::write_int().
|
protected |
The member data m_linenum.
Currently, unimplemented functionality
Definition at line 829 of file xml.h.
Referenced by XML_Node::clear(), XML_Node::copy(), XML_Node::lineNumber(), and XML_Node::setLineNumber().