#include <ETL/handle>
Inheritance diagram for handle< T >:
Public Types | |
typedef T | value_type |
typedef T & | reference |
typedef const T & | const_reference |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef int | count_type |
typedef int | size_type |
Public Member Functions | |
handle () | |
Default constructor - empty handle. | |
handle (pointer x) | |
Constructor that constructs from a pointer to new object. | |
handle (const handle< value_type > &x) | |
Default copy constructor. | |
~handle () | |
Handle is released on deletion. | |
handle< value_type > & | operator= (const handle< value_type > &x) |
Assignment operator. | |
handle< value_type > & | swap (handle< value_type > &x) |
Swaps the values of two handles without reference counts. | |
void | detach () |
Handle detach procedure. | |
void | reset () |
bool | empty () const |
void | spawn () |
Creates a new instance of a T object and puts it in the handle. | |
handle< value_type > | clone () const |
handle< const value_type > | constant () const |
Returns a constant handle to our object. | |
count_type | count () const |
Returns number of instances. | |
bool | unique () const |
Returns true if there is only one instance of the object. | |
reference | operator * () const |
pointer | operator-> () const |
operator bool () const | |
More explicit bool cast. | |
operator handle () const | |
pointer | get () const |
Returns pointer to the object that is being wrapped. | |
bool | operator! () const |
template<class U> | |
operator handle () const | |
static_cast<> overload -- Useful for implicit casts | |
Static Public Member Functions | |
template<class U> | |
static handle< T > | cast_static (const handle< U > &x) |
static_cast<> wrapper | |
template<class U> | |
static handle< T > | cast_dynamic (const handle< U > &x) |
dynamic_cast<> wrapper | |
template<class U> | |
static handle< T > | cast_const (const handle< U > &x) |
const_cast<> wrapper | |
template<class U> | |
static handle< T > | cast_reinterpret (const handle< U > &x) |
reinterpret_cast<> wrapper | |
template<class U> | |
static handle< T > | cast_static (const loose_handle< U > &x) |
template<class U> | |
static handle< T > | cast_dynamic (const loose_handle< U > &x) |
template<class U> | |
static handle< T > | cast_const (const loose_handle< U > &x) |
template<class U> | |
static handle< T > | cast_reinterpret (const loose_handle< U > &x) |
template<class U> | |
static handle< T > | cast_static (const rhandle< U > &x) |
template<class U> | |
static handle< T > | cast_dynamic (const rhandle< U > &x) |
template<class U> | |
static handle< T > | cast_const (const rhandle< U > &x) |
template<class U> | |
static handle< T > | cast_reinterpret (const rhandle< U > &x) |
template<class U> | |
static handle< T > | cast_static (U *x) |
template<class U> | |
static handle< T > | cast_dynamic (U *x) |
template<class U> | |
static handle< T > | cast_const (U *x) |
template<class U> | |
static handle< T > | cast_reinterpret (U *x) |
Protected Attributes | |
value_type * | obj |
Pointer to object. |
Definition at line 130 of file _handle.h.
|
Reimplemented in rhandle< T >. |
|
Reimplemented in rhandle< T >. |
|
Reimplemented in rhandle< T >. |
|
Reimplemented in rhandle< T >. |
|
Reimplemented in rhandle< T >. |
|
Reimplemented in rhandle< T >. |
|
Reimplemented in rhandle< T >. |
|
Default constructor - empty handle.
Definition at line 148 of file _handle.h. Referenced by handle< T >::spawn(). |
|
Constructor that constructs from a pointer to new object.
Definition at line 151 of file _handle.h. References handle< T >::obj. |
|
Default copy constructor.
Definition at line 158 of file _handle.h. References handle< T >::obj. |
|
Handle is released on deletion.
Definition at line 165 of file _handle.h. References handle< T >::detach(). |
|
Assignment operator.
Reimplemented in rhandle< T >. Definition at line 188 of file _handle.h. References handle< T >::detach(), handle< T >::get(), and handle< T >::obj. Referenced by handle< T >::spawn(). |
|
Swaps the values of two handles without reference counts.
Reimplemented in rhandle< T >. Definition at line 202 of file _handle.h. References handle< T >::get(), and handle< T >::obj. |
|
Handle detach procedure.
unref()'s the object and sets the internal object pointer to Reimplemented in rhandle< T >. Definition at line 213 of file _handle.h. References handle< T >::obj. Referenced by rhandle< T >::detach(), handle< T >::operator=(), handle< T >::reset(), and handle< T >::~handle(). |
|
Reimplemented in rhandle< T >. Definition at line 229 of file _handle.h. References handle< T >::detach(). |
|
Definition at line 231 of file _handle.h. References handle< T >::obj. |
|
Creates a new instance of a T object and puts it in the handle. Uses the default constructor Reimplemented in rhandle< T >. Definition at line 235 of file _handle.h. References handle< T >::handle(), and handle< T >::operator=(). |
|
Definition at line 237 of file _handle.h. References handle< T >::obj. |
|
Returns a constant handle to our object.
Definition at line 240 of file _handle.h. References handle< T >::obj. |
|
Returns number of instances.
Definition at line 244 of file _handle.h. References handle< T >::obj. Referenced by handle< T >::unique(). |
|
Returns true if there is only one instance of the object.
Definition at line 249 of file _handle.h. References handle< T >::count(), and handle< T >::obj. |
|
Definition at line 253 of file _handle.h. References handle< T >::obj. |
|
Definition at line 257 of file _handle.h. References handle< T >::obj. |
|
More explicit bool cast.
Definition at line 261 of file _handle.h. References NULL, and handle< T >::obj. |
|
Definition at line 264 of file _handle.h. References handle< T >::obj. |
|
Definition at line 270 of file _handle.h. References handle< T >::get(). |
|
Definition at line 275 of file _handle.h. References handle< T >::get(). |
|
Definition at line 280 of file _handle.h. References handle< T >::get(). |
|
Definition at line 285 of file _handle.h. References handle< T >::get(). |
|
Definition at line 770 of file _handle.h. References loose_handle< T >::get(). |
|
Definition at line 774 of file _handle.h. References loose_handle< T >::get(). |
|
Definition at line 778 of file _handle.h. References loose_handle< T >::get(). |
|
Definition at line 782 of file _handle.h. References loose_handle< T >::get(). |
|
Definition at line 788 of file _handle.h. References handle< T >::get(). |
|
Definition at line 792 of file _handle.h. References handle< T >::get(). |
|
Definition at line 796 of file _handle.h. References handle< T >::get(). |
|
Definition at line 800 of file _handle.h. References handle< T >::get(). |
|
|
|
|
|
|
|
|
|
Returns pointer to the object that is being wrapped.
Definition at line 304 of file _handle.h. References handle< T >::obj. Referenced by handle< T >::cast_const(), handle< T >::cast_dynamic(), handle< T >::cast_reinterpret(), handle< T >::cast_static(), operator!=(), loose_handle< T >::operator=(), rhandle< T >::operator=(), handle< T >::operator=(), operator==(), rhandle< T >::replace(), and handle< T >::swap(). |
|
Definition at line 307 of file _handle.h. References handle< T >::obj. |
|
static_cast<> overload -- Useful for implicit casts
Definition at line 312 of file _handle.h. References handle< T >::obj. |
|