torc-master
|
Represents a repository of unresolved usage references. More...
#include <Linker.hpp>
Data Structures | |
class | NameSpec |
class | UnresolvedInstances |
Public Types | |
typedef boost::shared_ptr < UnresolvedInstances > | UnresolvedInstancesPtr |
typedef SymTab< NameSpec, UnresolvedInstancesPtr > | UnresolvedInfoMap |
Public Member Functions | |
ViewSharedPtr | findExternView (const NameSpec &inNameSpec) |
void | setExternView (const NameSpec &inNameSpec, const ViewSharedPtr &inExternView) |
bool | findUnresolvedInstances (const NameSpec &inNameSpec, UnresolvedInstancesPtr &outInstances) throw (Error) |
void | registerUnresolvedInstance (const NameSpec &inNameSpec, const InstanceSharedPtr &inInstance) throw (Error) |
void | removeUnresolvedInstances (const NameSpec &inNameSpec) throw (Error) |
void | linkUnresolved (const NameSpec &inNameSpec, ViewSharedPtr &inView) throw (Error) |
Linker (const RootSharedPtr &root) | |
~Linker () throw () | |
Linker (const Linker &source) | |
Linker & | operator= (const Linker &inSource) |
Private Attributes | |
RootSharedPtr | mRoot |
UnresolvedInfoMap | mInfos |
Represents a repository of unresolved usage references.
The Linker class represents a repository of unresolved instances, that is instances that are yet to to be linked to concrete views. When an instance is created by the parser, it tries to find a concrete view using the name specification present in the EDIF file. If no such references were found, the instance is attached to a Extern view, that is a view that is only a place holder. As newer cells are discovered by the parser, the unresolved instances are linked to the concrete views and removed from the linker.
Definition at line 51 of file Linker.hpp.
Definition at line 133 of file Linker.hpp.
typedef boost::shared_ptr<UnresolvedInstances> torc::generic::Linker::UnresolvedInstancesPtr |
Definition at line 131 of file Linker.hpp.
torc::generic::Linker::Linker | ( | const RootSharedPtr & | inRoot | ) |
torc::generic::Linker::~Linker | ( | ) | ||
throw | ( | |||
) |
Definition at line 260 of file Linker.cpp.
torc::generic::Linker::Linker | ( | const Linker & | source | ) |
Definition at line 262 of file Linker.cpp.
ViewSharedPtr torc::generic::Linker::findExternView | ( | const NameSpec & | inNameSpec | ) |
Find the extern View if already present.
[in] | inNameSpec | Name of the view |
Find the extern View if already present. Otherwise null
[in] | inNameSpec | Name of the view |
Definition at line 149 of file Linker.cpp.
bool torc::generic::Linker::findUnresolvedInstances | ( | const NameSpec & | inNameSpec, |
Linker::UnresolvedInstancesPtr & | outInstances | ||
) | |||
throw | ( | Error | |
) |
Find the list of instances that are waiting for a view with the specified name.
[in] | inNameSpec | Name of the view to be linked with. |
[out] | outInstances | Pointer to unresolved object |
Find the list of instances that are waiting for a view with the specified name.
[in] | inNameSpec | Name of the view to be linked with. |
[out] | outInstances | Pointer to unresolved object |
Definition at line 190 of file Linker.cpp.
void torc::generic::Linker::linkUnresolved | ( | const NameSpec & | inNameSpec, |
ViewSharedPtr & | inView | ||
) | |||
throw | ( | Error | |
) |
Resolves all unlinked references for the given namespec to the given view
[in] | inNameSpec | Name specification for unresolved view |
[in] | inView | View to be bound to |
Definition at line 231 of file Linker.cpp.
Definition at line 267 of file Linker.cpp.
void torc::generic::Linker::registerUnresolvedInstance | ( | const NameSpec & | inNameSpec, |
const InstanceSharedPtr & | inInstance | ||
) | |||
throw | ( | Error | |
) |
Add an instance to the list of unresolved instances for a given name specification. If a new UnresolvedInstances object is to be created, this method will also call the setExternView() method to update the externView, with the view set for this object.
[in] | inNameSpec | name specification for a view. |
[in] | inInstance | instance to be added. |
Error | The master for this instance is not an extern or no extern is set for this view. |
Definition at line 205 of file Linker.cpp.
Remove all unresolved objects for the given name specification.
[in] | inNameSpec | Name specification |
Definition at line 225 of file Linker.cpp.
void torc::generic::Linker::setExternView | ( | const NameSpec & | inNameSpec, |
const ViewSharedPtr & | inExternView | ||
) |
Set an extern View
Set an extern View
Definition at line 167 of file Linker.cpp.
|
private |
Definition at line 208 of file Linker.hpp.
|
private |
Definition at line 207 of file Linker.hpp.