bioformats
5.1.0
|
Xerces DOM class wrapper. More...
#include <ome/common/xml/dom/Wrapper.h>
Public Types | |
typedef Parent | parent_type |
Parent type. | |
typedef parent_type::base_type | base_type |
Base type. | |
typedef parent_type::base_element_type | base_element_type |
Base element type. | |
typedef WrappedType | element_type |
Wrapped Xerces element type. | |
Public Member Functions | |
Wrapper () | |
Constructor. | |
Wrapper (const base_type &base) | |
Copy construct a Wrapper. More... | |
template<typename Deleter > | |
Wrapper (typename parent_type::base_element_type *base, Deleter del) | |
Construct a Wrapper from a base_element_type * (managed). More... | |
Wrapper (typename parent_type::base_element_type *base) | |
Construct a Wrapper from a base_element_type * (unmanaged). More... | |
~Wrapper () | |
Destructor. | |
element_type * | get () |
Get wrapped element_type *. More... | |
const element_type * | get () const |
Get wrapped element_type *. More... | |
Wrapper & | operator= (const Wrapper &wrapped) |
Assign a Wrapper. More... | |
element_type & | operator* () noexcept |
Dereference to element_type. More... | |
const element_type & | operator* () const noexcept |
Dereference to const element_type. More... | |
element_type * | operator-> () noexcept |
Dereference to element_type. More... | |
const element_type * | operator-> () const noexcept |
Dereference to const element_type. More... | |
Protected Member Functions | |
virtual void | assign (const base_type &wrapped) |
Assign a new wrapped value. More... | |
virtual void | assign (ome::compat::shared_ptr< base_element_type > &wrapped) |
Assign a new wrapped value. More... | |
Private Attributes | |
element_type * | wrapped |
The wrapped type. | |
Xerces DOM class wrapper.
The wrapper behaves as though is the wrapped DOM type; it can be dereferenced using the "*" or "->" operators to obtain a reference or pointer to the wrapped object. It can also be cast to a pointer to the wrapped object, so can substitute for it directly.
The purpose of this wrapper is to manage the lifetime of DOM types, which would otherwise require manual memory management.
|
inline |
Copy construct a Wrapper.
base | the base type to copy (must be an element_type). |
|
inlineexplicit |
|
inlineexplicit |
|
inlineprotectedvirtual |
Assign a new wrapped value.
wrapped | the new value. |
Reimplemented in ome::common::xml::dom::Wrapper< xercesc::DOMElement, Node >, and ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >.
Referenced by ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >::operator=(), and ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >::Wrapper().
|
inlineprotectedvirtual |
Assign a new wrapped value.
wrapped | the new value. |
Reimplemented in ome::common::xml::dom::Wrapper< xercesc::DOMElement, Node >, and ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >.
|
inline |
Get wrapped element_type *.
Referenced by ome::common::xml::dom::Node::appendChild(), ome::common::xml::dom::writeDocument(), and ome::common::xml::dom::writeNode().
|
inline |
Get wrapped element_type *.
|
inlinenoexcept |
Dereference to element_type.
|
inlinenoexcept |
Dereference to const element_type.
|
inlinenoexcept |
Dereference to element_type.
|
inlinenoexcept |
Dereference to const element_type.
|
inline |
Assign a Wrapper.
wrapped | the Wrapper to assign. |
Referenced by ome::common::xml::dom::Document::operator=().