ome-common 5.2.0-m2

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ome::common::xml::dom::Base< T > Class Template Reference

Base of the DOM wrapper hierarchy. More...

`#include <ome/common/xml/dom/Base.h>`

Inheritance diagram for ome::common::xml::dom::Base< T >:
[legend]

## 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 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 (ome::compat::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
ome::compat::shared_ptr< base_element_type > | base
| Wrapped reference.

## Detailed Description

### template<typename T>
class ome::common::xml::dom::Base< T >

Base of the DOM wrapper hierarchy.

This contains the managed or unmanaged base pointer to the wrapped type.

## Constructor & Destructor Documentation

template<typename T>
template<typename Deleter >

ome::common::xml::dom::Base< T >::Base | ( | base_element_type * | wrapped,
|  | Deleter | del
| ) |  |
| inline explicit

Construct with initial wrapped value (managed).

Parameters

  wrapped | the value to wrap.
  del | the deleter to clean up the wrapped value.

template<typename T>

ome::common::xml::dom::Base< T >::Base | ( | base_element_type * | wrapped | ) |
| inline explicit

Construct with initial wrapped value (unmanaged).

Parameters

  wrapped | the value to wrap.

## Member Function Documentation

template<typename T>

virtual void ome::common::xml::dom::Base< T >::assign | ( | const base_type & | wrapped | ) |
| inline protected virtual

Assign a new wrapped value.

Parameters

  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 >.

Referenced by ome::common::xml::dom::Base< xercesc::DOMNode >::reset().

Here is the caller graph for this function:
template<typename T>

virtual void ome::common::xml::dom::Base< T >::assign | ( | ome::compat::shared_ptr< base_element_type > & | wrapped | ) |
| inline protected virtual

Assign a new wrapped value.

Parameters

  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 >.

template<typename T>
template<typename D >

D* ome::common::xml::dom::Base< T >::assign_check | ( | base_element_type * | newbase | ) |
| inline protected

Check that a new wrapped value is of the correct derived type.

Intended for use by derivied classes.

Parameters

  newbase | the new value.

Returns
  the value cast to the derived type.

Exceptions

  a | `std::logic_error` if not of the specified type.

template<typename T>

base_element_type* ome::common::xml::dom::Base< T >::get | ( |  | ) |
| inline

Get wrapped base_element_type *.

Note
  May be null.

Returns
  the wrapped base_element_type.

Referenced by ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >::assign().

Here is the caller graph for this function:
template<typename T>

const base_element_type* ome::common::xml::dom::Base< T >::get | ( |  | ) | const
| inline

Get wrapped base_element_type *.

Note
  May be null.

Returns
  the wrapped base_element_type.

template<typename T>

virtual void ome::common::xml::dom::Base< T >::null_check | ( |  | ) | const
| inline protected virtual

Check if the wrapped type is NULL.

Exceptions

  a | `std::logic_error` if NULL.

template<typename T>

ome::common::xml::dom::Base< T >::operator bool | ( |  | ) | const
| inline

Check if the wrapped type is NULL.

Returns
  true if valid, false if NULL.

template<typename T>

void ome::common::xml::dom::Base< T >::reset | ( |  | ) |
| inline

Free the managed resource.

The managed resource will be freed and made null.

The documentation for this class was generated from the following file:

- ome/common/xml/dom/Base.h