Xapian::Internal::RefCntPtr< T > Class Template Reference

For internal use only.

A reference-counted pointer.

More...

#include <base.h>

Inheritance diagram for Xapian::Internal::RefCntPtr< T >:

Inheritance graph
[legend]
Collaboration diagram for Xapian::Internal::RefCntPtr< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

T * operator-> () const
T & operator * () const
T * get () const
 RefCntPtr (T *dest_)
 Make a RefCntPtr for an object which may already have reference counted pointers.
 RefCntPtr ()
 RefCntPtr (const RefCntPtr &other)
void operator= (const RefCntPtr &other)
void operator= (T *dest_)
 ~RefCntPtr ()
template<class U>
 RefCntPtr (const RefCntPtr< U > &other)

Private Attributes

T * dest

Detailed Description

template<class T>
class Xapian::Internal::RefCntPtr< T >

For internal use only.

A reference-counted pointer.

Can be used with any class derived from RefCntBase, as long as it is allocated on the heap by new (not new[]!).

Definition at line 66 of file base.h.


Constructor & Destructor Documentation

template<class T>
Xapian::Internal::RefCntPtr< T >::RefCntPtr ( T *  dest_  )  [inline]

Make a RefCntPtr for an object which may already have reference counted pointers.

You usually pass in a newly created object, or an object may pass in "this" to get a RefCntPtr to itself to pass to other classes. (e.g. a database might pass a newly created postlist a reference counted pointer to itself.)

Definition at line 94 of file base.h.

References Xapian::Internal::RefCntPtr< T >::dest.

template<class T>
Xapian::Internal::RefCntPtr< T >::RefCntPtr (  )  [inline]

Definition at line 100 of file base.h.

template<class T>
Xapian::Internal::RefCntPtr< T >::RefCntPtr ( const RefCntPtr< T > &  other  )  [inline]

Definition at line 105 of file base.h.

References Xapian::Internal::RefCntPtr< T >::dest.

template<class T>
Xapian::Internal::RefCntPtr< T >::~RefCntPtr (  )  [inline]

Definition at line 130 of file base.h.

References Xapian::Internal::RefCntPtr< T >::dest.

template<class T>
template<class U>
Xapian::Internal::RefCntPtr< T >::RefCntPtr ( const RefCntPtr< U > &  other  )  [inline]

Definition at line 145 of file base.h.

References Xapian::Internal::RefCntPtr< T >::dest.


Member Function Documentation

template<class T>
T * Xapian::Internal::RefCntPtr< T >::operator-> (  )  const [inline]

Definition at line 152 of file base.h.

References Xapian::Internal::RefCntPtr< T >::dest.

template<class T>
T & Xapian::Internal::RefCntPtr< T >::operator * (  )  const [inline]

Definition at line 158 of file base.h.

References Xapian::Internal::RefCntPtr< T >::dest.

template<class T>
T * Xapian::Internal::RefCntPtr< T >::get (  )  const [inline]

Definition at line 164 of file base.h.

References Xapian::Internal::RefCntPtr< T >::dest.

Referenced by Xapian::Query::add_subquery(), ContiguousAllDocsPostList::at_end(), Xapian::MSet::Internal::fetch_items(), FlintPostList::FlintPostList(), MultiMatch::get_collapse_key(), MultiMatch::get_mset(), Xapian::Enquire::Internal::get_mset(), Xapian::operator==(), QuartzAllDocsPostList::QuartzAllDocsPostList(), QuartzPostList::QuartzPostList(), Xapian::Query::Query(), and NetworkPostList::read_position_list().

template<class T>
void Xapian::Internal::RefCntPtr< T >::operator= ( const RefCntPtr< T > &  other  )  [inline]

Definition at line 111 of file base.h.

References Xapian::Internal::RefCntPtr< T >::dest.

template<class T>
void Xapian::Internal::RefCntPtr< T >::operator= ( T *  dest_  )  [inline]

Definition at line 116 of file base.h.

References Xapian::Internal::RefCntPtr< T >::dest.


Member Data Documentation

template<class T>
T* Xapian::Internal::RefCntPtr< T >::dest [private]

Definition at line 68 of file base.h.

Referenced by Xapian::Internal::RefCntPtr< T >::get(), Xapian::Internal::RefCntPtr< T >::operator *(), Xapian::Internal::RefCntPtr< T >::operator->(), Xapian::Internal::RefCntPtr< T >::operator=(), Xapian::Internal::RefCntPtr< T >::RefCntPtr(), and Xapian::Internal::RefCntPtr< T >::~RefCntPtr().


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.