#include <Linker.hpp>
Public Types | |
typedef boost::shared_ptr < UnresolvedInstances > | UnresolvedInstancesPtr |
typedef SymTab< NameSpec, UnresolvedInstancesPtr > | UnresolvedInfoMap |
Public Member Functions | |
ViewSharedPtr | findExternView (const NameSpec &inNameSpec) throw () |
void | setExternView (const NameSpec &inNameSpec, const ViewSharedPtr &inExternView) throw () |
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 (const Linker &source) | |
Linker & | operator= (const Linker &inSource) throw () |
Private Attributes | |
RootSharedPtr | mRoot |
UnresolvedInfoMap | mInfos |
Classes | |
class | NameSpec |
class | UnresolvedInstances |
The Linker class represents a repository of unresolved instances, that is instances that are yet to to be linked to concrete veiws. 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 46 of file Linker.hpp.
torc::generic::Linker::Linker | ( | const RootSharedPtr & | inRoot | ) |
ViewSharedPtr torc::generic::Linker::findExternView | ( | const NameSpec & | inNameSpec | ) | throw () |
void torc::generic::Linker::setExternView | ( | const NameSpec & | inNameSpec, | |
const ViewSharedPtr & | inExternView | |||
) | throw () |
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 |
[in] | inNameSpec | Name of the view to be linked with. |
[out] | outInstances | Pointer to unresolved object |
Definition at line 197 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 212 of file Linker.cpp.
Remove all unresolved objects for the given name specification.
[in] | inNameSpec | Name specification |
Definition at line 232 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 238 of file Linker.cpp.