18 #ifndef CRL_TOOL_ENGINE_H 19 #define CRL_TOOL_ENGINE_H 22 #include "hurricane/Commons.h" 23 #include "hurricane/Timer.h" 24 #include "hurricane/DBo.h" 25 #include "hurricane/Slot.h" 32 #include "crlcore/Measures.h" 33 #include "crlcore/ToolEngines.h" 38 using Hurricane::Timer;
39 using Hurricane::Record;
55 static bool inDestroyAll ();
58 inline Cell* getCell ()
const;
59 inline uint32_t getPassNumber ()
const;
60 bool placementModificationFlagHasChanged ();
61 bool routingModificationFlagHasChanged ();
62 inline void setInRelationDestroy (
bool );
63 inline const Timer& getTimer ()
const;
64 inline void setPassNumber ( uint32_t );
65 inline std::string getMeasureLabel ( std::string )
const;
66 void startMeasures ();
68 void suspendMeasures ();
69 void resumeMeasures ();
70 void printMeasures ()
const;
71 template<
typename Data>
72 inline void addMeasure ( std::string,
const Data&,
unsigned int width )
const;
73 template<
typename Data>
74 inline void addMeasure ( std::string,
const Data& )
const;
75 template<
typename Data>
76 inline void addMeasure ( std::string, Data* )
const;
77 template<
typename Data>
78 inline const Data& getMeasure ( std::string )
const;
79 virtual std::string _getTypeName ()
const;
80 virtual std::string _getString ()
const;
81 virtual Record* _getRecord ()
const;
83 static bool _inDestroyAll;
87 unsigned int _placementModificationFlag;
88 unsigned int _routingModificationFlag;
89 bool _inRelationDestroy;
94 virtual void _postCreate ();
95 virtual void _preDestroy ();
97 void grabPlacementModificationFlag ();
98 void getPlacementModificationFlag ();
99 void grabRoutingModificationFlag ();
100 void getRoutingModificationFlag ();
108 inline Cell* ToolEngine::getCell ()
const {
return _cell; }
109 inline void ToolEngine::setInRelationDestroy (
bool state ) { _inRelationDestroy = state; }
110 inline const Timer& ToolEngine::getTimer ()
const {
return _timer; }
111 inline uint32_t ToolEngine::getPassNumber ()
const {
return _passNumber; }
112 inline void ToolEngine::setPassNumber ( uint32_t n ) { _passNumber = n; }
114 inline std::string ToolEngine::getMeasureLabel ( std::string label )
const 115 {
return _getTypeName() +
"." + label; }
117 template<
typename Data>
118 inline void ToolEngine::addMeasure ( std::string name,
const Data& data,
unsigned int width )
const 119 { ::CRL::addMeasure( getCell(), getMeasureLabel(name), getPassNumber(), data, width ); }
121 template<
typename Data>
122 inline void ToolEngine::addMeasure ( std::string name,
const Data& data )
const 123 { ::CRL::addMeasure( getCell(), getMeasureLabel(name), getPassNumber(), data ); }
125 template<
typename Data>
126 inline void ToolEngine::addMeasure ( std::string name, Data* data )
const 127 { ::CRL::addMeasure( getCell(), getMeasureLabel(name), getPassNumber(), data ); }
129 template<
typename Data>
130 inline const Data& ToolEngine::getMeasure ( std::string name )
const 131 { return ::CRL::getMeasure<Data>( getCell(), getMeasureLabel(name) )->getData( getPassNumber() ); }
136 #endif // CRL_TOOL_ENGINE_H
The namespace of Coriolis Core.
Definition: Environment.h:24