torc::physical::Progeny< T > Class Template Reference

Concept for any object that may have a parent. More...

#include <Progeny.hpp>

Inheritance diagram for torc::physical::Progeny< T >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 Progeny (void)
 Null constructor.
 Progeny (const WeakPtrType &inParentPtr)
 Constructor that specifies a parent.
const WeakPtrType & getParentWeakPtr (void) const
 Returns a weak pointer to the parent.
void setParentWeakPtr (WeakPtrType inParentPtr)
 Sets the weak pointer to the parent.
void resetParentWeakPtr (void)
 Method to reset and orphan this object.
const SharedPtrType & getParentSharedPtr (void) const
 Returns a shared pointer to the parent (WARNING: Does not work right).

Protected Types

typedef boost::weak_ptr< T > WeakPtrType
 Weak pointer of our own type.
typedef boost::shared_ptr< T > SharedPtrType
 Shared pointer of our own type.

Protected Attributes

WeakPtrType mParentWeakPtr
 Weak pointer to the parent.


Detailed Description

template<class T>
class torc::physical::Progeny< T >

Concept for any object that may have a parent.

Definition at line 29 of file Progeny.hpp.


Member Typedef Documentation

template<class T>
typedef boost::weak_ptr<T> torc::physical::Progeny< T >::WeakPtrType [protected]

Weak pointer of our own type.

Definition at line 33 of file Progeny.hpp.

template<class T>
typedef boost::shared_ptr<T> torc::physical::Progeny< T >::SharedPtrType [protected]

Shared pointer of our own type.

Definition at line 35 of file Progeny.hpp.


Constructor & Destructor Documentation

template<class T>
torc::physical::Progeny< T >::Progeny ( void   )  [inline]

Null constructor.

Definition at line 42 of file Progeny.hpp.

template<class T>
torc::physical::Progeny< T >::Progeny ( const WeakPtrType &  inParentPtr  )  [inline]

Constructor that specifies a parent.

Definition at line 44 of file Progeny.hpp.


Member Function Documentation

template<class T>
const WeakPtrType& torc::physical::Progeny< T >::getParentWeakPtr ( void   )  const [inline]

Returns a weak pointer to the parent.

Definition at line 47 of file Progeny.hpp.

template<class T>
void torc::physical::Progeny< T >::setParentWeakPtr ( WeakPtrType  inParentPtr  )  [inline]

Sets the weak pointer to the parent.

Definition at line 49 of file Progeny.hpp.

template<class T>
void torc::physical::Progeny< T >::resetParentWeakPtr ( void   )  [inline]

Method to reset and orphan this object.

Definition at line 51 of file Progeny.hpp.

template<class T>
const SharedPtrType& torc::physical::Progeny< T >::getParentSharedPtr ( void   )  const [inline]

Returns a shared pointer to the parent (WARNING: Does not work right).

Always seems to generate a "Returning reference to temporary" warning, and I cannot figure out why. It is the caller's responsibility to reset the shared pointer when done.

Todo:
Figure out why Progeny<T>::getParentSharedPtr() yields a "Returning reference to temporary" warning.

Definition at line 59 of file Progeny.hpp.


Member Data Documentation

template<class T>
WeakPtrType torc::physical::Progeny< T >::mParentWeakPtr [protected]

Weak pointer to the parent.

Definition at line 38 of file Progeny.hpp.


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

Generated on Thu Oct 13 16:50:49 2011 for TORC by  doxygen 1.5.6