Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
qmf::Handle< T > Class Template Reference

A handle is like a pointer: refers to an underlying implementation object. More...

#include <qmf/Handle.h>

Public Member Functions

QMF_INLINE_EXTERN bool isValid () const
 
QMF_INLINE_EXTERN bool isNull () const
 
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->... More...
 
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }. More...
 
void swap (Handle< T > &h)
 

Protected Types

typedef T Impl
 

Protected Member Functions

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

Protected Attributes

Implimpl
 

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.

Definition at line 43 of file Handle.h.

Member Typedef Documentation

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

Definition at line 61 of file Handle.h.

Constructor & Destructor Documentation

template<class T>
QMF_INLINE_EXTERN qmf::Handle< T >::Handle ( )
inlineprotected

Definition at line 62 of file Handle.h.

template<class T>
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.

Definition at line 50 of file Handle.h.

template<class T>
QMF_INLINE_EXTERN bool qmf::Handle< T >::isValid ( ) const
inline
Returns
true if handle is valid, i.e. not null.

Definition at line 47 of file Handle.h.

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

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

}

Definition at line 53 of file Handle.h.

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

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

Definition at line 56 of file Handle.h.

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

Definition at line 58 of file Handle.h.

Member Data Documentation

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

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

Qpid C++ API Reference
Generated on Tue Oct 28 2014 for Qpid C++ Client API by doxygen 1.8.5