struct KSharedPtr

KShared. More...

Definition#include <ksharedptr.h>
Template formKSharedPtr<template 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 ( T* t )

 KSharedPtr ( const KSharedPtr& p )

 ~KSharedPtr ()

KSharedPtr<T>&  operator= ( const KSharedPtr<T>& p )

KSharedPtr<T>&  operator= ( T* p )

bool  operator== ( const KSharedPtr<T>& p )

[const]

bool  operator!= ( const KSharedPtr<T>& p )

[const]

bool  operator== ( const T* p )

[const]

bool  operator!= ( const T* p )

[const]

bool  operator! ()

[const]

 operator T* ()

[const]

T*  data ()

const T*  data ()

[const]

const T&  operator* ()

[const]

T&  operator* ()

const T*  operator-> ()

[const]

T*  operator-> ()

int  count ()

[const]