cxxtools::RefLinked< ObjectType > Class Template Reference

Reference linking. More...

#include <cxxtools/smartptr.h>

Protected Member Functions

 RefLinked ()
bool unlink (ObjectType *object)
 Unlink a smart pointer from a managed object.
void link (const RefLinked &ptr, ObjectType *object)
 Link a smart pointer to a managed object.

Detailed Description

template<typename ObjectType>
class cxxtools::RefLinked< ObjectType >

Reference linking.

Parameters
ObjectTypeThe managed object type

Reference linking means that no counter is required to keep track of the smart pointer objects, but all smart pointers form a linked list. When the list becomes empty the raw pointer si deleted. This Model has the advantage that it does not need to allocate memory, but is prone to circular dependencies.

Constructor & Destructor Documentation

template<typename ObjectType >
cxxtools::RefLinked< ObjectType >::RefLinked ( )
inlineprotected

Member Function Documentation

template<typename ObjectType >
void cxxtools::RefLinked< ObjectType >::link ( const RefLinked< ObjectType > &  ptr,
ObjectType *  object 
)
inlineprotected

Link a smart pointer to a managed object.

template<typename ObjectType >
bool cxxtools::RefLinked< ObjectType >::unlink ( ObjectType *  object)
inlineprotected

Unlink a smart pointer from a managed object.


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