torc::generic::SelfReferencing< _Tp > Class Template Reference

Inheritance diagram for torc::generic::SelfReferencing< _Tp >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef _Tp Type
typedef boost::shared_ptr< Type > Pointer
typedef boost::weak_ptr< Type > WeakPointer

Public Member Functions

void setWeakThis (const WeakPointer &inWeakThis) throw ()
Pointer getSharedThis () const throw ()

Private Attributes

WeakPointer mWeakThis

Detailed Description

template<typename _Tp>
class torc::generic::SelfReferencing< _Tp >

Definition at line 34 of file SelfReferencing.hpp.


Member Function Documentation

template<typename _Type >
SelfReferencing< _Type >::Pointer torc::generic::SelfReferencing< _Type >::getSharedThis (  )  const throw () [inline]

Get a shared pointer to this object. A valid pointer is returned if weakThis was set. Otherwise this returns a NULL pointer. For Vector types, the second scenario is an exception condition and should be treated as such.

Returns:
A shared pointer to this object

Get a shared pointer to this object. A valid pointer is returned if weakThis was set. Otherwise this returns a NULL pointer. For Vector types, the second scenario is an exception condition and should be treated as such.

Parameters:
[out] ptr Set to a shared pointer to this object

Definition at line 104 of file SelfReferencing.hpp.

template<typename _Tp>
void torc::generic::SelfReferencing< _Tp >::setWeakThis ( const WeakPointer &  inWeakThis  )  throw () [inline]

Set a weak pointer to this object. This will be used later to get a shared pointer to this object from within other member methods if required. This should be called by the Factory creating the object.

Parameters:
[in] weakThis A weak pointer to this object

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines
Generated on Wed Feb 23 00:05:36 2011 for TORC by  doxygen 1.6.3