CeylanCountedPointer.h File Reference

#include "CeylanTypes.h"
#include "CeylanTextDisplayable.h"
#include "CeylanOperators.h"
#include <string>
Include dependency graph for CeylanCountedPointer.h:

Go to the source code of this file.

Classes

class  Ceylan::CountedPointer< T >
struct  Ceylan::CountedPointer< T >::Referent
 Second: implementation. More...

Namespaces

namespace  Ceylan
 

This part of the Ceylan namespace gathers some convenient string manipulation facilities to be widely used.


Defines

#define CEYLAN_COUNTED_POINTER_USE_COPY_ON_WRITE   0
 Advanced pointer template, counting its references and deleting the contained resource as soon as no one refers to it.
#define CEYLAN_COUNTED_POINTER_DEBUG   0
#define CEYLAN_DISPLAY_REFCOUNT(message)

Typedefs

typedef Ceylan::Uint32 Ceylan::ReferenceCount
 The reference count type.

Define Documentation

#define CEYLAN_COUNTED_POINTER_DEBUG   0

Definition at line 74 of file CeylanCountedPointer.h.

#define CEYLAN_COUNTED_POINTER_USE_COPY_ON_WRITE   0

Advanced pointer template, counting its references and deleting the contained resource as soon as no one refers to it.

Significantly simpler than shared pointers of Boost (see CeylanSmartPointer in unstable section), these counted pointers do not deal with multithread (therefore, no lightweight mutex needed!) nor with circular references (no weak_ptr counterpart).

Advanced raw pointer, but basic shared pointer. Mimics the STL names.

Taken from http://c2.com/cgi/wiki?CppCountedPointerImplementation

Thanks to Robert Di Falco.

See also:
CeylanSmartPointer

Definition at line 69 of file CeylanCountedPointer.h.

#define CEYLAN_DISPLAY_REFCOUNT ( message   ) 
Generated on Mon Nov 29 13:38:35 2010 for Ceylan by  doxygen 1.6.3