Qpid C++ Messaging API  1.39.0
qpid::messaging::Handle< T > Class Template Reference

#include <Handle.h>

Public Member Functions

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

Protected Types

typedef T Impl
 

Protected Attributes

Impl * impl
 

Friends

class PrivateImplRef< T >
 

Detailed Description

template<class T>
class qpid::messaging::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 Function Documentation

◆ isNull()

template<class T>
QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle< T >::isNull ( ) const
inline
Returns
true if handle is null. It is an error to call any function on a null handle.

◆ isValid()

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

◆ operator bool()

template<class T>
QPID_MESSAGING_INLINE_EXTERN qpid::messaging::Handle< T >::operator bool ( ) const
inline

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

◆ operator!()

template<class T>
QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle< T >::operator! ( ) const
inline

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


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