#include <Instance.hpp>
Public Member Functions | |
virtual ParameterContext | getParameterContext () const throw () |
virtual ParameterMapSharedPtr | getParameters () const throw (Error) |
ViewSharedPtr | getMaster () const throw () |
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 throw () |
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 throw () |
void | setDesignator (const std::string &inSource) throw () |
const TimingSharedPtr | getTiming () const throw () |
void | setTiming (const TimingSharedPtr &inSource) throw () |
virtual void | flatten () throw (Error) |
Protected Member Functions | |
void | setMaster (const ViewSharedPtr &inMaster) throw () |
Private Member Functions | |
Instance (const Instance &source) throw () | |
Instance & | operator= (const Instance &source) throw () |
Private Attributes | |
ViewSharedPtr | mMaster |
SymTab< std::string, PortReferenceSharedPtr > | mPortReferences |
ParameterContext | mMyContext |
std::string | mDesignator |
TimingSharedPtr | mTiming |
SymTab< std::string, NetReferenceSharedPtr > | mNetReferences |
Classes | |
struct | MasterData |
The Instance class is used to represent the use of a cell in another cell. EDIF supoorts single instances and instance arrays. The Intstance acts as a base class for these the acutal scalar and vector representations of instances. Parameters defined in a cell declaration can be overridden in an Instance.
Definition at line 56 of file Instance.hpp.
ParameterContext torc::generic::Instance::getParameterContext | ( | ) | const throw () [virtual] |
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 98 of file Instance.cpp.
ParameterMapSharedPtr torc::generic::Instance::getParameters | ( | ) | const throw (Error) [virtual] |
Get the ParameterMap corresponding to this instance and it's master
Reimplemented in torc::generic::InstanceArrayMember.
Definition at line 103 of file Instance.cpp.
ViewSharedPtr torc::generic::Instance::getMaster | ( | ) | const throw () [inline] |
Get the master view for this instance.
Definition at line 318 of file Instance.hpp.
void torc::generic::Instance::bindToMasterView | ( | const ViewSharedPtr & | inMaster, | |
bool | inMapPortReferences = true | |||
) | throw (Error) [virtual] |
Bind an instance to it's master. Instance binding consists of two steps:
[in] | inMaster | Source Master view for this instance. |
[in] | inMapPortReferences | Whether port references are to be mapped to ports of the new master |
Error | If there is any kind of mismatch between ports etc. |
[in] | inMaster | Source Master view for this instance. |
Error | If there is any kind of mismatch between ports etc. |
Reimplemented in torc::generic::InstanceArray.
Definition at line 128 of file Instance.cpp.
void torc::generic::Instance::addPortReference | ( | const PortReferenceSharedPtr & | inPortRef | ) | throw (Error) [virtual] |
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.
[in] | inPortRef | A port reference. |
Error | The port ref could not be added, because PortReference name is empty
| |
Error | The port ref could not be added, because PortReference name is already exists
|
[in] | inPortRef | A port reference. |
Error | The port ref could not be added. |
Reimplemented in torc::generic::InstanceArray.
Definition at line 205 of file Instance.cpp.
PortReferenceSharedPtr torc::generic::Instance::findPortReference | ( | const std::string & | inName | ) | throw (Error) [virtual] |
Find a port reference.
[in] | inName | String containing the name of the port. |
Reimplemented in torc::generic::InstanceArray.
Definition at line 232 of file Instance.cpp.
NetReferenceSharedPtr torc::generic::Instance::findNetReference | ( | const std::string & | inName | ) | throw (Error) [virtual] |
Find a Net reference.
[in] | inName | String containing the name of the Net. |
Definition at line 245 of file Instance.cpp.
void torc::generic::Instance::removePortReference | ( | const std::string & | inName | ) | throw (Error) [virtual] |
Remove a given port reference.
inName | Name of the object to be delete |
Error | PortReference name is empty
| |
Error | PortReference name could not be found
|
inName | Name of the object to be delete |
Error | PortReference name is empty | |
Error | PortReference name could not be found |
Reimplemented in torc::generic::InstanceArray.
Definition at line 261 of file Instance.cpp.
void torc::generic::Instance::getPortReferences | ( | std::vector< PortReferenceSharedPtr > & | outPortRefs | ) | const throw () [virtual] |
Get list of all port references.
[out] | outPortRefs | List of port references |
Reimplemented in torc::generic::InstanceArray.
Definition at line 286 of file Instance.cpp.
void torc::generic::Instance::setPortReferences | ( | const std::vector< PortReferenceSharedPtr > & | inSource | ) | throw (Error) [virtual] |
Set list of all port references.
[in] | inSource | List of port references |
Reimplemented in torc::generic::InstanceArray.
Definition at line 298 of file Instance.cpp.
void torc::generic::Instance::applyOnAllPortReferences | ( | const _Action & | action | ) | throw (Error) [inline] |
Apply action on all PortReferences.
[in] | action | Action to be applied |
Definition at line 329 of file Instance.hpp.
const std::string torc::generic::Instance::getDesignator | ( | ) | const throw () [inline] |
Get the designated number.
Definition at line 343 of file Instance.hpp.
void torc::generic::Instance::setDesignator | ( | const std::string & | inSource | ) | throw () |
Set the designated number.
[in] | inSource | std::string representing designated number of a view interface. |
Definition at line 320 of file Instance.cpp.
const TimingSharedPtr torc::generic::Instance::getTiming | ( | ) | const throw () [inline] |
Get the pointer to the timing object
Definition at line 353 of file Instance.hpp.
void torc::generic::Instance::setTiming | ( | const TimingSharedPtr & | inSource | ) | throw () |
Set the pointer to the timing object
[in] | inSource | Pointer to the timing object |
Definition at line 330 of file Instance.cpp.
void torc::generic::Instance::flatten | ( | ) | throw (Error) [virtual] |
Flatten an instance so that internal references
Reimplemented in torc::generic::InstanceArray, torc::generic::InstanceArrayMember, and torc::generic::SingleInstance.
Definition at line 335 of file Instance.cpp.