torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::Design Class Reference

#include <Design.hpp>

+ Inheritance diagram for torc::generic::Design:
+ Collaboration diagram for torc::generic::Design:

Data Structures

class  Factory
 

Public Types

typedef VisitorType< DesignVisitor
 
typedef std::string Name
 
typedef Design Type
 
typedef boost::shared_ptr< TypePointer
 
typedef boost::weak_ptr< TypeWeakPointer
 

Public Member Functions

virtual void accept (BaseVisitor &inoutVisitor) throw (Error)
 
const std::string getCellRefName () const
 
void setCellRefName (const std::string &inCellRefName)
 
const std::string getLibraryRefName () const
 
void setLibraryRefName (const std::string &inLibraryRefName)
 
virtual ~Design () throw ()
 
virtual const std::string getName () const
 
void setName (const std::string &inSource) throw (Error)
 
void addComment (const std::string &comment)
 
const std::vector< std::string > & getComments () const
 
void setComments (const std::vector< std::string > &inSource)
 
PropertySharedPtr getProperty (const std::string &inName)
 
bool setProperty (const std::string &inName, const PropertySharedPtr &inProperty)
 
void getProperties (std::map< std::string, PropertySharedPtr > &outProperties) const
 
void setProperties (const std::map< std::string, PropertySharedPtr > &inSource)
 
template<typename _Action >
void applyOnAllProperties (const _Action &action) throw (Error)
 
virtual Name getOriginalName () const
 
virtual void setOriginalName (const Name &inSource)
 
const boost::shared_ptr< RootgetParent () const
 
virtual void setParent (const boost::shared_ptr< Root > &inSource)
 
void setWeakThis (const WeakPointer &inWeakThis)
 
Pointer getSharedThis () const
 
void getUserData (std::list< std::string > &outUserData) const
 
void setUserData (const std::list< std::string > &inSource)
 
void addUserData (const std::string &inSource)
 
void getStatuses (std::vector< StatusSharedPtr > &outStatus) const
 
void setStatuses (const std::vector< StatusSharedPtr > &inStatus)
 
void addStatus (const StatusSharedPtr &inStatus) throw (Error)
 
template<typename _Action >
void applyOnAllStatuses (const _Action &action) throw (Error)
 

Protected Member Functions

 Design ()
 
 Design (const std::string &inCellRefName, const std::string &inLibraryRefName)
 

Private Member Functions

 Design (const Design &inSource)
 
Designoperator= (const Design &inSource)
 

Private Attributes

std::string mCellRefName
 
std::string mLibraryRefName
 

Friends

class FactoryType< Design >
 

Detailed Description

The Design class identifies the Cell at the top level of the hierarchy of a particular design within a library.

Definition at line 44 of file generic/Design.hpp.

Member Typedef Documentation

typedef std::string torc::generic::Renamable::Name
inherited

Definition at line 40 of file generic/Renamable.hpp.

typedef boost::shared_ptr<Type> torc::generic::SelfReferencing< Design >::Pointer
inherited

Definition at line 36 of file SelfReferencing.hpp.

Definition at line 35 of file SelfReferencing.hpp.

Convenience typedef for visiting a design

Definition at line 54 of file generic/Design.hpp.

typedef boost::weak_ptr<Type> torc::generic::SelfReferencing< Design >::WeakPointer
inherited

Definition at line 37 of file SelfReferencing.hpp.

Constructor & Destructor Documentation

torc::generic::Design::~Design ( )
throw (
)
virtual

Definition at line 62 of file generic/Design.cpp.

62 {}
torc::generic::Design::Design ( const std::string &  inCellRefName,
const std::string &  inLibraryRefName 
)
protected
torc::generic::Design::Design ( const Design inSource)
private

Member Function Documentation

void torc::generic::Design::accept ( BaseVisitor inoutVisitor)
throw (Error
)
virtual

Implements torc::generic::Visitable.

Definition at line 44 of file generic/Design.cpp.

44  {
45  try {
46  runVisitor(*this, inoutVisitor);
47  } catch(Error& e) {
48  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
49  throw;
50  }
51 }
void runVisitor(_Tp &inoutVisited, BaseVisitor &inoutVisitor)
Definition: VisitorType.hpp:78

+ Here is the call graph for this function:

void torc::generic::Commentable::addComment ( const std::string &  comment)
inherited

Add a comment to the object

Parameters
[in]commentThe comment to add to an existing list of comments

Definition at line 36 of file Commentable.cpp.

36  {
37  mComments.push_back(comment);
38 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
void torc::generic::StatusContainer::addStatus ( const StatusSharedPtr inStatus)
throw (Error
)
inherited

Add a status to the vector of statuses. If an empty pointer is supplied, it returns without doing anything.

Parameters
[in]inStatusA pointer to a status object.
Exceptions
ErrorStatus could not be added.

Add a status to the list of statuses. If an empty pointer is supplied, it returns without doing anything.

Parameters
[in]inStatusA pointer to a status object.
Exceptions
ErrorStatus could not be added.

Definition at line 47 of file StatusContainer.cpp.

47  {
48  mStatuses.push_back(inStatus);
49 }
std::vector< StatusSharedPtr > mStatuses
void torc::generic::UserDataContainer::addUserData ( const std::string &  inSource)
inherited

Add an user data to the list of user data

Parameters
[in]inSourceAn user data as string

Definition at line 34 of file UserDataContainer.cpp.

34  {
35  mUserData.push_back(inSource);
36 }
std::list< std::string > mUserData
template<typename _Action >
void torc::generic::PropertyContainer::applyOnAllProperties ( const _Action &  action)
throw (Error
)
inlineinherited

Apply action on all properties.

Parameters
[in]actionAction to be applied

Definition at line 113 of file PropertyContainer.hpp.

114  {
115  try {
116  mProperties.applyOnAll(action);
117  } catch(Error& e) {
118  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
119  throw;
120  }
121 }
void applyOnAll(const _Action &action)
Definition: SymTab.hpp:192
SymTab< std::string, PropertySharedPtr > mProperties

+ Here is the call graph for this function:

template<typename _Action >
void torc::generic::StatusContainer::applyOnAllStatuses ( const _Action &  action)
throw (Error
)
inlineinherited

Apply action on all statuses.

Parameters
[in]actionAction to be applied

Definition at line 95 of file StatusContainer.hpp.

96  {
97  try {
98  std::vector<StatusSharedPtr>::iterator it = mStatuses.begin();
99  for(; it != mStatuses.end(); ++it) {
100  action(*it);
101  }
102  } catch(Error& e) {
103  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
104  throw;
105  }
106 }
std::vector< StatusSharedPtr > mStatuses

+ Here is the call graph for this function:

const std::string torc::generic::Design::getCellRefName ( ) const
inline

Get the top cell ref name for this Design.

Returns
The top cell ref name for this Design.

Definition at line 130 of file generic/Design.hpp.

130  {
131  return mCellRefName;
132 }
const std::vector< std::string > & torc::generic::Commentable::getComments ( ) const
inlineinherited

Get the list of all comments

Returns
A list of all comments on this object

Definition at line 85 of file Commentable.hpp.

85  {
86  return mComments;
87 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
const std::string torc::generic::Design::getLibraryRefName ( ) const
inline

Get the top Library ref name for this Design.

Returns
The top Library ref name for this Design.

Definition at line 139 of file generic/Design.hpp.

139  {
140  return mLibraryRefName;
141 }
const std::string torc::generic::Nameable::getName ( void  ) const
inlinevirtualinherited

Get the object name

Returns
Name of the object

Definition at line 89 of file Nameable.hpp.

89  {
90  return mName;
91 }

+ Here is the caller graph for this function:

Renamable::Name torc::generic::Renamable::getOriginalName ( ) const
inlinevirtualinherited

Get the new name provided for the object.

Returns
Name of the object

Definition at line 78 of file generic/Renamable.hpp.

78  {
79  return mOriginalName;
80 }

+ Here is the caller graph for this function:

const boost::shared_ptr<Root > torc::generic::ParentedObject< Root >::getParent ( ) const
inlineinherited

Get a pointer to the parent object

Returns
Pointer to parent
void torc::generic::PropertyContainer::getProperties ( std::map< std::string, PropertySharedPtr > &  outProperties) const
inlineinherited

Get the map of all properties

Parameters
[out]outPropertiesThe map of properties

Get the map of all properties

Returns
The map of properties

Definition at line 107 of file PropertyContainer.hpp.

108  {
109  mProperties.getValueMap(outProperties);
110  return;
111 }
void getValueMap(UserMap &outMap) const
Definition: SymTab.hpp:171
SymTab< std::string, PropertySharedPtr > mProperties

+ Here is the call graph for this function:

PropertySharedPtr torc::generic::PropertyContainer::getProperty ( const std::string &  inName)
inherited

Get a property

Parameters
[in]inNameName of the property to be retreived
Returns
Pointer to the property object if present, empty pointer otherwise.

Get a property

Parameters
[in]nameName of the property to be retreived
Returns
Pointer to the property object if present, empty pointer otherwise.

Definition at line 37 of file PropertyContainer.cpp.

37  {
38  PropertySharedPtr property;
39  if(!inName.empty()) {
40  mProperties.get(inName, property);
41  }
42  return property;
43 }
bool get(const KeyType &inKey, ValueType &outValue) const
Definition: SymTab.hpp:121
SymTab< std::string, PropertySharedPtr > mProperties
boost::shared_ptr< Property > PropertySharedPtr

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Pointer torc::generic::SelfReferencing< Design >::getSharedThis ( ) const
inlineinherited

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]ptrSet to a shared pointer to this object
void torc::generic::StatusContainer::getStatuses ( std::vector< StatusSharedPtr > &  outStatus) const
inlineinherited

Get a vector of pointer to Status object

Parameters
[out]outStatusThe vector of pointer to Status object

Definition at line 86 of file StatusContainer.hpp.

86  {
87  outStatus.insert(outStatus.end(), mStatuses.begin(), mStatuses.end());
88 }
std::vector< StatusSharedPtr > mStatuses
void torc::generic::UserDataContainer::getUserData ( std::list< std::string > &  outUserData) const
inlineinherited

Get the list of all userData

Parameters
[out]outUserDataThe list of all userData

Definition at line 78 of file UserDataContainer.hpp.

78  {
79  outUserData.insert(outUserData.end(), mUserData.begin(), mUserData.end());
80  return;
81 }
std::list< std::string > mUserData
Design& torc::generic::Design::operator= ( const Design inSource)
private
void torc::generic::Design::setCellRefName ( const std::string &  inCellRefName)

Set the top cell ref name for this Design.

Parameters
[in]inCellRefNameThe top level cell ref name for this design.

Definition at line 64 of file generic/Design.cpp.

64  {
65  mCellRefName = inCellRefName;
66 }
void torc::generic::Commentable::setComments ( const std::vector< std::string > &  inSource)
inherited

Get the list of all comments

Parameters
[in]inSourceA list of all comments to be set on this object

Definition at line 45 of file Commentable.cpp.

45  {
46  mComments.insert(mComments.end(), inSource.begin(), inSource.end());
47 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
void torc::generic::Design::setLibraryRefName ( const std::string &  inLibraryRefName)

Set the top Library ref name for this Design.

Parameters
[in]inLibraryRefNameThe top level Library ref name for this design.

Definition at line 68 of file generic/Design.cpp.

68  {
69  mLibraryRefName = inLibraryRefName;
70 }
void torc::generic::Nameable::setName ( const std::string &  inSource)
throw (Error
)
inherited

Set a name for this object

Parameters
[in]inSourceName of the object
Exceptions
ErrorCould not set name, because name is empty (Will be used by array members)
  • Id : eMessageIdErrorEmptyItemName
  • Context Data

Set a name for this object

Parameters
[in]inSourceName of the object
Exceptions
ErrorCould not set name, because name is empty (Will be used by array members)

Definition at line 41 of file Nameable.cpp.

41  {
42  if(inSource.empty()) {
43  Error e(eMessageIdErrorEmptyItemName, __FUNCTION__, __FILE__, __LINE__);
44  e.saveContextData("Nameable", inSource);
45  throw e;
46  }
47  mName = inSource;
48 }

+ Here is the call graph for this function:

void torc::generic::Renamable::setOriginalName ( const Name inSource)
virtualinherited

Set the new name provided for the object.

Parameters
[in]inSourceName of the object

Definition at line 35 of file generic/Renamable.cpp.

35  {
36  mOriginalName = inSource;
37 }
virtual void torc::generic::ParentedObject< Root >::setParent ( const boost::shared_ptr< Root > &  inSource)
virtualinherited

Set a pointer to the parent

Parameters
[in]inSourceSet a pointer to the parent
void torc::generic::PropertyContainer::setProperties ( const std::map< std::string, PropertySharedPtr > &  inSource)
inherited

Set the map of properties

Parameters
[in]inSourceThe map of properties

Definition at line 66 of file PropertyContainer.cpp.

66  {
67  std::map<std::string, PropertySharedPtr>::const_iterator it = inSource.begin();
68  for(; it != inSource.end(); it++) {
69  setProperty((*it).first, (*it).second);
70  }
71 }
bool setProperty(const std::string &inName, const PropertySharedPtr &inProperty)

+ Here is the call graph for this function:

bool torc::generic::PropertyContainer::setProperty ( const std::string &  inName,
const PropertySharedPtr inProperty 
)
inherited

Save the inSource of a property

Parameters
[in]inNameName of the property to be saved
[in]inPropertyPointer to the property object if present, empty pointer otherwise.
Returns
bool True if saved, false otherwise.

Save the inSource of a property

Parameters
[in]inNameName of the property to be saved
[in]inPopertyPointer to the property object if present, empty pointer otherwise.
Returns
bool True if saved, false otherwise.

Definition at line 53 of file PropertyContainer.cpp.

54  {
55  if(!inName.empty()) {
56  return mProperties.set(inName, inProperty);
57  }
58  return false;
59 }
bool set(const KeyType &inKey, const ValueType &inValue)
Definition: SymTab.hpp:132
SymTab< std::string, PropertySharedPtr > mProperties

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::generic::StatusContainer::setStatuses ( const std::vector< StatusSharedPtr > &  inStatus)
inherited

Set a vector of pointer to Status object

Parameters
[in]inStatusThe vector of pointer to Status object

Definition at line 32 of file StatusContainer.cpp.

32  {
33  std::vector<StatusSharedPtr>::const_iterator it = inStatus.begin();
34  for(; it != inStatus.end(); it++) {
35  mStatuses.push_back(*it);
36  }
37 }
std::vector< StatusSharedPtr > mStatuses
void torc::generic::UserDataContainer::setUserData ( const std::list< std::string > &  inSource)
inherited

Set the list of userData

Parameters
[in]inSourceThe list of UserData

Definition at line 26 of file UserDataContainer.cpp.

26  {
27  mUserData.insert(mUserData.end(), inSource.begin(), inSource.end());
28 }
std::list< std::string > mUserData
void torc::generic::SelfReferencing< Design >::setWeakThis ( const WeakPointer inWeakThis)
inlineinherited

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]weakThisA weak pointer to this object

Friends And Related Function Documentation

friend class FactoryType< Design >
friend

Definition at line 48 of file generic/Design.hpp.

Field Documentation

std::string torc::generic::Design::mCellRefName
private

Definition at line 121 of file generic/Design.hpp.

std::string torc::generic::Design::mLibraryRefName
private

Definition at line 122 of file generic/Design.hpp.


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