UCommon
Public Member Functions
ucc::locked_instance< T > Class Template Reference

A templated smart pointer instance for lock protected objects. More...

#include <thread.h>

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

Public Member Functions

T * get (void) const
 Get pointer to instance of locked typed object.
 locked_instance (locked_pointer< T > &pointer)
 Construct locked instance of typed object from matching locked_pointer.
 locked_instance ()
 Construct empty locked instance of typed object.
T & operator* () const
 Extract instance of locked typed object by pointer reference.
T * operator-> () const
 Access member of instance of locked typed object by member reference.

Detailed Description

template<class T>
class ucc::locked_instance< T >

A templated smart pointer instance for lock protected objects.

This is used to reference an instance of a typed locked_pointer.

Author:
David Sugar <dyfet@gnutelephony.org>

Definition at line 2419 of file thread.h.


Constructor & Destructor Documentation

template<class T >
ucc::locked_instance< T >::locked_instance ( locked_pointer< T > &  pointer) [inline]

Construct locked instance of typed object from matching locked_pointer.

Parameters:
pointerto get instance from.

Definition at line 2431 of file thread.h.


Member Function Documentation

template<class T >
T* ucc::locked_instance< T >::get ( void  ) const [inline]

Get pointer to instance of locked typed object.

Returns:
instance of typed object.

Definition at line 2451 of file thread.h.

template<class T >
T& ucc::locked_instance< T >::operator* ( ) const [inline]

Extract instance of locked typed object by pointer reference.

Returns:
instance of typed object.

Definition at line 2437 of file thread.h.

template<class T >
T* ucc::locked_instance< T >::operator-> ( ) const [inline]

Access member of instance of locked typed object by member reference.

Returns:
instance of typed object.

Definition at line 2444 of file thread.h.


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