CeylanCountedPointer.h File Reference

#include "CeylanTypes.h"
#include "CeylanTextDisplayable.h"
#include <string>
#include <iostream>

Include dependency graph for CeylanCountedPointer.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Classes

class  Ceylan::CountedPointer< T >
struct  Ceylan::CountedPointer< T >::CountedPointer::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)   std::cout << "[CountedPointer] " << message << std::endl ;

Typedefs

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


Define Documentation

#define CEYLAN_COUNTED_POINTER_DEBUG   0

Definition at line 73 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 68 of file CeylanCountedPointer.h.

#define CEYLAN_DISPLAY_REFCOUNT ( message   )     std::cout << "[CountedPointer] " << message << std::endl ;


Generated on Thu Jun 4 20:39:23 2009 for Ceylan by  doxygen 1.5.8