![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
Wrapper around TiXmlStylesheetReference. More...
#include <ticpp.h>
Public Member Functions | |
| StylesheetReference () | |
| Default Constructor. | |
| StylesheetReference (TiXmlStylesheetReference *stylesheetReference) | |
| Constructor. | |
| StylesheetReference (const std::string &type, const std::string &href) | |
| Constructor. | |
| std::string | Type () const |
| Type. | |
| std::string | Href () const |
| Href. | |
| void | GetValue (TiXmlStylesheetReference *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. | |
| 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. | |
| std::string | Value () const |
| Get the value of this node. | |
| void | SetValue (const TiXmlStylesheetReference &value) |
| Set the value of this node. | |
| template<class T> | |
| void | SetValue (const T &value) |
| Set the value of this node. | |
| void | Clear () |
| Clear all Nodes below this. | |
| Node * | Parent (bool throwIfNoParent=true) const |
| The Parent of this Node. | |
| Node * | FirstChild (bool throwIfNoChildren=true) const |
| The first child of this node. | |
| 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. | |
| Node * | LastChild (bool throwIfNoChildren=true) const |
| The last child of this node. | |
| 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. | |
| Node * | IterateChildren (Node *previous) const |
| An alternate way to walk the children of a node. | |
| Node * | IterateChildren (const std::string &value, Node *previous) const |
| This flavor of IterateChildren searches for children with a particular value. | |
| Node * | InsertEndChild (Node &addThis) |
| Adds a child past the LastChild. | |
| Node * | LinkEndChild (Node *childNode) |
| Adds a child past the LastChild. | |
| Node * | InsertBeforeChild (Node *beforeThis, Node &addThis) |
| Adds a child before the specified child. | |
| Node * | InsertAfterChild (Node *afterThis, Node &addThis) |
| Adds a child after the specified child. | |
| Node * | ReplaceChild (Node *replaceThis, Node &withThis) |
| Replace a child of this node. | |
| void | RemoveChild (Node *removeThis) |
| Delete a child of this node. | |
| Node * | PreviousSibling (bool throwIfNoSiblings=true) const |
| Navigate to a sibling node. | |
| Node * | PreviousSibling (const std::string &value, bool throwIfNoSiblings=true) const |
| Navigate to a sibling node with the given value. | |
| Node * | PreviousSibling (const char *value, bool throwIfNoSiblings=true) const |
| Node * | NextSibling (bool throwIfNoSiblings=true) const |
| Navigate to a sibling node. | |
| Node * | NextSibling (const std::string &value, bool throwIfNoSiblings=true) const |
| Navigate to a sibling node with the given value. | |
| Node * | NextSibling (const char *value, bool throwIfNoSiblings=true) const |
| void | IterateFirst (const std::string &value, TiXmlStylesheetReference **first) const |
| virtual void | IterateFirst (const std::string &, Attribute **) const |
| void | IterateNext (const std::string &value, TiXmlStylesheetReference **next) const |
| template<class T> | |
| void | IterateNext (const std::string &value, T **next) const |
| void | IteratePrevious (const std::string &value, TiXmlStylesheetReference **previous) const |
| template<class T> | |
| void | IteratePrevious (const std::string &value, T **previous) const |
| Element * | NextSiblingElement (bool throwIfNoSiblings=true) const |
| Navigate to a sibling element. | |
| Element * | NextSiblingElement (const std::string &value, bool throwIfNoSiblings=true) const |
| Navigate to a sibling element with the given value. | |
| Element * | NextSiblingElement (const char *value, bool throwIfNoSiblings=true) const |
| Element * | FirstChildElement (bool throwIfNoChildren=true) const |
| The first child element of this node. | |
| 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. | |
| Document * | GetDocument (bool throwIfNoDocument=true) const |
| Return a pointer to the Document this node lives in. | |
| bool | NoChildren () const |
| Check if this node has no children. | |
| TiXmlStylesheetReference * | To () const |
| Pointer conversion ( NOT OBJECT CONVERSION ) - replaces TiXmlNode::ToElement, TiXmlNode::ToDocument, TiXmlNode::ToComment, etc. | |
| Document * | ToDocument () const |
| Pointer conversion - replaces TiXmlNode::ToDocument. | |
| Element * | ToElement () const |
| Pointer conversion - replaces TiXmlNode::ToElement. | |
| Comment * | ToComment () const |
| Pointer conversion - replaces TiXmlNode::ToComment. | |
| Text * | ToText () const |
| Pointer conversion - replaces TiXmlNode::ToText. | |
| Declaration * | ToDeclaration () const |
| Pointer conversion - replaces TiXmlNode::ToDeclaration. | |
| StylesheetReference * | ToStylesheetReference () const |
| Pointer conversion - replaces TiXmlNode::ToStylesheetReference. | |
| std::unique_ptr< Node > | Clone () const |
| Create an exact duplicate of this node and return it. | |
| bool | Accept (TiXmlVisitor *visitor) const |
| Accept a hierchical visit the nodes in the TinyXML DOM. | |
| std::string | ToString (const TiXmlStylesheetReference &value) const |
| Converts any class with a proper overload of the << opertor to a std::string. | |
| std::string | ToString (const std::string &value) const |
| void | FromString (const std::string &temp, TiXmlStylesheetReference *out) const |
| Converts a std::string to any class with a proper overload of the >> opertor. | |
| void | FromString (const std::string &temp, std::string *out) const |
| Specialization for std::string. | |
| int | Row () const |
| Return the position, in the original source file, of this node or attribute. | |
| int | Column () const |
| Return the position, in the original source file, of this node or attribute. | |
| bool | operator== (const Base &rhs) const |
| Compare internal TiXml pointers to determine is both are wrappers around the same node. | |
| bool | operator!= (const Base &rhs) const |
| Compare internal TiXml pointers to determine is both are wrappers around the same node. | |
| std::string | BuildDetailedErrorString () const |
| Builds detailed error string using TiXmlDocument::Error() and others. | |
Protected Member Functions | |
| TiXmlNode * | GetTiXmlPointer () const |
| void | SetTiXmlPointer (TiXmlStylesheetReference *newPointer) |
| TiXmlBase * | GetBasePointer () const |
| Node * | NodeFactory (TiXmlNode *tiXmlNode, bool throwIfNull=true, bool rememberSpawnedWrapper=true) const |
| void | SetImpRC (TiXmlBase *nodeBase) |
| void | ValidatePointer () const |
Protected Attributes | |
| TiXmlStylesheetReference * | m_tiXmlPointer |
| Internal pointer to the TiXml Class which is being wrapped. | |
| TiCppRCImp * | m_impRC |
| Holds status of internal TiXmlPointer - use this to determine if object has been deleted already. | |
Wrapper around TiXmlStylesheetReference.
| StylesheetReference::StylesheetReference | ( | ) |
Default Constructor.
Construct an empty declaration.
Definition at line 893 of file ticpp.cpp.
References ticpp::NodeImp< TiXmlStylesheetReference >::NodeImp(), and ticpp::NodeImp< TiXmlStylesheetReference >::m_impRC.
| StylesheetReference::StylesheetReference | ( | TiXmlStylesheetReference * | stylesheetReference | ) |
Constructor.
Definition at line 898 of file ticpp.cpp.
References ticpp::NodeImp< TiXmlStylesheetReference >::NodeImp().
| StylesheetReference::StylesheetReference | ( | const std::string & | type, |
| const std::string & | href ) |
Constructor.
Definition at line 902 of file ticpp.cpp.
References ticpp::NodeImp< TiXmlStylesheetReference >::NodeImp().
|
inherited |
Accept a hierchical visit the nodes in the TinyXML DOM.
Definition at line 1048 of file ticpp.cpp.
|
inlineinherited |
Builds detailed error string using TiXmlDocument::Error() and others.
Definition at line 238 of file ticpp.h.
|
inherited |
Clear all Nodes below this.
Simple wrapper for TiXmlNode::Clear.
Definition at line 498 of file ticpp.cpp.
|
inherited |
Create an exact duplicate of this node and return it.
Definition at line 1042 of file ticpp.cpp.
|
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.
|
inherited |
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. |
|
inherited |
Definition at line 539 of file ticpp.cpp.
|
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. |
|
inherited |
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. |
|
inherited |
Definition at line 906 of file ticpp.cpp.
|
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. |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedinherited |
|
inherited |
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 940 of file ticpp.cpp.
|
inlineprotectedvirtualinherited |
Implements ticpp::Node.
|
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.
References ticpp::Base::FromString(), and GetTiXmlPointer().
|
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 |
| std::string StylesheetReference::Href | ( | ) | const |
Href.
Will return an empty string if none was found.
Definition at line 911 of file ticpp.cpp.
References ticpp::NodeImp< TiXmlStylesheetReference >::m_tiXmlPointer.
|
inherited |
Adds a child after the specified child.
Throws if you try to insert a document.
| Exception | When TiXmlNode::InsertAfterChild returns Null. |
Definition at line 667 of file ticpp.cpp.
|
inherited |
Adds a child before the specified child.
Throws if you try to insert a document.
| Exception | When TiXmlNode::InsertBeforeChild returns Null. |
Definition at line 654 of file ticpp.cpp.
|
inherited |
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 629 of file ticpp.cpp.
|
inherited |
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 615 of file ticpp.cpp.
|
inherited |
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 604 of file ticpp.cpp.
|
inlinevirtualinherited |
|
inlineinherited |
Definition at line 783 of file ticpp.h.
|
inlineinherited |
Definition at line 808 of file ticpp.h.
References NextSibling().
|
inlineinherited |
|
inlineinherited |
Definition at line 826 of file ticpp.h.
References PreviousSibling().
|
inlineinherited |
|
inherited |
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. |
|
inherited |
|
inherited |
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. |
|
inherited |
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 641 of file ticpp.cpp.
|
inherited |
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. |
|
inherited |
Definition at line 773 of file ticpp.cpp.
|
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. |
|
inherited |
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. |
|
inherited |
Definition at line 875 of file ticpp.cpp.
|
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. |
|
inherited |
Check if this node has no children.
Definition at line 947 of file ticpp.cpp.
|
protectedinherited |
Definition at line 1079 of file ticpp.cpp.
Compare internal TiXml pointers to determine is both are wrappers around the same node.
Compare internal TiXml pointers to determine is both are wrappers around the same node.
|
inherited |
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 510 of file ticpp.cpp.
|
inherited |
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. |
|
inherited |
Definition at line 731 of file ticpp.cpp.
|
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. |
|
inherited |
Delete a child of this node.
| removeThis | Node to delete. |
Definition at line 689 of file ticpp.cpp.
|
inherited |
Replace a child of this node.
Throws if you try to replace with a document.
| Exception | When TiXmlNode::ReplaceChild returns Null. |
Definition at line 679 of file ticpp.cpp.
|
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.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
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.
References GetTiXmlPointer(), TiXmlNode::SetValue(), and ticpp::Base::ToString().
|
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 |
|
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 1000 of file ticpp.cpp.
|
inherited |
Pointer conversion - replaces TiXmlNode::ToDeclaration.
| Exception | When this node is not a Declaration. |
Definition at line 1014 of file ticpp.cpp.
|
inherited |
Pointer conversion - replaces TiXmlNode::ToDocument.
Definition at line 986 of file ticpp.cpp.
|
inherited |
Pointer conversion - replaces TiXmlNode::ToElement.
Definition at line 993 of file ticpp.cpp.
|
inlineinherited |
|
inlineinherited |
|
inherited |
Pointer conversion - replaces TiXmlNode::ToStylesheetReference.
| Exception | When this node is not a StylesheetReference. |
Definition at line 1021 of file ticpp.cpp.
|
inherited |
Pointer conversion - replaces TiXmlNode::ToText.
Definition at line 1007 of file ticpp.cpp.
| std::string StylesheetReference::Type | ( | ) | const |
Type.
Will return an empty string if none was found.
Definition at line 909 of file ticpp.cpp.
References ticpp::NodeImp< TiXmlStylesheetReference >::m_tiXmlPointer.
|
inlineprotectedinherited |
|
inherited |
Get the value of this node.
Simple wrapper for TiXmlNode::ValueStr.
Definition at line 480 of file ticpp.cpp.
|
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::StylesheetReference::StylesheetReference().
|
protectedinherited |
Internal pointer to the TiXml Class which is being wrapped.
Definition at line 1262 of file ticpp.h.
Referenced by ticpp::StylesheetReference::Href(), and ticpp::StylesheetReference::Type().