OpenGUI::RefObjHandle< OBJECT > Class Template Reference

#include <OpenGUI_RefObject.h>

List of all members.


Detailed Description

template<typename OBJECT>
class OpenGUI::RefObjHandle< OBJECT >

Handle object for RefObject derived classes.


Public Member Functions

 RefObjHandle (RefObject *counted_object=0)
 Create a handle from an existing object pointer, or empty.
 RefObjHandle (const RefObjHandle< OBJECT > &other_handle)
 Create a handle from another handle.
RefObjHandle< OBJECT > & operator= (const RefObjHandle< OBJECT > &right)
 Assignment operator.
unsigned int getHandleCount ()
 Return the total number of handles to the object, yourself included.
OBJECT & operator * () const
 The usual *Handle resolving.
OBJECT * operator-> () const
 The usual Handle->something resolving.
 operator bool () const
 This makes "if( Handle )" work just like "if( !Handle.isNull() )".
bool operator== (int p) const
 This allows us to use "if( Handle == NULL )" and "if( Handle == 0 )".
bool operator!= (int p) const
 used for "if( Handle != NULL )" and "if(Handle != 0 )"
bool operator== (const OBJECT *p) const
 Used for "if( Handle == normal_pointer )".
bool operator== (const RefObjHandle &r) const
 Used for "if( Handle == Handle )".
bool operator!= (const RefObjHandle &r) const
 Used for "if( Handle != Handle )".
bool operator!= (const OBJECT *p) const
 Used for "if( Handle != normal_pointer )".
bool isNull () const
 Handle.isNull() returns true if RefPtr carries no pointer.
OBJECT * get () const
 Returns the carried pointer in raw form.


Constructor & Destructor Documentation

template<typename OBJECT>
OpenGUI::RefObjHandle< OBJECT >::RefObjHandle RefObject counted_object = 0  )  [inline]
 

Create a handle from an existing object pointer, or empty.

template<typename OBJECT>
OpenGUI::RefObjHandle< OBJECT >::RefObjHandle const RefObjHandle< OBJECT > &  other_handle  )  [inline]
 

Create a handle from another handle.


Member Function Documentation

template<typename OBJECT>
OBJECT* OpenGUI::RefObjHandle< OBJECT >::get  )  const [inline]
 

Returns the carried pointer in raw form.

template<typename OBJECT>
unsigned int OpenGUI::RefObjHandle< OBJECT >::getHandleCount  )  [inline]
 

Return the total number of handles to the object, yourself included.

template<typename OBJECT>
bool OpenGUI::RefObjHandle< OBJECT >::isNull  )  const [inline]
 

Handle.isNull() returns true if RefPtr carries no pointer.

template<typename OBJECT>
OBJECT& OpenGUI::RefObjHandle< OBJECT >::operator *  )  const [inline]
 

The usual *Handle resolving.

template<typename OBJECT>
OpenGUI::RefObjHandle< OBJECT >::operator bool  )  const [inline]
 

This makes "if( Handle )" work just like "if( !Handle.isNull() )".

template<typename OBJECT>
bool OpenGUI::RefObjHandle< OBJECT >::operator!= const OBJECT *  p  )  const [inline]
 

Used for "if( Handle != normal_pointer )".

template<typename OBJECT>
bool OpenGUI::RefObjHandle< OBJECT >::operator!= const RefObjHandle< OBJECT > &  r  )  const [inline]
 

Used for "if( Handle != Handle )".

template<typename OBJECT>
bool OpenGUI::RefObjHandle< OBJECT >::operator!= int  p  )  const [inline]
 

used for "if( Handle != NULL )" and "if(Handle != 0 )"

template<typename OBJECT>
OBJECT* OpenGUI::RefObjHandle< OBJECT >::operator->  )  const [inline]
 

The usual Handle->something resolving.

template<typename OBJECT>
RefObjHandle<OBJECT>& OpenGUI::RefObjHandle< OBJECT >::operator= const RefObjHandle< OBJECT > &  right  )  [inline]
 

Assignment operator.

template<typename OBJECT>
bool OpenGUI::RefObjHandle< OBJECT >::operator== const RefObjHandle< OBJECT > &  r  )  const [inline]
 

Used for "if( Handle == Handle )".

template<typename OBJECT>
bool OpenGUI::RefObjHandle< OBJECT >::operator== const OBJECT *  p  )  const [inline]
 

Used for "if( Handle == normal_pointer )".

template<typename OBJECT>
bool OpenGUI::RefObjHandle< OBJECT >::operator== int  p  )  const [inline]
 

This allows us to use "if( Handle == NULL )" and "if( Handle == 0 )".


The documentation for this class was generated from the following file:
Copyright © 2006 OpenGUI | OpenGUI.SF.net
Generated: Sun Sep 9 02:00:21 2007