Scopira
20080306
|
#include <object.h>
Public Types | |
typedef T | ptr_type |
Public Member Functions | |
count2_ptr (bool doref, T *o) | |
count2_ptr (const count_ptr< T > &o) | |
~count2_ptr () | |
void | set (T *o) |
count2_ptr & | operator= (T *o) |
count2_ptr & | operator= (const count2_ptr< T > &o) |
bool | operator== (const count2_ptr< T > &rhs) const |
bool | operator== (const T *rhs) const |
bool | operator!= (const count2_ptr< T > &rhs) const |
bool | operator!= (const T *rhs) const |
bool | operator< (const count2_ptr< T > &rhs) const |
oflow_i & | print (oflow_i &o) const |
T * | get (void) const |
operator T* (void) const | |
T & | ref (void) const |
T * | operator-> (void) const |
T & | operator* (void) const |
bool | is_null (void) const |
Protected Attributes | |
T * | dm_ptr |
bool | dm_doref |
This auto pointer is a more flexibile (but much less used and usefull) version of scopira::tool::count_ptr.
This version is used in only special cases, you typically should prefer the popular scopira::tool::count_ptr.
This pointer stores an internal bool (which is set only via the constructor) that controls weither or not this auto pointer does any reference counting at all. If set to true, then it acts like a normal count_ptr. If set to false, it will not call any reference counting methods, but just act like a plain, vanilla pointer.
|
inline |
constructor
doref | Wiether or not reference counting will be done at all |
o | initial value |
|
inline |
Copy constructor
|
inline |
Destructor
|
inline |
Gets the current object as a regular pointer.
|
inline |
Is the pointer null?
|
inline |
Returns the current object as a regular pointer. This is an implicit conversion.
|
inline |
Comparison (not equals) - compares internal pointer values.
|
inline |
Comparison (not equals) operator - compares the internal pointer value to the given pointer.
|
inline |
Convinient * deferencer.
|
inline |
Convinient -> accesor to the object
|
inline |
Comparison (less than) - compares internal pointer values.
|
inline |
Assignment.
|
inline |
Assignment.
|
inline |
Comparison (equals) - compares internal pointer values.
|
inline |
Comparison (equals) operator - compares the internal pointer value to the given pointer.
|
inline |
Pretty ascii printer, redirects to internal class.
|
inline |
Gets the current object, as a reference
|
inline |
Sets the current pointer.