i6engine
1.0
|
A shared pointer counting references and adds objects being not referenced any more to an internal list required external call of clear to delete all objects, no automatic deletion to stay threadsafe T = type of the pointer, U = base type of the pointer. More...
#include <D:/Projekte/i6engine/libs/i6engine-utils/include/i6engine/utils/sharedPtr.h>
Public Member Functions | |
sharedPtr () | |
default constructor creating a sharedPtr containing a nullptr More... | |
sharedPtr (T *ptr) | |
normal constructor taking pointer to object to be stored More... | |
sharedPtr (const sharedPtr &other) | |
copy constructor sharing reference and incrementing refCounter More... | |
sharedPtr (sharedPtr &&other) | |
move constructor More... | |
template<typename V > | |
sharedPtr (const sharedPtr< V, U > &other) | |
upcast derived => base More... | |
~sharedPtr () | |
destructor, adding pointer of object to clearList if last reference was deleted More... | |
const sharedPtr & | operator= (const sharedPtr &other) |
assignment operator More... | |
const sharedPtr & | operator= (sharedPtr &&other) |
move assignment operator More... | |
template<typename V > | |
const sharedPtr & | operator= (const sharedPtr< V, U > &other) |
upcast, derived => base More... | |
T * | operator-> () const |
-> operator returning stored pointer More... | |
bool | operator== (const sharedPtr &other) const |
comparison between two shared pointer More... | |
bool | operator== (const T *other) const |
comparison between shared and normal pointer More... | |
bool | operator!= (const sharedPtr &other) const |
bool | operator!= (const T *other) const |
T * | get () const |
returns the contained pointer More... | |
Static Public Member Functions | |
static void | clear () |
deletes all pointers in clearList More... | |
Friends | |
class | weakPtr< T, U > |
template<typename V , typename W > | |
class | sharedPtr |
template<typename V , typename W > | |
class | weakPtr |
struct | sharedPtrWrapper< T > |
template<typename T1 , typename T2 , typename U1 > | |
sharedPtr< T1, U1 > | dynamic_pointer_cast (const sharedPtr< T2, U1 > &) |
template<typename T1 , typename U2 , typename... Args> | |
sharedPtr< T1, U2 > | make_shared (Args &&...) |
bool | operator== (const T *other, const sharedPtr &self) |
bool | operator!= (const T *other, const sharedPtr &self) |
A shared pointer counting references and adds objects being not referenced any more to an internal list required external call of clear to delete all objects, no automatic deletion to stay threadsafe T = type of the pointer, U = base type of the pointer.
Definition at line 50 of file sharedPtr.h.
|
inline |
default constructor creating a sharedPtr containing a nullptr
Definition at line 84 of file sharedPtr.h.
|
inlineexplicit |
normal constructor taking pointer to object to be stored
Definition at line 90 of file sharedPtr.h.
|
inline |
copy constructor sharing reference and incrementing refCounter
Definition at line 97 of file sharedPtr.h.
|
inline |
move constructor
Definition at line 103 of file sharedPtr.h.
|
inline |
upcast derived => base
Definition at line 112 of file sharedPtr.h.
|
inline |
destructor, adding pointer of object to clearList if last reference was deleted
Definition at line 118 of file sharedPtr.h.
|
inlinestatic |
deletes all pointers in clearList
Definition at line 203 of file sharedPtr.h.
|
inline |
returns the contained pointer
Definition at line 214 of file sharedPtr.h.
|
inline |
Definition at line 188 of file sharedPtr.h.
|
inline |
Definition at line 196 of file sharedPtr.h.
|
inline |
-> operator returning stored pointer
Definition at line 166 of file sharedPtr.h.
|
inline |
assignment operator
Definition at line 124 of file sharedPtr.h.
|
inline |
move assignment operator
Definition at line 137 of file sharedPtr.h.
|
inline |
upcast, derived => base
Definition at line 153 of file sharedPtr.h.
|
inline |
comparison between two shared pointer
Definition at line 173 of file sharedPtr.h.
|
inline |
comparison between shared and normal pointer
Definition at line 180 of file sharedPtr.h.
|
friend |
|
friend |
|
friend |
Definition at line 192 of file sharedPtr.h.
|
friend |
Definition at line 184 of file sharedPtr.h.
Definition at line 75 of file sharedPtr.h.
|
friend |
Definition at line 78 of file sharedPtr.h.
Definition at line 77 of file sharedPtr.h.
|
friend |
Definition at line 73 of file sharedPtr.h.