33 #ifndef HURRICANE_LAYER_H
34 #define HURRICANE_LAYER_H
36 #include "hurricane/Mask.h"
37 #include "hurricane/DBo.h"
38 #include "hurricane/Layers.h"
39 #include "hurricane/DbU.h"
40 #include "hurricane/BasicLayers.h"
56 static const uint32_t NoFlags = 0;
57 static const uint32_t EnclosureH = (1 << 0);
58 static const uint32_t EnclosureV = (1 << 1);
59 static const uint32_t EnclosureMax = (1 << 2);
60 static const uint32_t ExtensionCap = (1 << 3);
61 static const uint32_t ExtensionWidth = (1 << 4);
65 typedef Hurricane::Mask<unsigned long long>
Mask;
74 virtual const Layer* getBlockageLayer ()
const;
75 virtual const Layer* getCut ()
const;
83 virtual DbU::Unit getEnclosure ( uint32_t flags )
const;
84 virtual DbU::Unit getExtentionCap ()
const;
85 virtual DbU::Unit getExtentionWidth ()
const;
89 virtual DbU::Unit getTopEnclosure ( uint32_t flags )
const;
90 virtual DbU::Unit getBottomEnclosure ( uint32_t flags )
const;
91 virtual double getMinimalArea ()
const;
93 inline bool above (
const Layer* layer )
const;
94 inline bool below (
const Layer* layer )
const;
97 inline bool isSymbolic ()
const;
98 inline bool isBlockage ()
const;
101 inline void setSymbolic (
bool );
102 inline void setBlockage (
bool );
108 virtual void setMinimalArea (
double );
110 virtual void _toJson ( JsonWriter* )
const;
111 virtual string _getString ()
const;
112 virtual Record* _getRecord ()
const;
113 inline Layer* _getNextOfTechnologyLayerMap ()
const;
114 inline void _setMask (
const Mask& mask );
115 inline void _setExtractMask (
const Mask& extractMask );
116 inline void _setNextOfTechnologyLayerMap (
Layer* layer );
117 virtual void _onDbuChange (
float scale );
118 static const Name& _sgetName (
const Layer* );
128 Layer* _nextOfTechnologyLayerMap;
141 virtual void _postCreate ();
142 virtual void _preDestroy ();
145 struct CompareByMask :
public binary_function<const Layer*,const Layer*,bool> {
146 inline bool operator() (
const Layer* lhs,
const Layer* rhs )
const;
152 inline bool Layer::isSymbolic ()
const {
return _symbolic; }
153 inline bool Layer::isBlockage ()
const {
return _blockage; }
162 inline void Layer::setSymbolic (
bool state ) { _symbolic = state; }
163 inline void Layer::setBlockage (
bool state ) { _blockage = state; }
164 inline Layer* Layer::_getNextOfTechnologyLayerMap ()
const {
return _nextOfTechnologyLayerMap; }
165 inline void Layer::_setMask (
const Mask& mask ) { _mask = mask; }
166 inline void Layer::_setExtractMask (
const Mask& extractMask ) { _extractMask = extractMask; }
167 inline void Layer::_setNextOfTechnologyLayerMap ( Layer* layer ) { _nextOfTechnologyLayerMap = layer; }
169 inline bool Layer::CompareByMask::operator() (
const Layer* lhs,
const Layer* rhs )
const
176 class JsonLayer :
public JsonDBo {
178 JsonLayer (
unsigned long flags );
179 Technology* lookupTechnology ( JsonStack&,
const string& fname )
const;
BasicLayer description (API)
Definition: BasicLayer.h:44
DataBase object root class (API).
Definition: DBo.h:45
std::int64_t Unit
Definition: DbU.h:67
Layer description (API)
Definition: Layer.h:52
virtual void setEnclosure(const BasicLayer *layer, DbU::Unit, uint32_t flags)
bool below(const Layer *layer) const
Definition: Layer.h:155
const Mask & getMask() const
Definition: Layer.h:158
const Name & getName() const
Definition: Layer.h:157
void setMinimalSize(const DbU::Unit &minimalSize)
Layer * getMetalBelow(bool useSymbolic=true) const
virtual const Layer * getBottom() const
virtual void setExtentionCap(const BasicLayer *layer, DbU::Unit)
virtual const Layer * getTop() const
virtual const Layer * getOpposite(const Layer *) const
const DbU::Unit & getMinimalSpacing() const
Definition: Layer.h:161
virtual void setExtentionWidth(const BasicLayer *layer, DbU::Unit)
virtual BasicLayers getBasicLayers() const =0
void setMinimalSpacing(const DbU::Unit &minimalSpacing)
Layer * getCutBelow(bool useSymbolic=true) const
void setName(const Name &name)
bool above(const Layer *layer) const
Definition: Layer.h:154
Layer * getMetalAbove(bool useSymbolic=true) const
Layer * getCutAbove(bool useSymbolic=true) const
bool intersect(const Layer *layer) const
Technology * getTechnology() const
Definition: Layer.h:156
const Mask & getExtractMask() const
Definition: Layer.h:159
Hurricane::Mask< unsigned long long > Mask
Definition: Layer.h:65
bool contains(const Layer *layer) const
const DbU::Unit & getMinimalSize() const
Definition: Layer.h:160
Name description (API)
Definition: Name.h:35
Technological rules description (API).
Definition: Technology.h:62
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5