An XPath node which can store handles to a XML::Node or an XML::Attribute. More...
#include <xpathnode.h>
Public Member Functions | |
XPathNode () | |
Default constructor; constructs empty XPath node. | |
XPathNode (const Node &node) | |
Construct From a XML::Node. More... | |
XPathNode (const Attribute &GetAttribute, const Node &GetParent) | |
Construct From a XML::Attribute. More... | |
Attribute | GetAttribute () const |
Get the XML::Attribute this is referencing. More... | |
Node | GetNode () const |
Get the XML::Node this is referencing. More... | |
Node | GetParent () const |
Get the parent of the XML::Node or XML::Attribute this refers to. More... | |
operator unspecified_bool_type () const | |
Used to convert this to a boolean value in a safe way. More... | |
bool | operator! () const |
Logical not operator, used a workaround for borland compiler. More... | |
bool | operator!= (const XPathNode &n) const |
Called when comparing two XPathNode instances for inequality. More... | |
bool | operator== (const XPathNode &n) const |
Called when comparing two XPathNode instances for equality. More... | |
An XPath node which can store handles to a XML::Node or an XML::Attribute.
Because an XPath node can be either a XML::Node or an XML::Attribute, there is a special type, XPathNode, which is a discriminated union of these types. A value of this type contains two node handles, one of XML::Node type, and another one of XML::Attribute type; at most one of them can be non-null. The accessors to get these handles are available: XPathNode::GetNode() an XPathNode::GetAttribute() .
XPath nodes can be null, in which case both accessors return null handles.
Definition at line 76 of file xpathnode.h.
Mezzanine::XML::XPathNode::XPathNode | ( | const Node & | node) |
Construct From a XML::Attribute.
GetAttribute | The XML::Attribute this handle should reference. |
GetParent | The XML::Node the XML::Attribute is on. |
Attribute Mezzanine::XML::XPathNode::GetAttribute | ( | ) | const |
Get the XML::Attribute this is referencing.
Node Mezzanine::XML::XPathNode::GetNode | ( | ) | const |
Node Mezzanine::XML::XPathNode::GetParent | ( | ) | const |
Get the parent of the XML::Node or XML::Attribute this refers to.
Mezzanine::XML::XPathNode::operator unspecified_bool_type | ( | ) | const |
Used to convert this to a boolean value in a safe way.
bool Mezzanine::XML::XPathNode::operator! | ( | ) | const |
Logical not operator, used a workaround for borland compiler.
bool Mezzanine::XML::XPathNode::operator!= | ( | const XPathNode & | n) | const |
Called when comparing two XPathNode instances for inequality.
n | The other XML::XPathNode to compare this Node against for inequality. |
bool Mezzanine::XML::XPathNode::operator== | ( | const XPathNode & | n) | const |
Called when comparing two XPathNode instances for equality.
n | The other XML::XPathNode to compare this Node against for equality. |