#include "CeylanTypes.h"
#include "CeylanTextDisplayable.h"
#include <string>
#include <iostream>
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 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.
Definition at line 68 of file CeylanCountedPointer.h.
#define CEYLAN_DISPLAY_REFCOUNT | ( | message | ) | std::cout << "[CountedPointer] " << message << std::endl ; |
Definition at line 80 of file CeylanCountedPointer.h.
Referenced by Ceylan::CountedPointer< T >::CountedPointer::Referent::Referent(), Ceylan::CountedPointer< T >::release(), and Ceylan::CountedPointer< T >::setReferent().