libidx
ebl::smart_pointer Class Reference

#include <smart.h>

Inheritance diagram for ebl::smart_pointer:
ebl::idx< T > ebl::idxd< T > ebl::srg< T > ebl::svector< T > ebl::idx< idx< T > * > ebl::idxd< intg > ebl::srg< idx< T > * > ebl::svector< idxd< T > >

List of all members.

Public Member Functions

 smart_pointer (const smart_pointer &other)
virtual int unlock ()
 Decrements reference counter and deallocates this if it reaches zero.
virtual int lock ()
 Increments reference counter.
virtual int get_count ()
 Returns the number of references to this object.
virtual void set_count (int count)
 Sets the number of references to this object(careful)

Protected Attributes

int refcount
 Reference counters of objects pointing to this idx.
std::string debug_name

Friends

class svector

Detailed Description

An object that knows how many other objects are refering to it and destroys itself once nobody does anymore.


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