• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Member Functions

TDEShared Class Reference

Reference counting for shared objects. More...

#include <ksharedptr.h>

Inheritance diagram for TDEShared:
KMountPoint KSycocaEntry KTimezoneSource TDELockFile TDESharedConfig

List of all members.

Public Member Functions

 TDEShared ()
 TDEShared (const TDEShared &)
TDEShared & operator= (const TDEShared &)
void _TDEShared_ref () const
void _TDEShared_unref () const
int _TDEShared_count () const

Detailed Description

Reference counting for shared objects.

If you derive your object from this class, then you may use it in conjunction with TDESharedPtr to control the lifetime of your object.

Specifically, all classes that derive from TDEShared have an internal counter keeping track of how many other objects have a reference to their object. If used with TDESharedPtr, then your object will not be deleted until all references to the object have been released.

You should probably not ever use any of the methods in this class directly -- let the TDESharedPtr take care of that. Just derive your class from TDEShared and forget about it.

Author:
Waldo Bastian <bastian@kde.org>

Definition at line 40 of file ksharedptr.h.


Constructor & Destructor Documentation

TDEShared::TDEShared (  )  [inline]

Standard constructor.

This will initialize the reference count on this object to 0.

Definition at line 46 of file ksharedptr.h.

TDEShared::TDEShared ( const TDEShared &   )  [inline]

Copy constructor.

This will not actually copy the objects but it will initialize the reference count on this object to 0.

Definition at line 52 of file ksharedptr.h.


Member Function Documentation

int TDEShared::_TDEShared_count (  )  const [inline]

Return the current number of references held.

Returns:
Number of references

Definition at line 75 of file ksharedptr.h.

void TDEShared::_TDEShared_ref (  )  const [inline]

Increases the reference count by one.

Definition at line 62 of file ksharedptr.h.

void TDEShared::_TDEShared_unref (  )  const [inline]

Releases a reference (decreases the reference count by one).

If the count goes to 0, this object will delete itself.

Definition at line 68 of file ksharedptr.h.

TDEShared& TDEShared::operator= ( const TDEShared &   )  [inline]

Overloaded assignment operator.

Definition at line 57 of file ksharedptr.h.


The documentation for this class was generated from the following file:
  • ksharedptr.h

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.7.1
This website is maintained by Timothy Pearson.