Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes

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 ()
refoperator= (const ref &other)
template<class T2 >
refoperator= (const ref< T2 > other)
refoperator= (T *other)
template<class T2 >
refoperator= (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:

Visualization Library v2010.11.1123 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Thu Nov 18 2010 02:08:09.
Permission is granted to use this page to write and publish articles regarding Visualization Library.