Public Member Functions | Public Attributes | List of all members
QShared Class Reference

The QShared struct is internally used for implementing shared classes. More...

#include <qshared.h>

Inheritance diagram for QShared:
QGArray::array_data QMapPrivateBase QStringData QValueListPrivate< T > QValueListPrivate< QCString > QValueListPrivate< QMap< QString, QString > > QValueListPrivate< QString > QValueListPrivate< TemplateVariant >

Public Member Functions

 QShared ()
 
void ref ()
 
bool deref ()
 

Public Attributes

uint count
 

Detailed Description

The QShared struct is internally used for implementing shared classes.

It only contains a reference count and member functions to increment and decrement it.

Shared classes normally have internal classes that inherit QShared and add the shared data.

See also
Shared Classes

Definition at line 46 of file qshared.h.

Constructor & Destructor Documentation

QShared::QShared ( )
inline

Definition at line 48 of file qshared.h.

48 { count = 1; }
uint count
Definition: qshared.h:51

Member Function Documentation

bool QShared::deref ( )
inline

Definition at line 50 of file qshared.h.

50 { return !--count; }
uint count
Definition: qshared.h:51
void QShared::ref ( )
inline

Definition at line 49 of file qshared.h.

49 { count++; }
uint count
Definition: qshared.h:51

Member Data Documentation

uint QShared::count

Definition at line 51 of file qshared.h.


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