#include <xml_reference.h>
Inheritance diagram for mimas::xml_reference< T >:
Public Member Functions | |
xml_reference (T *_node, xml_document *_document) | |
Constructor for internal use only. | |
xml_reference (const xml_reference< T > &r) | |
Copy-constructor. | |
xml_reference< T > & | operator= (const xml_reference< T > &r) |
Assignment-operator. | |
T & | operator * (void) const |
Dereferencing-operator. | |
T * | operator-> (void) const |
Dereferencing-operator. | |
T * | get (void) const |
Get pointer to wrapped object. | |
operator bool (void) const | |
Check pointer for being not-null. | |
bool | operator! () const |
Check pointer for being null. | |
std::string | getNodeText (void) const throw (mimasexception,XMLException) |
Get text contained in this node. | |
xml_reference< XalanNode > | selectNode (const char *xPath) const throw (mimasexception,XMLException) |
Select node with given X-path. | |
xml_node_reference_list | selectNodes (const char *xPath) const throw (mimasexception,XMLException) |
Select list of nodes with given X-path. | |
bool | existNode (const char *xPath) const throw (XMLException) |
Check for node with given X-path. | |
xml_document * | getDocument (void) const |
Get pointer to parent document. | |
Protected Attributes | |
T * | node |
Pointer to node being wrapped. | |
xml_document * | document |
Pointer to parent document. |
This wrapper is used to wrap references to objects of type XalanNode
and XalanElement
.
Definition at line 36 of file xml_reference.h.
mimas::xml_reference< T >::xml_reference | ( | T * | _node, | |
xml_document * | _document | |||
) |
Constructor for internal use only.
mimas::xml_reference< T >::xml_reference | ( | const xml_reference< T > & | r | ) |
Copy-constructor.
xml_reference< T >& mimas::xml_reference< T >::operator= | ( | const xml_reference< T > & | r | ) |
Assignment-operator.
T& mimas::xml_reference< T >::operator * | ( | void | ) | const [inline] |
Dereferencing-operator.
Definition at line 47 of file xml_reference.h.
References mimas::xml_reference< T >::node.
T* mimas::xml_reference< T >::operator-> | ( | void | ) | const [inline] |
Dereferencing-operator.
Definition at line 50 of file xml_reference.h.
References mimas::xml_reference< T >::node.
T* mimas::xml_reference< T >::get | ( | void | ) | const [inline] |
Get pointer to wrapped object.
Definition at line 53 of file xml_reference.h.
References mimas::xml_reference< T >::node.
Referenced by mimas::dynamic_pointer_cast().
mimas::xml_reference< T >::operator bool | ( | void | ) | const [inline] |
Check pointer for being not-null.
true
, if pointer is not NULL
. Definition at line 56 of file xml_reference.h.
References mimas::xml_reference< T >::node.
bool mimas::xml_reference< T >::operator! | ( | void | ) | const [inline] |
Check pointer for being null.
true
, if pointer is NULL
. Definition at line 59 of file xml_reference.h.
References mimas::xml_reference< T >::node.
std::string mimas::xml_reference< T >::getNodeText | ( | void | ) | const throw (mimasexception,XMLException) |
Get text contained in this node.
xml_reference< XalanNode > mimas::xml_reference< T >::selectNode | ( | const char * | xPath | ) | const throw (mimasexception,XMLException) |
Select node with given X-path.
This method is only implemented for T=XalanElement!
To convert xml_refence<XalanNode>
to xml_refence<XalanElement>
do:
using namespace mimas;
...
xml_reference< XalanElement > =
dynamic_pointer_cast< XalanElement >( ... );
...
xPath | X-Path to the desired node. |
xml_node_reference_list mimas::xml_reference< T >::selectNodes | ( | const char * | xPath | ) | const throw (mimasexception,XMLException) |
Select list of nodes with given X-path.
This method is only implemented for T=XalanElement!
xPath | X-Path for finding the desired nodes. |
bool mimas::xml_reference< T >::existNode | ( | const char * | xPath | ) | const throw (XMLException) |
Check for node with given X-path.
This method only is implemented for XalanElement! The method will yield the same result as the following code:
( selectNodes( xPath ).getLength() > 0 )
xPath | X-Path of node(s) to check for. |
true
if there is a node with such path. xml_document* mimas::xml_reference< T >::getDocument | ( | void | ) | const [inline] |
Get pointer to parent document.
For internal use only.
Definition at line 96 of file xml_reference.h.
References mimas::xml_reference< T >::document.
Referenced by mimas::dynamic_pointer_cast().
T* mimas::xml_reference< T >::node [protected] |
Pointer to node being wrapped.
Definition at line 99 of file xml_reference.h.
Referenced by mimas::xml_reference< T >::get(), mimas::xml_reference< T >::operator *(), mimas::xml_reference< T >::operator bool(), mimas::xml_reference< T >::operator!(), and mimas::xml_reference< T >::operator->().
xml_document* mimas::xml_reference< T >::document [protected] |
Pointer to parent document.
Definition at line 101 of file xml_reference.h.
Referenced by mimas::xml_reference< T >::getDocument().