#include <Library.hpp>
Public Types | |
typedef VisitorType< Library > | Visitor |
Public Member Functions | |
virtual void | accept (BaseVisitor &inoutVisitor) throw (Error) |
const EdifLevel | getLevel () const throw () |
void | setLevel (const EdifLevel &inSource) throw () |
const std::map< Unit, ScaleFactor > | getScaleFactors () const throw () |
bool | findScaleFactor (Unit inUnit, ScaleFactor &outResult) const throw () |
bool | setScaleFactor (Unit inUnit, const ScaleFactor &inScale) throw () |
void | addCell (const CellSharedPtr &inCell) throw (Error) |
virtual CellSharedPtr | findCell (const std::string &inName) throw (Error) |
void | removeCell (const std::string &inName) throw (Error) |
virtual void | getCells (std::vector< CellSharedPtr > &outCells) throw () |
template<typename _Action> | |
void | applyOnAllCells (const _Action &action) throw (Error) |
const SimulationInfoSharedPtr | getSimulationInfo () const throw () |
void | setSimulationInfo (const SimulationInfoSharedPtr &inSource) throw () |
Private Member Functions | |
Library (const Library &) | |
Library & | operator= (const Library &) |
Private Attributes | |
SymTab< Unit, ScaleFactor > | mScaleFactors |
EdifLevel | mLevel |
SymTab< std::string, CellSharedPtr > | mCellSymTab |
SimulationInfoSharedPtr | mSimulationInfo |
Friends | |
class | FactoryType< Library > |
Classes | |
class | Factory |
A Library object defines a collection of EDIF libraries
Definition at line 58 of file Library.hpp.
Convenience typedef for visiting a library
Definition at line 79 of file Library.hpp.
void torc::generic::Library::accept | ( | BaseVisitor & | inoutVisitor | ) | throw (Error) [virtual] |
Recive a inoutVisitor to this class. The visit method of the inoutVisitor is called and a reference to this object is passed as a parameter. It has to be noted however, that a dynamic_cast is performed inside this method. If the cast fails, an appropriate exception is thrown by this method. This sitation can arise when the passed Visitor object does not inherit from the appropriate inoutVisitor specialization. See Visitor documentation for more details.
[in,out] | inoutVisitor | A reference to the inoutVisitor object |
Error | Visitor type inappropriate for visiting this object or any other error thrown by the Visitor::throw() method. |
Implements torc::generic::Visitable.
Definition at line 108 of file Library.cpp.
const EdifLevel torc::generic::Library::getLevel | ( | ) | const throw () [inline] |
The the level of EDIF file.
Definition at line 329 of file Library.hpp.
void torc::generic::Library::setLevel | ( | const EdifLevel & | inSource | ) | throw () |
Set the EDIF level.
[in] | inSource | EdifLevel object |
Definition at line 129 of file Library.cpp.
const std::map< Unit, ScaleFactor > torc::generic::Library::getScaleFactors | ( | ) | const throw () [inline] |
Get scale factors for different units in the library.
Definition at line 339 of file Library.hpp.
bool torc::generic::Library::findScaleFactor | ( | Unit | inUnit, | |
ScaleFactor & | outResult | |||
) | const throw () |
Find a scale factor for the given unit.
[in] | inUnit | Units for which scale factor is to be found. |
[out] | outResult | The scale factor if found. |
Definition at line 142 of file Library.cpp.
bool torc::generic::Library::setScaleFactor | ( | Unit | inUnit, | |
const ScaleFactor & | inScale | |||
) | throw () |
Set a scale factor for the given unit.
[in] | inUnit | Units for which scale factor is to be set. |
[out] | inScale | The scale factor to store. |
[in] | inUnit | Units for which scale factor is to be set. |
[out] | inScale | The scale factor to store. |
Definition at line 155 of file Library.cpp.
void torc::generic::Library::addCell | ( | const CellSharedPtr & | inCell | ) | throw (Error) |
Add a cell to the list of cells. If an empty pointer is supplied, it returns without doing anything. If an cell already exists in EDIF file in same library, parser ignores the cell.
[in] | inCell | A pointer to a cell object. |
Error | Cell could not be added, because Cell name is empty
| |
Error | Cell could not be added, because Cell name is already exists
|
[in] | inCell | A pointer to a cell object. |
Definition at line 168 of file Library.cpp.
CellSharedPtr torc::generic::Library::findCell | ( | const std::string & | inName | ) | throw (Error) [virtual] |
Find a cell by name, in the list of cells.
[in] | inName | String inSource specifying the name of the cell. |
Error | Cell could not be found, because Cell name is empty
|
[in] | inName | String inSource specifying the name of the cell. |
Definition at line 212 of file Library.cpp.
void torc::generic::Library::removeCell | ( | const std::string & | inName | ) | throw (Error) |
Remove the specified cell from the list of cells. If an empty pointer is passed, it returns without doing anything
inName | Name of the object to be delete |
Error | Cell name is empty
| |
Error | Cell name not preset in collection.
|
inCell | Pointer to a cell object. |
Definition at line 240 of file Library.cpp.
void torc::generic::Library::getCells | ( | std::vector< CellSharedPtr > & | outCells | ) | throw () [virtual] |
Get the list of cells. The list of cells is appended to the provided list
[out] | outCells | List of cells to be populated |
Definition at line 281 of file Library.cpp.
void torc::generic::Library::applyOnAllCells | ( | const _Action & | action | ) | throw (Error) [inline] |
Apply action on all Cells.
[in] | action | Action to be applied |
[in] | action | Action to be applied |
Definition at line 352 of file Library.hpp.
const SimulationInfoSharedPtr torc::generic::Library::getSimulationInfo | ( | ) | const throw () [inline] |
Get the pointer to the simulation info.
Definition at line 373 of file Library.hpp.
void torc::generic::Library::setSimulationInfo | ( | const SimulationInfoSharedPtr & | inSource | ) | throw () |
Set the pointer to the simulation info.
[in] | inSource | Pointer to the simulation info |
Definition at line 295 of file Library.cpp.