# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::ref< T > Class Template Reference

The ref<> class is used to reference-count an Object. More...

`#include <Object.hpp>`

List of all members.

## Public Member Functions

| ref (T *object=NULL)
| ref (const ref &other)
template<class T2 >
| ref (const ref< T2 > &other)
| ~ref ()
ref & | operator= (const ref &other)
template<class T2 >
ref & | operator= (const ref< T2 > other)
ref & | operator= (T *other)
template<class T2 >
ref & | operator= (T2 *other)
void | swap (ref &other)
T * | get () const
T * | operator-> () const
T & | operator* () const
bool | operator< (const ref &other) const
| operator bool () const

## Protected Attributes

T * | mObject

## Detailed Description

### template<class T>
class vl::ref< T >

The ref<> class is used to reference-count an Object.

When the last ref<> that points to an Object is deallocated also the pointed Object is deallocated.

## Constructor & Destructor Documentation

template<class T>

vl::ref< T >::ref | ( | T * | object = `NULL` | ) | `[inline]`

template<class T>

vl::ref< T >::ref | ( | const ref< T > & | other | ) | `[inline]`

template<class T>
template<class T2 >

vl::ref< T >::ref | ( | const ref< T2 > & | other | ) | `[inline]`

template<class T>

vl::ref< T >::~ref | ( |  | ) | `[inline]`

## Member Function Documentation

template<class T>

ref& vl::ref< T >::operator= | ( | const ref< T > & | other | ) | `[inline]`

template<class T>
template<class T2 >

ref& vl::ref< T >::operator= | ( | const ref< T2 > | other | ) | `[inline]`

template<class T>

ref& vl::ref< T >::operator= | ( | T * | other | ) | `[inline]`

template<class T>
template<class T2 >

ref& vl::ref< T >::operator= | ( | T2 * | other | ) | `[inline]`

template<class T>

void vl::ref< T >::swap | ( | ref< T > & | other | ) | `[inline]`

template<class T>

T* vl::ref< T >::get | ( |  | ) | const`[inline]`

template<class T>

T* vl::ref< T >::operator-> | ( |  | ) | const`[inline]`

template<class T>

T& vl::ref< T >::operator* | ( |  | ) | const`[inline]`

template<class T>

bool vl::ref< T >::operator< | ( | const ref< T > & | other | ) | const`[inline]`

template<class T>

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

## Member Data Documentation

template<class T>

T* vl::ref< T >::mObject`[protected]`

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Object.hpp

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:37 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.