struct KSharedPtr

Can be used to control the lifetime of an object that has derived KShared. More...

Definition#include <ksharedptr.h>
Template formKSharedPtr< class T >
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

Can be used to control the lifetime of an object that has derived KShared. As long a someone holds a KSharedPtr on some KShared object it won't become deleted but is deleted once its reference count is 0. This struct emulates C++ pointers perfectly. So just use it like a simple C++ pointer.

KShared and KSharedPtr are preferred over QShared / QSharedPtr since they are more safe.

 KSharedPtr ()

KSharedPtr

 KSharedPtr ( T* t )

KSharedPtr

 KSharedPtr ( const KSharedPtr& p )

KSharedPtr

 ~KSharedPtr ()

~KSharedPtr

KSharedPtr&  operator= ( const KSharedPtr& p )

operator=

KSharedPtr&  operator= ( T* p )

operator=

bool  operator== ( const KSharedPtr& p )

operator==

[const]

bool  operator!= ( const KSharedPtr& p )

operator!=

[const]

bool  operator== ( const T* p )

operator==

[const]

bool  operator!= ( const T* p )

operator!=

[const]

bool  operator! ()

operator!

[const]

 operator T* ()

operator T*

[const]

T*  data ()

data

const T*  data ()

data

[const]

const T&  operator* ()

operator*

[const]

T&  operator* ()

operator*

const T*  operator-> ()

operator->

[const]

T*  operator-> ()

operator->

int  count ()

count

[const]