XmlElement Class Reference

#include <XmlElement.h>

Collaboration diagram for XmlElement:

List of all members.


Public Member Functions

 XmlElement (std::string name)
virtual ~XmlElement ()
std::string getName () const
bool hasContent () const
bool hasAttribute (std::string attributeName) const
bool hasParentElement () const
bool hasSubElements () const
bool hasSubElement (std::string subElementName) const
std::string getContent () const
std::string getAttributeValue (std::string attributeName) const
float getAttributeValueAsFloat (std::string attributeName) const
int getAttributeValueAsInt (std::string attributeName) const
const XmlAttributegetAttribute (std::string attributeName) const
XmlAttributegetAttribute (std::string attributeName)
std::vector< const XmlAttribute * > getAttributes (std::string attributeName) const
std::vector< XmlAttribute * > getAttributes (std::string attributeName)
void renameAttributes (std::string originalAttributeName, std::string newAttributeName)
void replaceAttributeValues (std::string attributeName, std::string oldValue, std::string newValue)
const XmlElementgetFirstSubElement (std::string subElementName) const
XmlElementgetFirstSubElement (std::string subElementName)
const XmlElementgetSubElement (std::string subElementName) const
XmlElementgetSubElement (std::string subElementName)
std::vector< const XmlElement * > getSubElements (std::string subElementName) const
std::vector< XmlElement * > getSubElements (std::string subElementName)
std::vector< const XmlElement * > getAllSubElements () const
std::vector< XmlElement * > getAllSubElements ()
void renameSubElements (std::string originalElementName, std::string newElementName)
const XmlElementgetParentElement () const
XmlElementgetParentElement ()
void setName (std::string name)
void setContent (const std::string &content)
void addAttribute (XmlAttribute *attribute)
XmlAttributeremoveAttribute (std::string attributeName)
void deleteAllAttributes ()
void addSubElement (XmlElement *element)
XmlElementremoveSubElement (std::string elementName)
bool removeSubElement (const XmlElement *element)
void deleteAllSubElements ()
void fixSubElementOrder (const std::vector< std::string > &subElementNames)
void fixAttributeOrder (const std::vector< std::string > &attributeNames)
void dump () const
void dumpToFile (FILE *file, int depth=0) const

Private Member Functions

 XmlElement ()
const XmlElementgetSubElementsInternal (std::string subElementName, bool useFirst, std::vector< const XmlElement * > *elementList=NULL) const
const XmlAttributegetAttributesInternal (std::string attributeName, std::vector< const XmlAttribute * > *attributeList=NULL) const

Private Attributes

std::string elementName
std::string content
std::vector< XmlAttribute * > attributes
std::vector< XmlElement * > subElements
XmlElementparentElement

Constructor & Destructor Documentation

XmlElement::XmlElement ( std::string  name  ) 

XmlElement::~XmlElement (  )  [virtual]

XmlElement::XmlElement (  )  [private]


Member Function Documentation

void XmlElement::addAttribute ( XmlAttribute attribute  ) 

void XmlElement::addSubElement ( XmlElement element  ) 

void XmlElement::deleteAllAttributes (  ) 

void XmlElement::deleteAllSubElements (  ) 

void XmlElement::dump (  )  const

Just for testing

void XmlElement::dumpToFile ( FILE *  file,
int  depth = 0 
) const

Just for testing

void XmlElement::fixAttributeOrder ( const std::vector< std::string > &  attributeNames  ) 

void XmlElement::fixSubElementOrder ( const std::vector< std::string > &  subElementNames  ) 

std::vector< XmlElement * > XmlElement::getAllSubElements (  ) 

std::vector< const XmlElement * > XmlElement::getAllSubElements (  )  const

XmlAttribute * XmlElement::getAttribute ( std::string  attributeName  ) 

const XmlAttribute * XmlElement::getAttribute ( std::string  attributeName  )  const

std::vector< XmlAttribute * > XmlElement::getAttributes ( std::string  attributeName  ) 

std::vector< const XmlAttribute * > XmlElement::getAttributes ( std::string  attributeName  )  const

const XmlAttribute * XmlElement::getAttributesInternal ( std::string  attributeName,
std::vector< const XmlAttribute * > *  attributeList = NULL 
) const [private]

std::string XmlElement::getAttributeValue ( std::string  attributeName  )  const

float XmlElement::getAttributeValueAsFloat ( std::string  attributeName  )  const

int XmlElement::getAttributeValueAsInt ( std::string  attributeName  )  const

std::string XmlElement::getContent (  )  const

XmlElement * XmlElement::getFirstSubElement ( std::string  subElementName  ) 

const XmlElement * XmlElement::getFirstSubElement ( std::string  subElementName  )  const

std::string XmlElement::getName (  )  const

XmlElement * XmlElement::getParentElement (  ) 

const XmlElement * XmlElement::getParentElement (  )  const

XmlElement * XmlElement::getSubElement ( std::string  subElementName  ) 

const XmlElement * XmlElement::getSubElement ( std::string  subElementName  )  const

std::vector< XmlElement * > XmlElement::getSubElements ( std::string  subElementName  ) 

std::vector< const XmlElement * > XmlElement::getSubElements ( std::string  subElementName  )  const

const XmlElement * XmlElement::getSubElementsInternal ( std::string  subElementName,
bool  useFirst,
std::vector< const XmlElement * > *  elementList = NULL 
) const [private]

bool XmlElement::hasAttribute ( std::string  attributeName  )  const

bool XmlElement::hasContent (  )  const

bool XmlElement::hasParentElement (  )  const

bool XmlElement::hasSubElement ( std::string  subElementName  )  const

bool XmlElement::hasSubElements (  )  const

XmlAttribute * XmlElement::removeAttribute ( std::string  attributeName  ) 

bool XmlElement::removeSubElement ( const XmlElement element  ) 

XmlElement * XmlElement::removeSubElement ( std::string  elementName  ) 

void XmlElement::renameAttributes ( std::string  originalAttributeName,
std::string  newAttributeName 
)

void XmlElement::renameSubElements ( std::string  originalElementName,
std::string  newElementName 
)

void XmlElement::replaceAttributeValues ( std::string  attributeName,
std::string  oldValue,
std::string  newValue 
)

void XmlElement::setContent ( const std::string &  content  ) 

void XmlElement::setName ( std::string  name  ) 


Member Data Documentation

std::vector<XmlAttribute*> XmlElement::attributes [private]

std::string XmlElement::content [private]

std::string XmlElement::elementName [private]

std::vector<XmlElement*> XmlElement::subElements [private]


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

Generated on Wed Oct 20 16:12:03 2010 for inVRs by doxygen 1.5.8