19 #include "hurricane/Commons.h"
20 #include "hurricane/Timer.h"
21 #include "hurricane/DBo.h"
22 #include "hurricane/Slot.h"
29 #include "crlcore/Measures.h"
30 #include "crlcore/ToolEngines.h"
35 using Hurricane::Timer;
36 using Hurricane::Record;
52 static bool inDestroyAll ();
55 inline Cell* getCell ()
const;
56 inline uint32_t getPassNumber ()
const;
57 bool placementModificationFlagHasChanged ();
58 bool routingModificationFlagHasChanged ();
59 inline void setInRelationDestroy (
bool );
60 inline const Timer& getTimer ()
const;
61 inline void setPassNumber ( uint32_t );
62 inline std::string getMeasureLabel ( std::string )
const;
63 void startMeasures ();
65 void suspendMeasures ();
66 void resumeMeasures ();
67 void printMeasures ()
const;
68 template<
typename Data>
69 inline void addMeasure ( std::string,
const Data&,
unsigned int width )
const;
70 template<
typename Data>
71 inline void addMeasure ( std::string,
const Data& )
const;
72 template<
typename Data>
73 inline void addMeasure ( std::string, Data* )
const;
74 template<
typename Data>
75 inline const Data* getMeasure ( std::string )
const;
76 virtual std::string _getTypeName ()
const;
77 virtual std::string _getString ()
const;
78 virtual Record* _getRecord ()
const;
80 static bool _inDestroyAll;
85 unsigned int _placementModificationFlag;
86 unsigned int _routingModificationFlag;
87 bool _inRelationDestroy;
92 virtual void _postCreate ();
93 virtual void _preDestroy ();
95 void grabPlacementModificationFlag ();
96 void getPlacementModificationFlag ();
97 void grabRoutingModificationFlag ();
98 void getRoutingModificationFlag ();
106 inline Cell* ToolEngine::getCell ()
const {
return _cell; }
107 inline void ToolEngine::setInRelationDestroy (
bool state ) { _inRelationDestroy = state; }
108 inline const Timer& ToolEngine::getTimer ()
const {
return _timer; }
109 inline uint32_t ToolEngine::getPassNumber ()
const {
return _passNumber; }
110 inline void ToolEngine::setPassNumber ( uint32_t n ) { _passNumber = n; }
112 inline std::string ToolEngine::getMeasureLabel ( std::string label )
const
113 {
return _getTypeName() +
"." + label; }
115 template<
typename Data>
116 inline void ToolEngine::addMeasure ( std::string name,
const Data& data,
unsigned int width )
const
117 { ::CRL::addMeasure( getCell(), getMeasureLabel(name), getPassNumber(), data, width ); }
119 template<
typename Data>
120 inline void ToolEngine::addMeasure ( std::string name,
const Data& data )
const
121 { ::CRL::addMeasure( getCell(), getMeasureLabel(name), getPassNumber(), data ); }
123 template<
typename Data>
124 inline void ToolEngine::addMeasure ( std::string name, Data* data )
const
125 { ::CRL::addMeasure( getCell(), getMeasureLabel(name), getPassNumber(), data ); }
127 template<
typename Data>
128 inline const Data* ToolEngine::getMeasure ( std::string name )
const
130 const Measure<Data>* measure = ::CRL::getMeasure<Data>( getCell(), getMeasureLabel(name) );
131 if (not measure)
return NULL;
132 return &(measure->getData( getPassNumber() ));
The namespace of Coriolis Core.
Definition: AcmSigda.h:28