bioformats  5.1.6
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 >:

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_typeget ()
 Get wrapped base_element_type *. More...
 
const base_element_typeget () 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_typebase
 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 
)
inlineexplicit

Construct with initial wrapped value (managed).

Parameters
wrappedthe value to wrap.
delthe deleter to clean up the wrapped value.
template<typename T>
ome::common::xml::dom::Base< T >::Base ( base_element_type wrapped)
inlineexplicit

Construct with initial wrapped value (unmanaged).

Parameters
wrappedthe value to wrap.

Member Function Documentation

template<typename T>
virtual void ome::common::xml::dom::Base< T >::assign ( const base_type wrapped)
inlineprotectedvirtual
template<typename T>
virtual void ome::common::xml::dom::Base< T >::assign ( ome::compat::shared_ptr< base_element_type > &  wrapped)
inlineprotectedvirtual
template<typename T>
template<typename D >
D* ome::common::xml::dom::Base< T >::assign_check ( base_element_type newbase)
inlineprotected

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

Intended for use by derivied classes.

Parameters
newbasethe new value.
Returns
the value cast to the derived type.
Exceptions
astd::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
inlineprotectedvirtual

Check if the wrapped type is NULL.

Exceptions
astd::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: