| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sharedobj.h>#include <cassert>#include <stdlib.h>Go to the source code of this file.
Namespaces | |
| namespace | VRS |
Classes | |
| class | VRS::SO< T > |
| Smart pointers for shareable objects of type T (T must be derived from class VRS::SharedObj). More... | |
| class | VRS::WeakPointerBase |
| class | VRS::WO< T > |
Defines | |
| #define | VRS_STATIC_SO(TYPE, NAME, ARGS) |
Functions | |
| template<class S, class T> | |
| T * | VRS_CastImpl (const VRS::SO< S > &s, T *dummy) |
| template<class S, class T> | |
| T * | VRS_GuardedCastImpl (const VRS::SO< S > &s, T *dummy) |
| template<class S, class T> | |
| T * | VRS_CastImpl (const VRS::WO< S > &s, T *dummy) |
| template<class S, class T> | |
| T * | VRS_GuardedCastImpl (const VRS::WO< S > &s, T *dummy) |
| template<class T> | |
| void | VRS::serialization (SerializationManager &manager, const std::string &attributeName, SO< T > &attributeValue) |
| template<class T> | |
| void | VRS::serialization (SerializationManager &manager, const std::string &attributeName, WO< T > &attributeValue) |
| template<typename T> | |
| void | VRS::serialization (SerializationManager &manager, const std::string &attributeName, SO< T > &attributeValue, void *null) |
| template<typename T> | |
| void | VRS::serialization (SerializationManager &manager, const std::string &attributeName, WO< T > &attributeValue, void *null) |
| #define VRS_STATIC_SO | ( | TYPE, | |||
| NAME, | |||||
| ARGS | ) |
Value:
namespace { \ \ void NAME ##_cleanup(); \ \ TYPE* NAME(bool destruct = false) { \ static TYPE* pointer = NULL; \ if(!pointer && !destruct) { \ pointer = new TYPE ARGS; \ pointer->ref(); \ ::atexit(NAME ##_cleanup); \ } else if(pointer && destruct) { \ pointer->unref(); \ pointer = NULL; \ } \ return pointer; \ } \ \ void NAME ##_cleanup() { \ NAME(true); \ } \ \ }
| T* VRS_CastImpl | ( | const VRS::WO< S > & | s, | |
| T * | dummy | |||
| ) | [inline] |
| T* VRS_CastImpl | ( | const VRS::SO< S > & | s, | |
| T * | dummy | |||
| ) | [inline] |
| T* VRS_GuardedCastImpl | ( | const VRS::WO< S > & | s, | |
| T * | dummy | |||
| ) | [inline] |
| T* VRS_GuardedCastImpl | ( | const VRS::SO< S > & | s, | |
| T * | dummy | |||
| ) | [inline] |