.TH "KShared" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KShared \- Reference counting for shared objects.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <ksharedptr.h>\fP
.PP
Inherited by \fBKLockFile\fP, \fBKMountPoint\fP, \fBKSharedConfig\fP, \fBKSycocaEntry\fP, KUserGroupPrivate, and KUserPrivate.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKShared\fP ()"
.br
.ti -1c
.RI "\fBKShared\fP (const \fBKShared\fP &)"
.br
.ti -1c
.RI "\fBKShared\fP & \fBoperator=\fP (const \fBKShared\fP &)"
.br
.ti -1c
.RI "void \fB_KShared_ref\fP () const "
.br
.ti -1c
.RI "void \fB_KShared_unref\fP () const "
.br
.ti -1c
.RI "int \fB_KShared_count\fP () const "
.br
.in -1c
.SH "Detailed Description"
.PP 
Reference counting for shared objects. 

If you derive your object from this class, then you may use it in conjunction with \fBKSharedPtr\fP to control the lifetime of your object.
.PP
Specifically, all classes that derive from KShared have an internal counter keeping track of how many other objects have a reference to their object. If used with \fBKSharedPtr\fP, then your object will not be deleted until all references to the object have been released.
.PP
You should probably not ever use any of the methods in this class directly -- let the \fBKSharedPtr\fP take care of that. Just derive your class from KShared and forget about it.
.PP
\fBAuthor:\fP
.RS 4
Waldo Bastian <bastian@kde.org> 
.RE
.PP

.PP
Definition at line 40 of file ksharedptr.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KShared::KShared ()\fC [inline]\fP"
.PP
Standard constructor. 
.PP
This will initialize the reference count on this object to 0. 
.PP
Definition at line 46 of file ksharedptr.h.
.SS "KShared::KShared (const \fBKShared\fP &)\fC [inline]\fP"
.PP
Copy constructor. 
.PP
This will \fInot\fP actually copy the objects but it will initialize the reference count on this object to 0. 
.PP
Definition at line 52 of file ksharedptr.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBKShared\fP& KShared::operator= (const \fBKShared\fP &)\fC [inline]\fP"
.PP
Overloaded assignment operator. 
.PP
Definition at line 57 of file ksharedptr.h.
.SS "void KShared::_KShared_ref () const\fC [inline]\fP"
.PP
Increases the reference count by one. 
.PP
Definition at line 62 of file ksharedptr.h.
.SS "void KShared::_KShared_unref () const\fC [inline]\fP"
.PP
Releases a reference (decreases the reference count by one). 
.PP
If the count goes to 0, this object will delete itself. 
.PP
Definition at line 68 of file ksharedptr.h.
.SS "int KShared::_KShared_count () const\fC [inline]\fP"
.PP
Return the current number of references held. 
.PP
\fBReturns:\fP
.RS 4
Number of references 
.RE
.PP

.PP
Definition at line 75 of file ksharedptr.h.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
