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

Represents a single instance of the view of a cell. More...

#include <SingleInstance.hpp>

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

Data Structures

class  Factory
 

Public Types

typedef VisitorType
< SingleInstance
Visitor
 
typedef Instance Type
 
typedef boost::shared_ptr< TypePointer
 
typedef boost::weak_ptr< TypeWeakPointer
 
typedef std::vector< PointerList
 
typedef size_t SizeType
 
typedef std::string Name
 
typedef Composite< Instance >::Type Type
 
typedef Composite< Instance >
::Pointer 
Pointer
 
typedef Composite< Instance >::List List
 
typedef Composite< Instance >
::SizeType 
SizeType
 

Public Member Functions

virtual void accept (BaseVisitor &inoutVisitor) throw (Error)
 
virtual ~SingleInstance () throw ()
 
virtual ParameterContext getParameterContext () const
 
virtual ParameterMapSharedPtr getParameters () const throw (Error)
 
ViewSharedPtr getMaster () const
 
virtual void bindToMasterView (const ViewSharedPtr &inMaster, bool inMapPortReferences=true) throw (Error)
 
virtual void addPortReference (const PortReferenceSharedPtr &inPortRef) throw (Error)
 
virtual PortReferenceSharedPtr findPortReference (const std::string &inPortRef) throw (Error)
 
virtual NetReferenceSharedPtr findNetReference (const std::string &inNetRef) throw (Error)
 
virtual void removePortReference (const std::string &inName) throw (Error)
 
virtual void getPortReferences (std::vector< PortReferenceSharedPtr > &) const
 
virtual void setPortReferences (const std::vector< PortReferenceSharedPtr > &inSource) throw (Error)
 
template<typename _Action >
void applyOnAllPortReferences (const _Action &action) throw (Error)
 
const std::string getDesignator () const
 
void setDesignator (const std::string &inSource)
 
const TimingSharedPtr getTiming () const
 
void setTiming (const TimingSharedPtr &inSource)
 
virtual CompositionType getCompositionType () const =0
 
virtual size_t getSize () const =0
 
virtual void getChildren (List &outChildren) const =0 throw (Error)
 
virtual const Pointer get (const std::vector< SizeType > &inIndices) const =0 throw (Error)
 
virtual void setParentCollection (const Pointer &inParentCollection)
 
virtual Pointer getParentCollection () const
 
void setWeakThis (const WeakPointer &inWeakThis)
 
Pointer getSharedThis () const
 
void addComment (const std::string &comment)
 
const std::vector< std::string > & getComments () const
 
void setComments (const std::vector< std::string > &inSource)
 
virtual const std::string getName () const
 
void setName (const std::string &inSource) throw (Error)
 
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< ViewgetParent () const
 
virtual void setParent (const boost::shared_ptr< View > &inSource)
 
void getUserData (std::list< std::string > &outUserData) const
 
void setUserData (const std::list< std::string > &inSource)
 
void addUserData (const std::string &inSource)
 
virtual CompositionType getCompositionType () const
 
virtual SizeType getSize () const
 
virtual const Pointer get (const std::vector< SizeType > &indices) const throw (Error)
 
virtual void getChildren (List &outChildren) const throw (Error)
 

Protected Member Functions

 SingleInstance ()
 
void setMaster (const ViewSharedPtr &inMaster)
 

Friends

class FactoryType< SingleInstance >
 

Detailed Description

Represents a single instance of the view of a cell.

The SingleInstance class represents a usage instance of a cell in the design specification (View) of another cell. A single instance can be created using the (instance name ...) syntax.

Definition at line 41 of file SingleInstance.hpp.

Member Typedef Documentation

Definition at line 41 of file Scalar.hpp.

typedef std::vector<Pointer> torc::generic::Composite< Instance >::List
inherited

List of Shared Pointers to objects of type Type

Definition at line 61 of file Composite.hpp.

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

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

Definition at line 40 of file Scalar.hpp.

typedef boost::shared_ptr<Type> torc::generic::Composite< Instance >::Pointer
inherited

Shared Pointer to object of type Type

Definition at line 55 of file Composite.hpp.

Definition at line 42 of file Scalar.hpp.

typedef size_t torc::generic::Composite< Instance >::SizeType
inherited

Definition at line 62 of file Composite.hpp.

Definition at line 39 of file Scalar.hpp.

Definition at line 50 of file Composite.hpp.

typedef boost::weak_ptr<Type> torc::generic::Composite< Instance >::WeakPointer
inherited

Definition at line 56 of file Composite.hpp.

Constructor & Destructor Documentation

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

Definition at line 71 of file SingleInstance.cpp.

71 {}
torc::generic::SingleInstance::SingleInstance ( )
protected

Definition at line 69 of file SingleInstance.cpp.

69 : Instance(), Scalar<Instance>() {}

Member Function Documentation

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

Implements torc::generic::Visitable.

Definition at line 60 of file SingleInstance.cpp.

60  {
61  try {
62  runVisitor(*this, inoutVisitor);
63  } catch(Error& e) {
64  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
65  throw;
66  }
67 }
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::Instance::addPortReference ( const PortReferenceSharedPtr inPortRef)
throw (Error
)
virtualinherited

Add a port reference to this master. When a master is set using the set_master(), the list of port references is not created. It has to be extrinsically set.

Parameters
[in]inPortRefA port reference.
Exceptions
ErrorThe port ref could not be added, because PortReference name is empty
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
ErrorThe port ref could not be added, because PortReference name is already exists
  • Id : eMessageIdErrorItemAlreadyExists
  • Context Data

Add a port reference to this master. When a master is set using the set_master(), the list of port references is not created. It has to be extrinsically set.

Parameters
[in]inPortRefA port reference.
Exceptions
ErrorThe port ref could not be added.

Reimplemented in torc::generic::InstanceArray.

Definition at line 159 of file generic/Instance.cpp.

159  {
160  std::string name = inPortRef->getName();
161  if(name.empty()) {
162  Error e(eMessageIdErrorEmptyItemName, __FUNCTION__, __FILE__, __LINE__);
163  e.saveContextData("PortReference name", name);
164  throw e;
165  }
166  if(false == mPortReferences.set(name, inPortRef)) {
167  Error e(eMessageIdErrorItemAlreadyExists, __FUNCTION__, __FILE__, __LINE__);
168  e.saveContextData("PortReference name", name);
169  throw e;
170  }
171  inPortRef->setParent(getSharedThis());
172  return;
173 }
bool set(const KeyType &inKey, const ValueType &inValue)
Definition: SymTab.hpp:132
SymTab< std::string, PortReferenceSharedPtr > mPortReferences
std::string string

+ Here is the call graph for this function:

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::Instance::applyOnAllPortReferences ( const _Action &  action)
throw (Error
)
inlineinherited

Apply action on all PortReferences.

Parameters
[in]actionAction to be applied

Definition at line 292 of file generic/Instance.hpp.

293  {
294  try {
295  mPortReferences.applyOnAll(action);
296  } catch(Error& e) {
297  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
298  throw;
299  }
300 }
void applyOnAll(const _Action &action)
Definition: SymTab.hpp:192
SymTab< std::string, PortReferenceSharedPtr > mPortReferences

+ Here is the call graph for this function:

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:

void torc::generic::Instance::bindToMasterView ( const ViewSharedPtr inMaster,
bool  inMapPortReferences = true 
)
throw (Error
)
virtualinherited

Bind an instance to it's master. Instance binding consists of two steps:

  • Bind instance to cell
  • Bind existing port references to ports of the cell
Note
Instances can be bound in two states, namely, immediately, with no port reference bindings, or delayed, when all used port references are bound to master ports. There is no port binding for extern views.
Parameters
[in]inMasterSource Master view for this instance.
[in]inMapPortReferencesWhether port references are to be mapped to ports of the new master
Exceptions
ErrorIf there is any kind of mismatch between ports etc.

Bind an instance to it's master. Instance binding consists of two steps:

  • Bind instance to cell
  • Bind port references to ports of the cell
Parameters
[in]inMasterSource Master view for this instance.
Exceptions
ErrorIf there is any kind of mismatch between ports etc.

Reimplemented in torc::generic::InstanceArray.

Definition at line 103 of file generic/Instance.cpp.

104  {
105  if(!mMaster) {
106  //TDB::ERROR MASTER REBINDING NOT ALLOWED
107  }
108  ViewSharedPtr oldMaster = getMaster();
109  std::map<std::string, ParameterSharedPtr> myParams;
110  if(oldMaster) {
111  ParameterMapSharedPtr oldParams = oldMaster->getParameters();
112  oldParams->getOverriddenParameters(mMyContext, myParams);
113  oldParams->unregisterContext(mMyContext);
114  }
115  setMaster(inMaster);
116  ParameterMapSharedPtr paramMap = mMaster->getParameters();
117  mMyContext = paramMap->getNewContext();
118  //We do not create params here, they will be created only when
119  //someone asks for params
120  //For rebinding, however, if some params were there
121  //.. we have to override them on the new master
122  if(!myParams.empty()) {
123  try {
124  paramMap->registerContext(mMyContext, mMaster->getParameterContext());
125  for(std::map<std::string, ParameterSharedPtr>::iterator it = myParams.begin();
126  it != myParams.end(); ++it) {
127  paramMap->set(mMyContext, (*it).first, (*it).second);
128  }
129  } catch(Error& e) {
130  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
131  throw;
132  }
133  }
134  if(inMaster->getIsExtern()) {
135  return; //No port binding for extern
136  }
137  if(inMapPortReferences) {
138  PortMapper mapper(inMaster);
139  try {
140  mPortReferences.applyOnAll(mapper);
141  } catch(Error& e) {
142  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
143  throw;
144  }
145  }
146 }
void applyOnAll(const _Action &action)
Definition: SymTab.hpp:192
SymTab< std::string, PortReferenceSharedPtr > mPortReferences
void setMaster(const ViewSharedPtr &inMaster)
ViewSharedPtr getMaster() const
boost::shared_ptr< View > ViewSharedPtr
boost::shared_ptr< ParameterMap > ParameterMapSharedPtr

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

NetReferenceSharedPtr torc::generic::Instance::findNetReference ( const std::string &  inName)
throw (Error
)
virtualinherited

Find a Net reference.

Parameters
[in]inNameString containing the name of the Net.

Definition at line 191 of file generic/Instance.cpp.

191  {
192  NetReferenceSharedPtr netRef;
193  mNetReferences.get(inName, netRef);
194  return netRef;
195 }
boost::shared_ptr< NetReference > NetReferenceSharedPtr
bool get(const KeyType &inKey, ValueType &outValue) const
Definition: SymTab.hpp:121
SymTab< std::string, NetReferenceSharedPtr > mNetReferences
PortReferenceSharedPtr torc::generic::Instance::findPortReference ( const std::string &  inName)
throw (Error
)
virtualinherited

Find a port reference.

Parameters
[in]inNameString containing the name of the port.

Reimplemented in torc::generic::InstanceArray.

Definition at line 180 of file generic/Instance.cpp.

180  {
181  PortReferenceSharedPtr portRef;
182  mPortReferences.get(inName, portRef);
183  return portRef;
184 }
SymTab< std::string, PortReferenceSharedPtr > mPortReferences
boost::shared_ptr< PortReference > PortReferenceSharedPtr
bool get(const KeyType &inKey, ValueType &outValue) const
Definition: SymTab.hpp:121
virtual const Pointer torc::generic::Scalar< Instance >::get ( const std::vector< SizeType > &  indices) const
throw (Error
)
virtualinherited

Get a specific member of this composition.

Parameters
[in]indicesA list of indices to be accessed. The number of indices must be equal to the number of dimensions.
Returns
An empty pointer is returned

Implements torc::generic::Composite< Instance >.

virtual const Pointer torc::generic::Composite< Instance >::get ( const std::vector< SizeType > &  inIndices) const
throw (Error
)
pure virtualinherited

Get a specific member of this composition.

Note
This is relevant for Vector composition only. Other compositions return a NULL pointer
Parameters
[in]inIndicesA list of indices to be accessed. The number of indices must be equal to the number of dimensions.
Returns
A pointer to the child situated at the specified indices. For non-relevant types a NULL pointer is returned
Exceptions
ErrorIndex dimensions mismatch

Implemented in torc::generic::Vector< Instance, InstanceArrayMember, InstanceArrayMember::Factory, false >, torc::generic::VectorBit< Instance >, and torc::generic::Scalar< Instance >.

virtual void torc::generic::Scalar< Instance >::getChildren ( List outChildren) const
throw (Error
)
virtualinherited

Get children of this composition.

Parameters
[out]outChildrenA list of all children for this composition
Note
This wil return empty list for scalar

Get children of this composition.

Parameters
[out]outChildrenA list of all children for this composition

Implements torc::generic::Composite< Instance >.

virtual void torc::generic::Composite< Instance >::getChildren ( List outChildren) const
throw (Error
)
pure virtualinherited

Get children of this composition.

Note
This is relevant for Vector and Bundle compositions only. Other compositions return a NULL pointer
Parameters
[out]outChildrenA list of all children for this composition

Implemented in torc::generic::Vector< Instance, InstanceArrayMember, InstanceArrayMember::Factory, false >, torc::generic::Scalar< Instance >, and torc::generic::VectorBit< Instance >.

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
virtual CompositionType torc::generic::Scalar< Instance >::getCompositionType ( ) const
virtualinherited

Get composition type for this object

Returns
The CompositionType inSource eCompositionTypeScalar is returned

Implements torc::generic::Composite< Instance >.

virtual CompositionType torc::generic::Composite< Instance >::getCompositionType ( ) const
pure virtualinherited
const std::string torc::generic::Instance::getDesignator ( ) const
inlineinherited

Get the designated number.

Returns
std::string Value representing designated number of a view interface.

Definition at line 302 of file generic/Instance.hpp.

302  {
303  return mDesignator;
304 }
ViewSharedPtr torc::generic::Instance::getMaster ( ) const
inlineinherited

Get the master view for this instance.

Returns
Master view for this instance.

Definition at line 283 of file generic/Instance.hpp.

283  {
284  return mMaster;
285 }

+ Here is the caller graph for this function:

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:

ParameterContext torc::generic::Instance::getParameterContext ( ) const
virtualinherited

Returns the context that will be used to get parameters from the parameter map. For an unbound instance, this will return an invalid value

Reimplemented in torc::generic::InstanceArrayMember.

Definition at line 78 of file generic/Instance.cpp.

78  {
79  return mMyContext;
80 }

+ Here is the caller graph for this function:

ParameterMapSharedPtr torc::generic::Instance::getParameters ( ) const
throw (Error
)
virtualinherited

Get the ParameterMap corresponding to this instance and it's master

Returns
A ParameterMap consisting of only the overridden parameters.

Reimplemented in torc::generic::InstanceArrayMember.

Definition at line 82 of file generic/Instance.cpp.

82  {
83  if(!getMaster()) {
84  return ParameterMapSharedPtr();
85  }
86  ParameterMapSharedPtr params = mMaster->getParameters();
87  if(!params->isContextRegistered(mMyContext)) {
88  params->registerContext(mMyContext, mMaster->getParameterContext());
89  }
90  return params;
91 }
ViewSharedPtr getMaster() const
boost::shared_ptr< ParameterMap > ParameterMapSharedPtr

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Get a pointer to the parent object

Returns
Pointer to parent

+ Here is the caller graph for this function:

virtual Pointer torc::generic::Composite< Instance >::getParentCollection ( ) const
inlinevirtualinherited

Get a pointer to the parent collection

Returns
A pointer to the parent collection if present, empty pointer otherwise

+ Here is the caller graph for this function:

void torc::generic::Instance::getPortReferences ( std::vector< PortReferenceSharedPtr > &  outPortRefs) const
virtualinherited

Get list of all port references.

Returns
List of port references

Get list of all port references.

Parameters
[out]outPortRefsList of port references

Reimplemented in torc::generic::InstanceArray.

Definition at line 224 of file generic/Instance.cpp.

224  {
225  mPortReferences.getValues(outPortRefs);
226 }
void getValues(std::vector< ValueType > &outValues) const
Definition: SymTab.hpp:158
SymTab< std::string, PortReferenceSharedPtr > mPortReferences

+ Here is the call graph for this function:

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< Instance >::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
virtual SizeType torc::generic::Scalar< Instance >::getSize ( void  ) const
virtualinherited

Get the total number of bits of the composition

Returns
Number of bits

Implements torc::generic::Composite< Instance >.

virtual size_t torc::generic::Composite< Instance >::getSize ( void  ) const
pure virtualinherited
const TimingSharedPtr torc::generic::Instance::getTiming ( ) const
inlineinherited

Get the pointer to the timing object

Returns
Pointer to the timing object

Definition at line 311 of file generic/Instance.hpp.

311  {
312  return mTiming;
313 }
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
void torc::generic::Instance::removePortReference ( const std::string &  inName)
throw (Error
)
virtualinherited

Remove a given port reference.

Parameters
inNameName of the object to be delete
Exceptions
ErrorPortReference name is empty
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
ErrorPortReference name could not be found
  • Id : eMessageIdErrorItemNotFound
  • Context Data

Remove a given port reference.

Parameters
inNameName of the object to be delete
Exceptions
ErrorPortReference name is empty
ErrorPortReference name could not be found

Reimplemented in torc::generic::InstanceArray.

Definition at line 205 of file generic/Instance.cpp.

205  {
206  if(inName.empty()) {
207  Error e(eMessageIdErrorEmptyItemName, __FUNCTION__, __FILE__, __LINE__);
208  e.saveContextData("PortReference name", inName);
209  throw e;
210  }
211  if(false == mPortReferences.remove(inName)) {
212  Error e(eMessageIdErrorItemNotFound, __FUNCTION__, __FILE__, __LINE__);
213  e.saveContextData("PortReference name", inName);
214  throw e;
215  }
216  return;
217 }
SymTab< std::string, PortReferenceSharedPtr > mPortReferences
bool remove(const KeyType &inKey)
Definition: SymTab.hpp:153

+ Here is the call graph for this function:

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::Instance::setDesignator ( const std::string &  inSource)
inherited

Set the designated number.

Parameters
[in]inSourcestd::string representing designated number of a view interface.

Definition at line 247 of file generic/Instance.cpp.

247  {
248  mDesignator = inSource;
249 }
void torc::generic::Instance::setMaster ( const ViewSharedPtr inMaster)
protectedinherited

Definition at line 148 of file generic/Instance.cpp.

148  {
149  mMaster = inMaster;
150 }
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< View >::setParent ( const boost::shared_ptr< View > &  inSource)
virtualinherited

Set a pointer to the parent

Parameters
[in]inSourceSet a pointer to the parent

+ Here is the caller graph for this function:

virtual void torc::generic::Composite< Instance >::setParentCollection ( const Pointer inParentCollection)
inlinevirtualinherited

Set a pointer to a parnt composition.

Parameters
[in]inParentCollectionpointer to the parent collection (Vector/Bundle)

Set a pointer to a parnt composition.

Parameters
[in]parentCollectionpointer to the parent collection (Vector/Bundle)
void torc::generic::Instance::setPortReferences ( const std::vector< PortReferenceSharedPtr > &  inSource)
throw (Error
)
virtualinherited

Set list of all port references.

Parameters
[in]inSourceList of port references

Reimplemented in torc::generic::InstanceArray.

Definition at line 233 of file generic/Instance.cpp.

233  {
234  std::vector<PortReferenceSharedPtr>::const_iterator portRef = inSource.begin();
235  std::vector<PortReferenceSharedPtr>::const_iterator endP = inSource.end();
236  for(; portRef != endP; ++endP) {
237  try {
238  addPortReference(*portRef);
239  } catch(Error& e) {
240  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
241  throw;
242  }
243  }
244  return;
245 }
virtual void addPortReference(const PortReferenceSharedPtr &inPortRef)

+ Here is the call graph for this function:

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::Instance::setTiming ( const TimingSharedPtr inSource)
inherited

Set the pointer to the timing object

Parameters
[in]inSourcePointer to the timing object

Definition at line 256 of file generic/Instance.cpp.

256  {
257  mTiming = inSource;
258 }
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< Instance >::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< SingleInstance >
friend

Definition at line 45 of file SingleInstance.hpp.


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