ucc::shared_pointer< T > Class Template Reference

Templated shared pointer for singleton shared objects of specific type. More...

#include <thread.h>

Inheritance diagram for ucc::shared_pointer< T >:
Inheritance graph
[legend]
Collaboration diagram for ucc::shared_pointer< T >:
Collaboration graph
[legend]

Public Member Functions

 shared_pointer ()
 Created shared locking for typed singleton pointer.
const T * dup (void)
 Acquire a shared (duplocate) reference to the typed singleton object.
void replace (T *object)
 Replace existing typed singleton instance with new one.
void operator= (T *object)
 Replace existing typed singleton object through assignment.
T * operator* ()
 Access shared lock typed singleton object by pointer reference.

Detailed Description

template<class T>
class ucc::shared_pointer< T >

Templated shared pointer for singleton shared objects of specific type.

This is used as typed template for the SharedPointer object reference management class. This is used to supply a typed singleton shared instance to the typed shared_instance template class.

Author:
David Sugar <dyfet@gnutelephony.org>

Definition at line 2295 of file thread.h.


Member Function Documentation

template<class T>
const T* ucc::shared_pointer< T >::dup ( void   )  [inline]

Acquire a shared (duplocate) reference to the typed singleton object.

This is a form of shared access lock. Derived classes and templates access conditionallock "release" when the shared pointer is no longer needed.

Returns:
typed shared object.

Definition at line 2310 of file thread.h.

Here is the call graph for this function:

template<class T>
T* ucc::shared_pointer< T >::operator* (  )  [inline]

Access shared lock typed singleton object by pointer reference.

Returns:
typed shared object.

Definition at line 2333 of file thread.h.

template<class T>
void ucc::shared_pointer< T >::operator= ( T *  object  )  [inline]

Replace existing typed singleton object through assignment.

Parameters:
object to assign.

Definition at line 2326 of file thread.h.

template<class T>
void ucc::shared_pointer< T >::replace ( T *  object  )  [inline]

Replace existing typed singleton instance with new one.

This happens during exclusive locking, and the commit method of the typed object will be called.

Parameters:
object being set.

Definition at line 2319 of file thread.h.


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

Generated on 28 Dec 2009 for UCommon by  doxygen 1.6.1