ome-common
5.5.0
|
Base of the DOM wrapper hierarchy. More...
#include <ome/common/xml/dom/Base.h>
Public Types | |
typedef Base | base_type |
Base type. | |
typedef T | base_element_type |
Base element type (root type of the wrapped type). | |
Public Member Functions | |
Base () | |
Constructor. | |
template<typename Deleter > | |
Base (base_element_type *wrapped, Deleter del) | |
Construct with initial wrapped value (managed). More... | |
Base (base_element_type *wrapped) | |
Construct with initial wrapped value (unmanaged). More... | |
virtual | ~Base () |
Destructor. | |
base_element_type * | get () |
Get wrapped base_element_type *. More... | |
const base_element_type * | get () const |
Get wrapped base_element_type *. More... | |
operator bool () const | |
Check if the wrapped type is not null. More... | |
bool | operator== (std::nullptr_t) const |
Check if the wrapped type is null. More... | |
bool | operator!= (std::nullptr_t) const |
Check if the wrapped type is not null. More... | |
void | reset () |
Free the managed resource. More... | |
Protected Member Functions | |
virtual void | null_check () const |
Check if the wrapped type is null. More... | |
virtual void | assign (const base_type &wrapped) |
Assign a new wrapped value. More... | |
virtual void | assign (std::shared_ptr< base_element_type > &wrapped) |
Assign a new wrapped value. More... | |
template<typename D > | |
D * | assign_check (base_element_type *newbase) |
Check that a new wrapped value is of the correct derived type. More... | |
Private Attributes | |
std::shared_ptr< base_element_type > | base |
Wrapped reference. | |
Base of the DOM wrapper hierarchy.
This contains the managed or unmanaged base pointer to the wrapped type.
|
inlineexplicit |
Construct with initial wrapped value (managed).
wrapped | the value to wrap. |
del | the deleter to clean up the wrapped value. |
|
inlineexplicit |
Construct with initial wrapped value (unmanaged).
wrapped | the value to wrap. |
|
inlineprotectedvirtual |
Assign a new wrapped value.
wrapped | the new value. |
Reimplemented in ome::common::xml::dom::Wrapper< xercesc::DOMElement, Node >, ome::common::xml::dom::Wrapper< xercesc::DOMNode, Base< xercesc::DOMNode > >, ome::common::xml::dom::Wrapper< xercesc::DOMNodeList, Base< xercesc::DOMNodeList > >, ome::common::xml::dom::Wrapper< xercesc::DOMNamedNodeMap, Base< xercesc::DOMNamedNodeMap > >, and ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >.
|
inlineprotectedvirtual |
Assign a new wrapped value.
wrapped | the new value. |
Reimplemented in ome::common::xml::dom::Wrapper< xercesc::DOMElement, Node >, ome::common::xml::dom::Wrapper< xercesc::DOMNode, Base< xercesc::DOMNode > >, ome::common::xml::dom::Wrapper< xercesc::DOMNodeList, Base< xercesc::DOMNodeList > >, ome::common::xml::dom::Wrapper< xercesc::DOMNamedNodeMap, Base< xercesc::DOMNamedNodeMap > >, and ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >.
|
inlineprotected |
Check that a new wrapped value is of the correct derived type.
Intended for use by derivied classes.
newbase | the new value. |
a | std::logic_error if not of the specified type. |
|
inline |
Get wrapped base_element_type *.
Referenced by ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >::assign().
|
inline |
Get wrapped base_element_type *.
|
inlineprotectedvirtual |
Check if the wrapped type is null.
a | std::logic_error if null. |
|
inline |
Check if the wrapped type is not null.
|
inline |
Check if the wrapped type is not null.
|
inline |
Check if the wrapped type is null.
|
inline |
Free the managed resource.
The managed resource will be freed and made null.