# loose_handle< T > Class Template Reference

Loose Object Handle. More...

`#include <ETL/handle>`

List of all members.

## 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

| loose_handle ()
| Default constructor - empty handle.
| loose_handle (pointer x)
| Constructor that constructs from a pointer to new object.
| loose_handle (const loose_handle< value_type > &x)
| Default copy constructor.
| loose_handle (const handle< value_type > &x)
template<class U>
const loose_handle< value_type > & | operator= (const handle< U > &x)
template<class U>
const loose_handle< value_type > & | operator= (const loose_handle< U > &x)
const loose_handle< value_type > & | operator= (const loose_handle< value_type > &x)
| Assignment operator.
loose_handle< value_type > & | swap (loose_handle< value_type > &x)
| Swaps the values of two handles without reference counts.
void | detach ()
| Handle release procedure.
void | reset ()
bool | empty () const
handle< value_type > | clone () const
loose_handle< const value_type > | constant () const
| Returns a constant handle to our object.
count_type | count () const
| Returns number of instances.
reference | operator* () const
pointer | operator-> () const
| operator loose_handle< const value_type > () const
| static_cast<> overload
| operator handle< value_type > () const
| operator rhandle< value_type > () const
pointer | get () const
| Returns pointer to the object that is being wrapped.
| operator bool () const
| More explicit bool cast.
bool | operator! () const
void | ref ()
bool | unref ()

## Protected Attributes

value_type * | obj
| Pointer to object.

## Detailed Description

### template<class T>
class loose_handle< T >

Loose Object Handle.

See also:
  shared_object, handle

Todo:
  This needs to be documented

Definition at line 643 of file _handle.h.

## Member Typedef Documentation

template<class T>

typedef T loose_handle< T >::value_type

Definition at line 647 of file _handle.h.

template<class T>

typedef T& loose_handle< T >::reference

Definition at line 648 of file _handle.h.

template<class T>

typedef const T& loose_handle< T >::const_reference

Definition at line 649 of file _handle.h.

template<class T>

typedef T* loose_handle< T >::pointer

Definition at line 650 of file _handle.h.

template<class T>

typedef const T* loose_handle< T >::const_pointer

Definition at line 651 of file _handle.h.

template<class T>

typedef int loose_handle< T >::count_type

Definition at line 652 of file _handle.h.

template<class T>

typedef int loose_handle< T >::size_type

Definition at line 653 of file _handle.h.

## Constructor & Destructor Documentation

template<class T>

loose_handle< T >::loose_handle | ( |  | ) | `[inline]`

Default constructor - empty handle.

Definition at line 664 of file _handle.h.

template<class T>

loose_handle< T >::loose_handle | ( | pointer | x | ) | `[inline]`

Constructor that constructs from a pointer to new object.

Definition at line 667 of file _handle.h.

template<class T>

loose_handle< T >::loose_handle | ( | const loose_handle< value_type > & | x | ) | `[inline]`

Default copy constructor.

Definition at line 670 of file _handle.h.

template<class T>

loose_handle< T >::loose_handle | ( | const handle< value_type > & | x | ) | `[inline]`

Definition at line 672 of file _handle.h.

## Member Function Documentation

template<class T>
template<class U>

const loose_handle<value_type>& loose_handle< T >::operator= | ( | const handle< U > & | x | ) | `[inline]`

Definition at line 675 of file _handle.h.

References handle< T >::get(), and loose_handle< T >::obj.

template<class T>
template<class U>

const loose_handle<value_type>& loose_handle< T >::operator= | ( | const loose_handle< U > & | x | ) | `[inline]`

Definition at line 685 of file _handle.h.

References loose_handle< T >::get(), and loose_handle< T >::obj.

template<class T>

const loose_handle<value_type>& loose_handle< T >::operator= | ( | const loose_handle< value_type > & | x | ) | `[inline]`

Assignment operator.

Definition at line 696 of file _handle.h.

References loose_handle< T >::get(), and loose_handle< T >::obj.

template<class T>

loose_handle<value_type>& loose_handle< T >::swap | ( | loose_handle< value_type > & | x | ) | `[inline]`

Swaps the values of two handles without reference counts.

Definition at line 707 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

void loose_handle< T >::detach | ( |  | ) | `[inline]`

Handle release procedure.

Definition at line 716 of file _handle.h.

References loose_handle< T >::obj.

Referenced by loose_handle< T >::reset().

template<class T>

void loose_handle< T >::reset | ( |  | ) | `[inline]`

Definition at line 721 of file _handle.h.

References loose_handle< T >::detach().

template<class T>

bool loose_handle< T >::empty | ( |  | ) | const`[inline]`

Definition at line 723 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

handle<value_type> loose_handle< T >::clone | ( |  | ) | const`[inline]`

Definition at line 725 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

loose_handle<const value_type> loose_handle< T >::constant | ( |  | ) | const`[inline]`

Returns a constant handle to our object.

Definition at line 728 of file _handle.h.

template<class T>

count_type loose_handle< T >::count | ( |  | ) | const`[inline]`

Returns number of instances.

Definition at line 732 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

reference loose_handle< T >::operator* | ( |  | ) | const`[inline]`

Definition at line 736 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

pointer loose_handle< T >::operator-> | ( |  | ) | const`[inline]`

Definition at line 740 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

loose_handle< T >::operator loose_handle< const value_type > | ( |  | ) | const`[inline]`

static_cast<> overload

static_cast<> overload (for consts)

Definition at line 749 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

loose_handle< T >::operator handle< value_type > | ( |  | ) | const`[inline]`

Definition at line 752 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

loose_handle< T >::operator rhandle< value_type > | ( |  | ) | const`[inline]`

Definition at line 755 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

pointer loose_handle< T >::get | ( |  | ) | const`[inline]`

Returns pointer to the object that is being wrapped.

Definition at line 759 of file _handle.h.

References loose_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=(), and operator==().

template<class T>

loose_handle< T >::operator bool | ( |  | ) | const`[inline]`

More explicit bool cast.

Definition at line 762 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

bool loose_handle< T >::operator! | ( |  | ) | const`[inline]`

Definition at line 766 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

void loose_handle< T >::ref | ( |  | ) | `[inline]`

Definition at line 769 of file _handle.h.

References loose_handle< T >::obj.

template<class T>

bool loose_handle< T >::unref | ( |  | ) | `[inline]`

Definition at line 771 of file _handle.h.

References loose_handle< T >::obj.

## Member Data Documentation

template<class T>

value_type* loose_handle< T >::obj `[protected]`

Pointer to object.

Definition at line 659 of file _handle.h.

Referenced by loose_handle< T >::clone(), loose_handle< T >::count(), loose_handle< T >::detach(), loose_handle< T >::empty(), loose_handle< T >::get(), loose_handle< T >::operator bool(), loose_handle< T >::operator handle< value_type >(), loose_handle< T >::operator loose_handle< const value_type >(), loose_handle< T >::operator rhandle< value_type >(), loose_handle< T >::operator!(), loose_handle< T >::operator*(), loose_handle< T >::operator->(), loose_handle< T >::operator=(), loose_handle< T >::ref(), loose_handle< T >::swap(), and loose_handle< T >::unref().

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

- _handle.h