![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
Wrapper around TiXmlElement. More...
#include <ticpp.h>
Public Member Functions | |
Element () | |
Default Constructor. More... | |
Element (const std::string &value) | |
Default Constructor. More... | |
Element (const char *value) | |
Default Constructor. More... | |
Element (TiXmlElement *element) | |
Constructor. More... | |
template<class T > | |
Element (const std::string &value, const T &text) | |
Constructor that allows you to set the element text. More... | |
Attribute * | FirstAttribute (bool throwIfNoAttributes=true) const |
Access the first attribute in this element. More... | |
Attribute * | LastAttribute (bool throwIfNoAttributes=true) const |
Access the last attribute in this element. More... | |
void | IterateFirst (const std::string &, Attribute **first) const |
template<class T > | |
void | SetAttribute (const std::string &name, const T &value) |
Sets an attribute of name to a given value. More... | |
std::string | GetText (bool throwIfNotFound=true) const |
Gets the text of an Element. More... | |
std::string | GetTextOrDefault (const std::string &defaultValue) const |
Gets the text of an Element, if it doesn't exist it will return the defaultValue. More... | |
template<class T , class DefaultT > | |
void | GetTextOrDefault (T *value, const DefaultT &defaultValue) const |
Gets the text value of an Element, if it doesn't exist it will return the defaultValue. More... | |
template<class T > | |
void | GetText (T *value, bool throwIfNotFound=true) const |
Gets the text of an Element. More... | |
template<class T > | |
void | SetText (const T &value) |
Convenience function to set the text of an element. More... | |
template<class T , class DefaulT > | |
void | GetAttributeOrDefault (const std::string &name, T *value, const DefaulT &defaultValue) const |
Gets an attribute of name from an element, if it doesn't exist it will return the defaultValue. More... | |
std::string | GetAttributeOrDefault (const std::string &name, const std::string &defaultValue) const |
Gets an attribute of name from an element, if it doesn't exist it will return the defaultValue. More... | |
template<class T > | |
T | GetAttribute (const std::string &name, bool throwIfNotFound=true) const |
Returns an attribute of name from an element. More... | |
template<class T > | |
void | GetAttribute (const std::string &name, T *value, bool throwIfNotFound=true) const |
Gets an attribute of name from an element. More... | |
std::string | GetAttribute (const std::string &name) const |
Gets an attribute of name from an element. More... | |
bool | HasAttribute (const std::string &name) const |
Returns true, if attribute exists. More... | |
void | RemoveAttribute (const std::string &name) |
Removes attribute from element. More... | |
template<class T > | |
void | GetValue (T *value) const |
Get the value of this node Uses Base::FromString to convert TiXmlNode::ValueStr from a std::string, and puts it in the passed pointer. More... | |
std::string | Value () const |
Get the value of this node. More... | |
template<class T > | |
void | SetValue (const T &value) |
Set the value of this node. More... | |
void | Clear () |
Clear all Nodes below this. More... | |
Node * | Parent (bool throwIfNoParent=true) const |
The Parent of this Node. More... | |
Node * | FirstChild (bool throwIfNoChildren=true) const |
The first child of this node. More... | |
Node * | FirstChild (const char *value, bool throwIfNoChildren=true) const |
Node * | FirstChild (const std::string &value, bool throwIfNoChildren=true) const |
The first child of this node with the matching value. More... | |
Node * | LastChild (bool throwIfNoChildren=true) const |
The last child of this node. More... | |
Node * | LastChild (const char *value, bool throwIfNoChildren=true) const |
Node * | LastChild (const std::string &value, bool throwIfNoChildren=true) const |
The last child of this node with the matching value. More... | |
Node * | IterateChildren (Node *previous) const |
An alternate way to walk the children of a node. More... | |
Node * | IterateChildren (const std::string &value, Node *previous) const |
This flavor of IterateChildren searches for children with a particular value. More... | |
Node * | InsertEndChild (Node &addThis) |
Adds a child past the LastChild. More... | |
Node * | LinkEndChild (Node *childNode) |
Adds a child past the LastChild. More... | |
Node * | InsertBeforeChild (Node *beforeThis, Node &addThis) |
Adds a child before the specified child. More... | |
Node * | InsertAfterChild (Node *afterThis, Node &addThis) |
Adds a child after the specified child. More... | |
Node * | ReplaceChild (Node *replaceThis, Node &withThis) |
Replace a child of this node. More... | |
void | RemoveChild (Node *removeThis) |
Delete a child of this node. More... | |
Node * | PreviousSibling (bool throwIfNoSiblings=true) const |
Navigate to a sibling node. More... | |
Node * | PreviousSibling (const std::string &value, bool throwIfNoSiblings=true) const |
Navigate to a sibling node with the given value. More... | |
Node * | PreviousSibling (const char *value, bool throwIfNoSiblings=true) const |
Node * | NextSibling (bool throwIfNoSiblings=true) const |
Navigate to a sibling node. More... | |
Node * | NextSibling (const std::string &value, bool throwIfNoSiblings=true) const |
Navigate to a sibling node with the given value. More... | |
Node * | NextSibling (const char *value, bool throwIfNoSiblings=true) const |
template<class T > | |
void | IterateFirst (const std::string &value, T **first) const |
template<class T > | |
void | IterateNext (const std::string &value, T **next) const |
template<class T > | |
void | IteratePrevious (const std::string &value, T **previous) const |
Element * | NextSiblingElement (bool throwIfNoSiblings=true) const |
Navigate to a sibling element. More... | |
Element * | NextSiblingElement (const std::string &value, bool throwIfNoSiblings=true) const |
Navigate to a sibling element with the given value. More... | |
Element * | NextSiblingElement (const char *value, bool throwIfNoSiblings=true) const |
Element * | FirstChildElement (bool throwIfNoChildren=true) const |
The first child element of this node. More... | |
Element * | FirstChildElement (const char *value, bool throwIfNoChildren=true) const |
Element * | FirstChildElement (const std::string &value, bool throwIfNoChildren=true) const |
The first child element of this node with the matching value. More... | |
int | Type () const |
Query the type (as TiXmlNode::NodeType ) of this node. More... | |
Document * | GetDocument (bool throwIfNoDocument=true) const |
Return a pointer to the Document this node lives in. More... | |
bool | NoChildren () const |
Check if this node has no children. More... | |
template<class T > | |
T * | To () const |
Pointer conversion ( NOT OBJECT CONVERSION ) - replaces TiXmlNode::ToElement, TiXmlNode::ToDocument, TiXmlNode::ToComment, etc. More... | |
Document * | ToDocument () const |
Pointer conversion - replaces TiXmlNode::ToDocument. More... | |
Element * | ToElement () const |
Pointer conversion - replaces TiXmlNode::ToElement. More... | |
Comment * | ToComment () const |
Pointer conversion - replaces TiXmlNode::ToComment. More... | |
Text * | ToText () const |
Pointer conversion - replaces TiXmlNode::ToText. More... | |
Declaration * | ToDeclaration () const |
Pointer conversion - replaces TiXmlNode::ToDeclaration. More... | |
StylesheetReference * | ToStylesheetReference () const |
Pointer conversion - replaces TiXmlNode::ToStylesheetReference. More... | |
std::unique_ptr< Node > | Clone () const |
Create an exact duplicate of this node and return it. More... | |
bool | Accept (TiXmlVisitor *visitor) const |
Accept a hierchical visit the nodes in the TinyXML DOM. More... | |
template<class T > | |
std::string | ToString (const T &value) const |
Converts any class with a proper overload of the << opertor to a std::string. More... | |
std::string | ToString (const std::string &value) const |
template<class T > | |
void | FromString (const std::string &temp, T *out) const |
Converts a std::string to any class with a proper overload of the >> opertor. More... | |
void | FromString (const std::string &temp, std::string *out) const |
Specialization for std::string. More... | |
int | Row () const |
Return the position, in the original source file, of this node or attribute. More... | |
int | Column () const |
Return the position, in the original source file, of this node or attribute. More... | |
bool | operator== (const Base &rhs) const |
Compare internal TiXml pointers to determine is both are wrappers around the same node. More... | |
bool | operator!= (const Base &rhs) const |
Compare internal TiXml pointers to determine is both are wrappers around the same node. More... | |
std::string | BuildDetailedErrorString () const |
Builds detailed error string using TiXmlDocument::Error() and others. More... | |
Protected Attributes | |
TiXmlElement * | m_tiXmlPointer |
Internal pointer to the TiXml Class which is being wrapped. More... | |
TiCppRCImp * | m_impRC |
Holds status of internal TiXmlPointer - use this to determine if object has been deleted already. More... | |
Protected Member Functions | |
TiXmlNode * | GetTiXmlPointer () const |
void | SetTiXmlPointer (TiXmlElement *newPointer) |
TiXmlBase * | GetBasePointer () const |
Node * | NodeFactory (TiXmlNode *tiXmlNode, bool throwIfNull=true, bool rememberSpawnedWrapper=true) const |
void | SetImpRC (TiXmlBase *nodeBase) |
void | ValidatePointer () const |
Wrapper around TiXmlElement.
Element::Element | ( | ) |
Default Constructor.
Definition at line 747 of file ticpp.cpp.
References Element().
Referenced by Element().
Element::Element | ( | const std::string & | value | ) |
Default Constructor.
Initializes all the variables.
value | The value of the element. |
Definition at line 753 of file ticpp.cpp.
References Element().
Referenced by Element().
Element::Element | ( | const char * | value | ) |
Default Constructor.
Initializes all the variables.
value | The value of the element. |
Definition at line 758 of file ticpp.cpp.
References Element().
Referenced by Element().
Element::Element | ( | TiXmlElement * | element | ) |
Constructor.
Definition at line 763 of file ticpp.cpp.
References Element().
Referenced by Element(), ticpp::Node::FirstChildElement(), ticpp::Node::NextSiblingElement(), ticpp::Node::ToElement(), ticpp::Visitor::VisitEnter(), and ticpp::Visitor::VisitExit().
|
inline |
Constructor that allows you to set the element text.
value | The value of the element. |
text | The text to set. |
Definition at line 1523 of file ticpp.h.
References Element().
Referenced by Element().
|
inherited |
Accept a hierchical visit the nodes in the TinyXML DOM.
Definition at line 650 of file ticpp.cpp.
References TiXmlNode::Accept(), and ticpp::Node::GetTiXmlPointer().
|
inlineinherited |
Builds detailed error string using TiXmlDocument::Error() and others.
Definition at line 238 of file ticpp.h.
References TiXmlDocument::Error(), and ticpp::Base::GetBasePointer().
|
inherited |
Clear all Nodes below this.
Simple wrapper for TiXmlNode::Clear.
Definition at line 232 of file ticpp.cpp.
References TiXmlNode::Clear(), and ticpp::Node::GetTiXmlPointer().
|
inherited |
Create an exact duplicate of this node and return it.
Definition at line 635 of file ticpp.cpp.
References TiXmlNode::Clone(), and ticpp::Node::GetTiXmlPointer().
|
inlineinherited |
Return the position, in the original source file, of this node or attribute.
Wrapper around TiXmlBase::Row()
Definition at line 215 of file ticpp.h.
References TiXmlBase::Column(), and ticpp::Base::GetBasePointer().
Access the first attribute in this element.
throwIfNoAttributes | [DEF] If true, throws when there are no attributes |
Definition at line 766 of file ticpp.cpp.
References ticpp::Attribute::Attribute().
Referenced by IterateFirst().
The first child of this node.
throwIfNoChildren | [DEF] If true, will throw an exception if there are no children. |
Exception | When throwIfNoChildren is true, and TiXmlNode::FirstChild returns Null. |
Definition at line 244 of file ticpp.cpp.
References ticpp::Node::FirstChild().
Definition at line 252 of file ticpp.cpp.
References TiXmlNode::FirstChild(), ticpp::Node::GetTiXmlPointer(), and ticpp::Node::NodeFactory().
Referenced by ticpp::Node::FirstChild().
|
inherited |
The first child of this node with the matching value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
value | Value to match. |
throwIfNoChildren | [DEF] If true, will throw an exception if there are no children. |
Definition at line 248 of file ticpp.cpp.
The first child element of this node.
throwIfNoChildren | [DEF] If true, will throw an exception if there are no element children. |
Exception | When throwIfNoChildren is true, and TiXmlNode::FirstChildElement returns Null. |
Definition at line 501 of file ticpp.cpp.
References ticpp::Node::FirstChildElement().
|
inherited |
Definition at line 510 of file ticpp.cpp.
References Element(), TiXmlNode::FirstChildElement(), and ticpp::Node::GetTiXmlPointer().
Referenced by ticpp::Node::FirstChildElement().
|
inherited |
The first child element of this node with the matching value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
value | Value to match. |
throwIfNoChildren | [DEF] If true, will throw an exception if there are no element children. |
Definition at line 505 of file ticpp.cpp.
|
inlineinherited |
Converts a std::string to any class with a proper overload of the >> opertor.
temp | The string to be converted |
out | [OUT] The container for the returned value |
Exception | When temp cannot be converted to the target type |
Definition at line 189 of file ticpp.h.
|
inlineinherited |
|
inline |
Returns an attribute of name from an element.
Uses FromString to convert the string to the type of choice.
name | The name of the attribute you are querying. |
throwIfNotFound | [DEF] If true, will throw an exception if the attribute doesn't exist |
Exception | When the attribute doesn't exist and throwIfNotFound is true |
Definition at line 1789 of file ticpp.h.
|
inline |
Gets an attribute of name from an element.
Uses FromString to convert the string to the type of choice.
name | The name of the attribute you are querying. |
value | [OUT] The container for the returned value |
throwIfNotFound | [DEF] If true, will throw an exception if the attribute doesn't exist |
Exception | When the attribute doesn't exist and throwIfNotFound is true |
Definition at line 1823 of file ticpp.h.
std::string Element::GetAttribute | ( | const std::string & | name | ) | const |
Gets an attribute of name from an element.
Returns an empty string if the attribute does not exist.
name | The name of the attribute you are querying. |
Definition at line 821 of file ticpp.cpp.
|
private |
Definition at line 835 of file ticpp.cpp.
|
inline |
Gets an attribute of name from an element, if it doesn't exist it will return the defaultValue.
Uses FromString to convert the string to the type of choice.
name | The name of the attribute you are querying. |
value | [OUT] The container for the returned value. |
defaultValue | What to put in value if there is no attribute in this element. |
Exception |
Definition at line 1746 of file ticpp.h.
std::string Element::GetAttributeOrDefault | ( | const std::string & | name, |
const std::string & | defaultValue | ||
) | const |
Gets an attribute of name from an element, if it doesn't exist it will return the defaultValue.
name | The name of the attribute you are querying. |
defaultValue | What to put in value if there is no attribute in this element. |
Definition at line 810 of file ticpp.cpp.
|
inlineprotectedvirtualinherited |
Implements ticpp::Base.
Definition at line 1073 of file ticpp.h.
Return a pointer to the Document this node lives in.
throwIfNoDocument | [DEF] If true, will throw an exception if this node is not linked under a Document. |
Definition at line 538 of file ticpp.cpp.
References ticpp::Document::Document().
|
inline |
Gets the text of an Element.
throwIfNotFound | [DEF] If true, will throw an exception if there is no text in this element |
Exception | When there is no text and throwIfNotFound is true |
Definition at line 1600 of file ticpp.h.
|
inline |
Gets the text of an Element.
Uses FromString to convert the string to the type of choice.
value | [OUT] The container for the returned value |
throwIfNotFound | [DEF] If true, will throw an exception if there is no text in this element |
Exception | When there is no text and throwIfNotFound is true |
Definition at line 1690 of file ticpp.h.
|
private |
Definition at line 850 of file ticpp.cpp.
|
inline |
Gets the text of an Element, if it doesn't exist it will return the defaultValue.
defaultValue | What to put in 'value' if there is no text in this element |
Definition at line 1626 of file ticpp.h.
|
inline |
Gets the text value of an Element, if it doesn't exist it will return the defaultValue.
Uses FromString to convert the string to the type of choice
value | [OUT] The container for the returned value |
defaultValue | What to put in 'value' if there is no text in this element |
Definition at line 1656 of file ticpp.h.
|
inlineprotectedvirtualinherited |
Implements ticpp::Node.
Definition at line 1271 of file ticpp.h.
|
inlineinherited |
Get the value of this node Uses Base::FromString to convert TiXmlNode::ValueStr from a std::string, and puts it in the passed pointer.
value | [OUT] A pointer to fill with the value |
Definition at line 470 of file ticpp.h.
bool Element::HasAttribute | ( | const std::string & | name | ) | const |
Returns true, if attribute exists.
name | The name of the attribute you are checking. |
Definition at line 825 of file ticpp.cpp.
Adds a child after the specified child.
Throws if you try to insert a document.
Exception | When TiXmlNode::InsertAfterChild returns Null. |
Definition at line 365 of file ticpp.cpp.
References TiXmlNode::DOCUMENT, ticpp::Node::GetTiXmlPointer(), TiCppRCImp::IncRef(), TiXmlNode::InsertAfterChild(), ticpp::Base::m_impRC, ticpp::Node::NodeFactory(), and ticpp::Node::Type().
Adds a child before the specified child.
Throws if you try to insert a document.
Exception | When TiXmlNode::InsertBeforeChild returns Null. |
Definition at line 347 of file ticpp.cpp.
References TiXmlNode::DOCUMENT, ticpp::Node::GetTiXmlPointer(), TiCppRCImp::IncRef(), TiXmlNode::InsertBeforeChild(), ticpp::Base::m_impRC, ticpp::Node::NodeFactory(), and ticpp::Node::Type().
Adds a child past the LastChild.
Throws if you try to insert a document.
addThis | Node to insert. |
Exception | When TiXmlNode::InsertEndChild returns Null |
Definition at line 317 of file ticpp.cpp.
References TiXmlNode::DOCUMENT, ticpp::Node::GetTiXmlPointer(), TiXmlNode::InsertEndChild(), ticpp::Node::NodeFactory(), and ticpp::Node::Type().
An alternate way to walk the children of a node.
Simple wrapper for TiXmlNode::IterateChildren.
previous | The previous Node* that was returned from IterateChildren. |
Definition at line 292 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), TiXmlNode::IterateChildren(), and ticpp::Node::NodeFactory().
This flavor of IterateChildren searches for children with a particular value.
Simple wrapper for TiXmlNode::IterateChildren.
value | The value you want to search for. |
previous | The previous Node* that was returned from IterateChildren. |
Definition at line 304 of file ticpp.cpp.
References ticpp::Node::NodeFactory().
|
inlineinherited |
Definition at line 783 of file ticpp.h.
|
inlinevirtual |
Reimplemented from ticpp::Node.
Definition at line 1558 of file ticpp.h.
References FirstAttribute(), and ticpp::Attribute::Next().
|
inlineinherited |
Definition at line 808 of file ticpp.h.
|
inlineinherited |
Definition at line 826 of file ticpp.h.
Access the last attribute in this element.
throwIfNoAttributes | [DEF] If true, throws when there are no attributes |
Definition at line 788 of file ticpp.cpp.
References ticpp::Attribute::Attribute().
The last child of this node.
throwIfNoChildren | [DEF] If true, will throw an exception if there are no children. |
Exception | When throwIfNoChildren is true, and TiXmlNode::LastChild returns Null. |
Definition at line 268 of file ticpp.cpp.
References ticpp::Node::LastChild().
Definition at line 276 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), TiXmlNode::LastChild(), and ticpp::Node::NodeFactory().
Referenced by ticpp::Node::LastChild().
The last child of this node with the matching value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
value | Value to match. |
throwIfNoChildren | [DEF] If true, will throw an exception if there are no children. |
Definition at line 272 of file ticpp.cpp.
Adds a child past the LastChild.
Throws if you try to link a document.
childNode | Node to link. |
Exception | When TiXmlNode::LinkEndChild returns Null. |
Definition at line 332 of file ticpp.cpp.
References TiXmlNode::DOCUMENT, ticpp::Node::GetTiXmlPointer(), TiCppRCImp::IncRef(), TiXmlNode::LinkEndChild(), ticpp::Base::m_impRC, and ticpp::Node::Type().
Navigate to a sibling node.
Wrapper around TiXmlNode::NextSibling.
throwIfNoSiblings | [DEF] If true, will throw an exception if there are no siblings. |
Exception | When TiXmlNode::NextSibling returns Null and 'throwIfNoSiblings' is true. |
Definition at line 438 of file ticpp.cpp.
References ticpp::Node::NextSibling().
|
inherited |
Navigate to a sibling node with the given value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
value | The value of the node to look for. |
throwIfNoSiblings | [DEF] If true, will throw an exception if there are no siblings. |
Definition at line 442 of file ticpp.cpp.
Definition at line 446 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), TiXmlNode::NextSibling(), and ticpp::Node::NodeFactory().
Referenced by ticpp::Node::NextSibling().
Navigate to a sibling element.
Wrapper around TiXmlNode::NextSibling.
throwIfNoSiblings | [DEF] If true, will throw an exception if there are no sibling element. |
Exception | When TiXmlNode::NextSibling returns Null and 'throwIfNoSiblings' is true. |
Definition at line 464 of file ticpp.cpp.
References ticpp::Node::NextSiblingElement().
|
inherited |
Navigate to a sibling element with the given value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
value | The value of the element to look for. |
throwIfNoSiblings | [DEF] If true, will throw an exception if there are no sibling elements. |
Definition at line 468 of file ticpp.cpp.
|
inherited |
Definition at line 473 of file ticpp.cpp.
References Element(), ticpp::Node::GetTiXmlPointer(), and TiXmlNode::NextSiblingElement().
Referenced by ticpp::Node::NextSiblingElement().
|
inherited |
Check if this node has no children.
Definition at line 555 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), and TiXmlNode::NoChildren().
|
protectedinherited |
Definition at line 181 of file ticpp.cpp.
References TiXmlNode::Type().
Referenced by ticpp::Node::FirstChild(), ticpp::Node::InsertAfterChild(), ticpp::Node::InsertBeforeChild(), ticpp::Node::InsertEndChild(), ticpp::Node::IterateChildren(), ticpp::Node::LastChild(), ticpp::Node::NextSibling(), ticpp::Node::Parent(), ticpp::Node::PreviousSibling(), and ticpp::Node::ReplaceChild().
Compare internal TiXml pointers to determine is both are wrappers around the same node.
Definition at line 231 of file ticpp.h.
References ticpp::Base::GetBasePointer().
Compare internal TiXml pointers to determine is both are wrappers around the same node.
Definition at line 222 of file ticpp.h.
References ticpp::Base::GetBasePointer().
The Parent of this Node.
Simple wrapper for TiXmlNode::Parent.
throwIfNoParent | [DEF] If true, throws when Parent = nullptr. |
Exception | When throwIfNoParent is true, and TiXmlNode::Parent returns Null. |
Definition at line 234 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), ticpp::Node::NodeFactory(), and TiXmlNode::Parent().
Navigate to a sibling node.
Wrapper around TiXmlNode::PreviousSibling.
throwIfNoSiblings | [DEF] If true, will throw an exception if there are no siblings. |
Exception | When TiXmlNode::PreviousSibling returns Null and 'throwIfNoSiblings' is true. |
Definition at line 410 of file ticpp.cpp.
References ticpp::Node::PreviousSibling().
|
inherited |
Navigate to a sibling node with the given value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
value | The value of the node to look for. |
throwIfNoSiblings | [DEF] If true, will throw an exception if there are no siblings. |
Definition at line 414 of file ticpp.cpp.
Definition at line 419 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), ticpp::Node::NodeFactory(), and TiXmlNode::PreviousSibling().
Referenced by ticpp::Node::PreviousSibling().
void Element::RemoveAttribute | ( | const std::string & | name | ) |
Removes attribute from element.
name | The name of the attribute to remove. |
Definition at line 830 of file ticpp.cpp.
|
inherited |
Delete a child of this node.
removeThis | Node to delete. |
Definition at line 401 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), and TiXmlNode::RemoveChild().
Replace a child of this node.
Throws if you try to replace with a document.
Exception | When TiXmlNode::ReplaceChild returns Null. |
Definition at line 383 of file ticpp.cpp.
References TiXmlNode::DOCUMENT, ticpp::Node::GetTiXmlPointer(), TiCppRCImp::IncRef(), ticpp::Base::m_impRC, ticpp::Node::NodeFactory(), TiXmlNode::ReplaceChild(), and ticpp::Node::Type().
|
inlineinherited |
Return the position, in the original source file, of this node or attribute.
Wrapper around TiXmlBase::Row()
Definition at line 209 of file ticpp.h.
References ticpp::Base::GetBasePointer(), and TiXmlBase::Row().
|
inline |
Sets an attribute of name to a given value.
The attribute will be created if it does not exist, or changed if it does. Uses ToString to convert the value to a string, so there is no need to use any other SetAttribute methods.
Definition at line 1581 of file ticpp.h.
|
inlineprotectedinherited |
Definition at line 279 of file ticpp.h.
References ticpp::Base::m_impRC, and TiCppRC::m_tiRC.
Referenced by ticpp::NodeImp< TiXmlDeclaration >::SetTiXmlPointer().
|
inline |
Convenience function to set the text of an element.
Creates a Text node and inserts it as the first child. Uses ToString to convert the parameter to a string.
value | The text to set. |
Definition at line 1714 of file ticpp.h.
|
inlineprotectedinherited |
Definition at line 1283 of file ticpp.h.
|
inlineinherited |
Set the value of this node.
Uses Base::ToString to convert value to a std::string, then calls TiXmlNode::SetValue.
value | The value to set |
Definition at line 490 of file ticpp.h.
|
inlineinherited |
Pointer conversion ( NOT OBJECT CONVERSION ) - replaces TiXmlNode::ToElement, TiXmlNode::ToDocument, TiXmlNode::ToComment, etc.
Exception | When the target is not an object of class T |
Definition at line 961 of file ticpp.h.
|
inherited |
Pointer conversion - replaces TiXmlNode::ToComment.
Definition at line 583 of file ticpp.cpp.
References ticpp::Comment::Comment(), ticpp::Node::GetTiXmlPointer(), and TiXmlNode::ToComment().
|
inherited |
Pointer conversion - replaces TiXmlNode::ToDeclaration.
Exception | When this node is not a Declaration. |
Definition at line 609 of file ticpp.cpp.
References ticpp::Declaration::Declaration(), ticpp::Node::GetTiXmlPointer(), and TiXmlNode::ToDeclaration().
|
inherited |
Pointer conversion - replaces TiXmlNode::ToDocument.
Definition at line 557 of file ticpp.cpp.
References ticpp::Document::Document().
|
inherited |
Pointer conversion - replaces TiXmlNode::ToElement.
Definition at line 570 of file ticpp.cpp.
References Element(), ticpp::Node::GetTiXmlPointer(), and TiXmlNode::ToElement().
|
inlineinherited |
Converts any class with a proper overload of the << opertor to a std::string.
value | The value to be converted |
Exception | When value cannot be converted to a std::string |
Definition at line 169 of file ticpp.h.
|
inlineinherited |
|
inherited |
Pointer conversion - replaces TiXmlNode::ToStylesheetReference.
Exception | When this node is not a StylesheetReference. |
Definition at line 622 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), ticpp::StylesheetReference::StylesheetReference(), and TiXmlNode::ToStylesheetReference().
|
inherited |
Pointer conversion - replaces TiXmlNode::ToText.
Definition at line 596 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), ticpp::Text::Text(), TiXmlText::TiXmlElement, and TiXmlNode::ToText().
|
inherited |
Query the type (as TiXmlNode::NodeType ) of this node.
Definition at line 536 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), and TiXmlNode::Type().
Referenced by ticpp::Node::InsertAfterChild(), ticpp::Node::InsertBeforeChild(), ticpp::Node::InsertEndChild(), ticpp::Node::LinkEndChild(), and ticpp::Node::ReplaceChild().
|
inlineprotectedinherited |
Definition at line 281 of file ticpp.h.
References TiCppRCImp::IsNull(), and ticpp::Base::m_impRC.
Referenced by ticpp::Attribute::GetBasePointer(), ticpp::Attribute::GetName(), ticpp::NodeImp< TiXmlDeclaration >::GetTiXmlPointer(), ticpp::Attribute::GetValue(), ticpp::Attribute::Name(), ticpp::Attribute::Next(), ticpp::Attribute::Previous(), ticpp::Attribute::Print(), ticpp::Attribute::SetName(), ticpp::Attribute::SetValue(), and ticpp::Attribute::Value().
|
inherited |
Get the value of this node.
Simple wrapper for TiXmlNode::ValueStr.
Definition at line 230 of file ticpp.cpp.
References ticpp::Node::GetTiXmlPointer(), and TiXmlNode::ValueStr().
|
mutableprotectedinherited |
Holds status of internal TiXmlPointer - use this to determine if object has been deleted already.
Definition at line 267 of file ticpp.h.
Referenced by ticpp::Attribute::Attribute(), ticpp::Node::InsertAfterChild(), ticpp::Node::InsertBeforeChild(), ticpp::Node::LinkEndChild(), ticpp::NodeImp< TiXmlDeclaration >::NodeImp(), ticpp::Attribute::operator=(), ticpp::Node::ReplaceChild(), ticpp::Base::SetImpRC(), ticpp::Base::ValidatePointer(), ticpp::Attribute::~Attribute(), and ticpp::NodeImp< TiXmlDeclaration >::~NodeImp().
|
protectedinherited |