Qpid Management Framework  0.24
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
qmf::Handle< T > Class Template Reference

#include <Handle.h>

Public Member Functions

QMF_INLINE_EXTERN bool isValid () const
 
QMF_INLINE_EXTERN bool isNull () const
 
QMF_INLINE_EXTERN operator bool () const
 
QMF_INLINE_EXTERN bool operator! () const
 
void swap (Handle< T > &h)
 

Protected Types

typedef T Impl
 

Protected Member Functions

QMF_INLINE_EXTERN Handle ()
 
QMF_EXTERN Handle (const Handle &)
 
QMF_EXTERN Handleoperator= (const Handle &)
 

Protected Attributes

Implimpl
 

Friends

class PrivateImplRef< T >
 

Detailed Description

template<class T>
class qmf::Handle< T >

A handle is like a pointer: refers to an underlying implementation object. Copying the handle does not copy the object.

Handles can be null, like a 0 pointer. Use isValid(), isNull() or the conversion to bool to test for a null handle.

Member Typedef Documentation

template<class T>
typedef T qmf::Handle< T >::Impl
protected

Constructor & Destructor Documentation

template<class T>
QMF_INLINE_EXTERN qmf::Handle< T >::Handle ( )
inlineprotected
template<class T>
QMF_EXTERN qmf::Handle< T >::Handle ( const Handle< T > &  )
protected

Member Function Documentation

template<class T>
QMF_INLINE_EXTERN bool qmf::Handle< T >::isNull ( ) const
inline
Returns
true if handle is null. It is an error to call any function on a null handle.
template<class T>
QMF_INLINE_EXTERN bool qmf::Handle< T >::isValid ( ) const
inline
Returns
true if handle is valid, i.e. not null.
template<class T>
QMF_INLINE_EXTERN qmf::Handle< T >::operator bool ( ) const
inline

Conversion to bool supports idiom if (handle) { handle->... }

template<class T>
QMF_INLINE_EXTERN bool qmf::Handle< T >::operator! ( ) const
inline

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }

template<class T>
QMF_EXTERN Handle& qmf::Handle< T >::operator= ( const Handle< T > &  )
protected
template<class T>
void qmf::Handle< T >::swap ( Handle< T > &  h)
inline

Friends And Related Function Documentation

template<class T>
friend class PrivateImplRef< T >
friend

Member Data Documentation

template<class T>
Impl* qmf::Handle< T >::impl
protected

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