Xapian::Internal::RefCntBase Class Reference

For internal use only.

Reference counted internal classes should inherit from RefCntBase.

More...

#include <base.h>

Inheritance diagram for Xapian::Internal::RefCntBase:

Inheritance graph
[legend]
List of all members.

Public Types

typedef unsigned int ref_count_t

Public Member Functions

 RefCntBase ()
 The constructor, which initialises the ref_count to 0.

Public Attributes

ref_count_t ref_count
 The actual reference count.

Protected Member Functions

 RefCntBase (const RefCntBase &)
 The copy constructor.

Detailed Description

For internal use only.

Reference counted internal classes should inherit from RefCntBase.

This gives the object a reference count used by RefCntPtr.

Definition at line 35 of file base.h.


Member Typedef Documentation

typedef unsigned int Xapian::Internal::RefCntBase::ref_count_t

Definition at line 53 of file base.h.


Constructor & Destructor Documentation

Xapian::Internal::RefCntBase::RefCntBase ( const RefCntBase  )  [inline, protected]

The copy constructor.

This is protected since it'll only be used by derived classes, which should only rarely need copying (this is, after all, a refcount implementation). Sometimes it's needed, though, since we need to zero ref_count in the copy.

Definition at line 47 of file base.h.

Xapian::Internal::RefCntBase::RefCntBase (  )  [inline]

The constructor, which initialises the ref_count to 0.

Definition at line 51 of file base.h.


Member Data Documentation

ref_count_t Xapian::Internal::RefCntBase::ref_count [mutable]

The actual reference count.

It's mutable so we can have reference counting work with const pointers.

Definition at line 58 of file base.h.

Referenced by test_refcnt1().


The documentation for this class was generated from the following file:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.