torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::ParentedObject< _ParentType > Class Template Reference

An object that has a parent. More...

#include <ParentedObject.hpp>

Public Member Functions

virtual ~ParentedObject () throw ()
 
const boost::shared_ptr
< _ParentType > 
getParent () const
 
virtual void setParent (const boost::shared_ptr< _ParentType > &inSource)
 

Protected Member Functions

 ParentedObject ()
 

Private Member Functions

 ParentedObject (const ParentedObject< _ParentType > &source)
 
ParentedObject< _ParentType > & operator= (const ParentedObject< _ParentType > &source)
 

Private Attributes

boost::weak_ptr< _ParentType > mParent
 

Detailed Description

template<typename _ParentType>
class torc::generic::ParentedObject< _ParentType >

An object that has a parent.

EDIF 2 0 0 defines a nested hierarchy of objects in a design. As such most of the non-root elements have a corresponding parent object. However, the type of parent depends on the type of object. The ParentedObject template therefore provides a mechanism for storing a pointer to the parent object.

Definition at line 40 of file ParentedObject.hpp.

Constructor & Destructor Documentation

template<typename _ParentType >
torc::generic::ParentedObject< _ParentType >::ParentedObject ( )
protected

Definition at line 80 of file ParentedObject.hpp.

80 : mParent() {}
boost::weak_ptr< _ParentType > mParent
template<typename _ParentType >
torc::generic::ParentedObject< _ParentType >::~ParentedObject ( )
throw (
)
virtual

Definition at line 82 of file ParentedObject.hpp.

82 {}
template<typename _ParentType>
torc::generic::ParentedObject< _ParentType >::ParentedObject ( const ParentedObject< _ParentType > &  source)
private

Member Function Documentation

template<typename _ParentType >
const boost::shared_ptr< _ParentType > torc::generic::ParentedObject< _ParentType >::getParent ( ) const
inline

Get a pointer to the parent object

Returns
Pointer to parent

Definition at line 90 of file ParentedObject.hpp.

90  {
91  return mParent.lock();
92 }
boost::weak_ptr< _ParentType > mParent
template<typename _ParentType>
ParentedObject<_ParentType>& torc::generic::ParentedObject< _ParentType >::operator= ( const ParentedObject< _ParentType > &  source)
private
template<typename _ParentType>
void torc::generic::ParentedObject< _ParentType >::setParent ( const boost::shared_ptr< _ParentType > &  inSource)
virtual

Set a pointer to the parent

Parameters
[in]inSourceSet a pointer to the parent

Definition at line 99 of file ParentedObject.hpp.

100  {
101  mParent = inSource;
102 }
boost::weak_ptr< _ParentType > mParent

+ Here is the caller graph for this function:

Field Documentation

template<typename _ParentType>
boost::weak_ptr<_ParentType> torc::generic::ParentedObject< _ParentType >::mParent
private

Definition at line 77 of file ParentedObject.hpp.


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