| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/so.h>
Public Types | |
| typedef T | Type |
Public Member Functions | |
| SO () | |
| SO (T *obj) | |
| SO (const SO &so) | |
| SO (const WO< T > &wo) | |
| ~SO () | |
| SO & | operator= (T *obj) |
| SO & | operator= (const SO &so) |
| SO & | operator= (const WO< T > &wo) |
| template<class S> | |
| SO & | operator= (const SO< S > &so) |
| bool | operator< (const T *obj) const |
| bool | operator< (const SO &so) const |
| operator T * () const | |
| T * | operator-> () const |
| T & | operator* () const |
| template<class S> | |
| operator SO< S > () | |
| operator WO< T > () | |
Friends | |
| bool | operator< (const T *obj1, const SO &so2) |
SO<T> represent a smart pointer for a shared object of type "T" (T must be derived from class VRS::SharedObj). If a smart pointer is constructed, and an object pointer is passed as argument, the object is referenced (i.e. the ref counter is incremented by one). If the smart pointer is destructed, and an object pointer has been assigned, the object is dereferenced (i.e. the ref counter is decremented by one).
| bool VRS::SO< T >::operator< | ( | const T * | obj | ) | const [inline] |
< If a shared object pointer is assigned to the smart pointer, the current object is dereferenced (if there is a current object at all), and the new object is referenced.
| VRS::SO< T >::operator T * | ( | ) | const [inline] |
| T* VRS::SO< T >::operator-> | ( | ) | const [inline] |
| T& VRS::SO< T >::operator* | ( | ) | const [inline] |
Implicit conversion to "T*" is supported. Smart pointers can be dereferenced using the common operators "->" and "*" for "normal" pointers, too.
A smart pointer SO<T> can be converted to a smart pointer SO<S>, if T is derived from S.
A smart pointer SO<T> can be converted to a weak pointer WO<T>.
| bool operator< | ( | const T * | obj1, | |
| const SO< T > & | so2 | |||
| ) | [friend] |
Shared object pointers can be compared with respect to the addresses they are pointing to.