reSIProcate/DialogUsageManager  9694
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | Friends
resip::Handle< T > Class Template Reference

#include <Handle.hxx>

Inheritance diagram for resip::Handle< T >:
Inheritance graph
[legend]
Collaboration diagram for resip::Handle< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Handle (HandleManager &ham, Handled::Id id)
 Handle ()
bool isValid () const
T * get ()
const T * get () const
T * operator-> ()
const T * operator-> () const
T & operator* ()
const T & operator* () const
Handled::Id getId () const
bool operator== (const Handle< T > &other)
bool operator< (const Handle< T > &other) const

Static Public Member Functions

static Handle< T > NotValid ()

Protected Attributes

Handled::Id mId

Private Attributes

HandleManagermHam

Friends

class Handled

Detailed Description

template<class T>
class resip::Handle< T >

Definition at line 14 of file Handle.hxx.


Constructor & Destructor Documentation

template<class T>
resip::Handle< T >::Handle ( HandleManager ham,
Handled::Id  id 
) [inline]

Definition at line 17 of file Handle.hxx.

                                               : mHam(&ham), mId(id)
      {
      }
template<class T>
resip::Handle< T >::Handle ( ) [inline]

Definition at line 21 of file Handle.hxx.

               : mHam(0), mId(0)
      {
      }

Member Function Documentation

template<class T>
T* resip::Handle< T >::get ( ) [inline]

Definition at line 38 of file Handle.hxx.

Referenced by resip::DestroyUsage::destroy(), main(), resip::BasicClientUserAgent::onAnswer(), resip::BasicClientUserAgent::onConnected(), resip::BasicClientUserAgent::onEarlyMedia(), resip::BasicClientUserAgent::onFailure(), resip::BasicClientUserAgent::onFlowTerminated(), resip::BasicClientUserAgent::onForkDestroyed(), resip::BasicClientUserAgent::onInfo(), resip::BasicClientUserAgent::onInfoFailure(), resip::BasicClientUserAgent::onInfoSuccess(), resip::BasicClientUserAgent::onMessage(), resip::BasicClientUserAgent::onMessageFailure(), resip::BasicClientUserAgent::onMessageSuccess(), resip::BasicClientCall::onNewSession(), resip::BasicClientUserAgent::onNewSession(), resip::BasicClientUserAgent::onNewSubscription(), resip::BasicClientUserAgent::onNonDialogCreatingProvisional(), resip::BasicClientUserAgent::onNotifyNotReceived(), resip::BasicClientCall::onOffer(), resip::UserAgent::onOffer(), resip::BasicClientUserAgent::onOffer(), resip::BasicClientUserAgent::onOfferRejected(), resip::BasicClientUserAgent::onOfferRequestRejected(), resip::BasicClientUserAgent::onOfferRequired(), resip::BasicClientUserAgent::onProvisional(), resip::BasicClientUserAgent::onReadyToSend(), resip::BasicClientUserAgent::onRedirected(), resip::BasicClientUserAgent::onRedirectReceived(), resip::BasicClientUserAgent::onRefer(), resip::BasicClientUserAgent::onReferAccepted(), resip::BasicClientUserAgent::onReferNoSub(), resip::BasicClientUserAgent::onReferRejected(), resip::BasicClientUserAgent::onRemoteSdpChanged(), resip::BasicClientUserAgent::onRequestRetry(), resip::BasicClientUserAgent::onStaleCallTimeout(), resip::BasicClientUserAgent::onTerminated(), resip::BasicClientUserAgent::onTrying(), resip::BasicClientUserAgent::onUpdateActive(), resip::BasicClientUserAgent::onUpdateExtension(), and resip::BasicClientUserAgent::onUpdatePending().

      {
         if (!mHam)
         {
            //assert(0);
            throw HandleException("Reference to unitialized handle.", __FILE__, __LINE__);
         }
         return static_cast<T*>(mHam->getHandled(mId));
      }
template<class T>
const T* resip::Handle< T >::get ( ) const [inline]

Definition at line 48 of file Handle.hxx.

      {
         if (!mHam)
         {
            //assert(0);
            throw HandleException("Reference to unitialized handle.", __FILE__, __LINE__);
         }
         return static_cast<T*>(mHam->getHandled(mId));
      }
template<class T>
Handled::Id resip::Handle< T >::getId ( ) const [inline]

Definition at line 79 of file Handle.hxx.

Referenced by resip::BasicClientUserAgent::onSuccess(), and resip::InviteSession::refer().

      {
         return mId;
      }
template<class T>
bool resip::Handle< T >::isValid ( ) const [inline]
template<class T>
static Handle<T> resip::Handle< T >::NotValid ( ) [inline, static]

Definition at line 84 of file Handle.hxx.

Referenced by resip::DialogSet::getClientPublication(), resip::DialogSet::getServerOutOfDialog(), and resip::DialogSet::getServerRegistration().

      {
         static Handle<T> notValid;
         return notValid;
      }
template<class T>
T& resip::Handle< T >::operator* ( ) [inline]

Definition at line 68 of file Handle.hxx.

      {
         return *get();
      }
template<class T>
const T& resip::Handle< T >::operator* ( ) const [inline]

Definition at line 73 of file Handle.hxx.

      {
         return *get();
      }
template<class T>
T* resip::Handle< T >::operator-> ( ) [inline]

Definition at line 58 of file Handle.hxx.

      {
         return get();
      }
template<class T>
const T* resip::Handle< T >::operator-> ( ) const [inline]

Definition at line 63 of file Handle.hxx.

      {
         return get();
      }
template<class T>
bool resip::Handle< T >::operator< ( const Handle< T > &  other) const [inline]

Definition at line 96 of file Handle.hxx.

      {
         assert(mHam);
         assert(other.mHam);
         return mId < other.mId;
      }
template<class T>
bool resip::Handle< T >::operator== ( const Handle< T > &  other) [inline]

Definition at line 90 of file Handle.hxx.

      {
         return (mHam == other.mHam) && (mId == other.mId);
      }

Friends And Related Function Documentation

template<class T>
friend class Handled [friend]

Definition at line 109 of file Handle.hxx.


Member Data Documentation

template<class T>
HandleManager* resip::Handle< T >::mHam [private]
template<class T>
Handled::Id resip::Handle< T >::mId [protected]

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