Cleaning in progress in Hurricane

This commit is contained in:
Christophe Alexandre 2008-03-14 16:31:18 +00:00
parent 751425c2d1
commit 0eb89cad32
23 changed files with 2523 additions and 1809 deletions

View File

@ -1 +1,3 @@
EXEC_PROGRAM(${DOXYGEN_EXECUTABLE})
ADD_CUSTOM_TARGET(doc ALL cd ${HURRICANE_SOURCE_DIR}/doc/hurricane && ${DOXYGEN_EXECUTABLE} doxyfile)
INSTALL(DIRECTORY html/ DESTINATION /share/doc/en/html/hurricane)

File diff suppressed because it is too large Load Diff

View File

@ -74,7 +74,7 @@ void InstanceGraphicsItem::drawElements(QPainter* painter) {
painter->save();
BasicLayer* layer = dynamic_cast<BasicLayer*>(slice->GetLayer());
if (layer) {
painter->setBrush(QColor(layer->GetRedValue(), layer->GetGreenValue(), layer->GetBlueValue()));
painter->setBrush(QColor(layer->getRedValue(), layer->getGreenValue(), layer->getBlueValue()));
} else {
painter->setBrush(Qt::blue);
}

View File

@ -80,9 +80,9 @@ void SegmentGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
boxToRectangle(box, rect);
BasicLayer* blayer = dynamic_cast<BasicLayer*>(segment->GetLayer());
if (blayer) {
QColor layerColor(blayer->GetRedValue(),
blayer->GetGreenValue(),
blayer->GetBlueValue());
QColor layerColor(blayer->getRedValue(),
blayer->getGreenValue(),
blayer->getBlueValue());
QBrush brush(layerColor);
brush.setStyle(Qt::Dense1Pattern);
painter->setBrush(brush);
@ -95,10 +95,10 @@ void SegmentGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
} else {
CompositeLayer* clayer = dynamic_cast<CompositeLayer*>(segment->GetLayer());
if (clayer) {
for_each_basic_layer(basiclayer, clayer->GetBasicLayers()) {
QColor layerColor(basiclayer->GetRedValue(),
basiclayer->GetGreenValue(),
basiclayer->GetBlueValue());
for_each_basic_layer(basiclayer, clayer->getBasicLayers()) {
QColor layerColor(basiclayer->getRedValue(),
basiclayer->getGreenValue(),
basiclayer->getBlueValue());
QBrush brush(layerColor);
brush.setStyle(Qt::Dense1Pattern);
painter->setBrush(brush);

View File

@ -96,7 +96,7 @@ BasicLayer::BasicLayer(Technology* technology, const Name& name, const Type& typ
{
}
BasicLayer* BasicLayer::Create(Technology* technology, const Name& name, const Type& type, unsigned extractNumber, const Unit& minimalSize, const Unit& minimalSpacing)
BasicLayer* BasicLayer::create(Technology* technology, const Name& name, const Type& type, unsigned extractNumber, const Unit& minimalSize, const Unit& minimalSpacing)
// ****************************************************************************************************
{
BasicLayer* basicLayer =
@ -107,31 +107,23 @@ BasicLayer* BasicLayer::Create(Technology* technology, const Name& name, const T
return basicLayer;
}
BasicLayers BasicLayer::GetBasicLayers() const
BasicLayers BasicLayer::getBasicLayers() const
// *******************************************
{
return BasicLayer_BasicLayers(this);
}
void BasicLayer::SetColor(unsigned short redValue, unsigned short greenValue, unsigned short blueValue)
void BasicLayer::setColor(unsigned short redValue, unsigned short greenValue, unsigned short blueValue)
// ****************************************************************************************************
{
if ((redValue != _redValue) || (greenValue != _greenValue) || (blueValue != _blueValue)) {
_redValue = redValue;
_greenValue = greenValue;
_blueValue = blueValue;
//if (_drawGC) {
// gdk_gc_destroy(_drawGC);
// _drawGC = NULL;
//}
//if (_fillGC) {
// gdk_gc_destroy(_fillGC);
// _fillGC = NULL;
//}
}
}
void BasicLayer::SetFillPattern(const string& fillPattern)
void BasicLayer::setFillPattern(const string& fillPattern)
// *******************************************************
{
if (fillPattern != _fillPattern) {
@ -144,14 +136,6 @@ void BasicLayer::SetFillPattern(const string& fillPattern)
throw Error("Can't set fill pattern (bad value)");
}
_fillPattern = fillPattern;
//if (_drawGC) {
// gdk_gc_destroy(_drawGC);
// _drawGC = NULL;
//}
//if (_fillGC) {
// gdk_gc_destroy(_fillGC);
// _fillGC = NULL;
//}
}
}
@ -159,8 +143,8 @@ void BasicLayer::_PostCreate()
// ***************************
{
Mask basicLayersMask = 0;
for_each_basic_layer(basicLayer, GetTechnology()->GetBasicLayers()) {
basicLayersMask |= basicLayer->GetMask();
for_each_basic_layer(basicLayer, getTechnology()->GetBasicLayers()) {
basicLayersMask |= basicLayer->getMask();
end_for;
}
@ -170,7 +154,7 @@ void BasicLayer::_PostCreate()
if (!mask)
throw Error("Can't create " + _TName("BasicLayer") + " : mask capacity overflow");
_SetMask(mask);
_setMask(mask);
if (_extractNumber) {
Mask extractMask = (1 << _extractNumber);
@ -178,7 +162,7 @@ void BasicLayer::_PostCreate()
if (!extractMask)
throw Error("Can't create " + _TName("BasicLayer") + " : extract mask capacity overflow");
_SetExtractMask(extractMask);
_setExtractMask(extractMask);
}
Inherit::_PostCreate();
@ -189,12 +173,9 @@ void BasicLayer::_PreDelete()
{
Inherit::_PreDelete();
//if (_drawGC) gdk_gc_destroy(_drawGC);
//if (_fillGC) gdk_gc_destroy(_fillGC);
CompositeLayers compositeLayers = GetTechnology()->GetCompositeLayers();
CompositeLayers compositeLayers = getTechnology()->GetCompositeLayers();
for_each_composite_layer(compositeLayer, compositeLayers) {
if (compositeLayer->Contains(this)) compositeLayer->Remove(this);
if (compositeLayer->contains(this)) compositeLayer->remove(this);
end_for;
}
}
@ -222,76 +203,6 @@ Record* BasicLayer::_GetRecord() const
return record;
}
//GdkGC* BasicLayer::_GetDrawGC()
//// ****************************
//{
// if (!_drawGC) _drawGC = gtk_gc_new(_redValue, _greenValue, _blueValue);
//
// return _drawGC;
//}
//
//GdkGC* BasicLayer::_GetFillGC()
//// ****************************
//{
// if (!_fillGC) _fillGC = gtk_gc_new(_redValue, _greenValue, _blueValue, _fillPattern);
//
// return _fillGC;
//}
//
//void BasicLayer::_Fill(View* view, const Box& box) const
//// *****************************************************
//{
// switch (_type) {
// case Type::CONTACT : {
//
// Unit minimalSize = GetMinimalSize();
// Unit minimalSpacing = GetMinimalSpacing();
//
// if ((minimalSize <= 0) || (minimalSpacing <= 0))
// view->FillRectangle(box);
// else {
// view->DrawRectangle(box);
//
// Unit width = box.GetWidth();
// Unit height = box.GetHeight();
// Unit offset = minimalSize + minimalSpacing;
//
// int nx = (int)(GetValue(width) / GetValue(offset));
// int ny = (int)(GetValue(height) / GetValue(offset));
//
// Unit dx = (width - (minimalSize + (offset * nx))) / 2;
// Unit dy = (height - (minimalSize + (offset * ny))) / 2;
//
// if (dx < 0) dx = (width - (minimalSize + (offset * (--nx)))) / 2;
// if (dy < 0) dy = (height - (minimalSize + (offset * (--ny)))) / 2;
//
// Unit xmin = box.GetXMin() + dx;
// Unit ymin = box.GetYMin() + dy;
// Unit xmax = box.GetXMax() - dx;
// Unit ymax = box.GetYMax() - dy;
//
// if ((xmin < xmax) && (ymin < ymax)) {
// Unit y = ymin;
// do {
// Unit x = xmin;
// do {
// view->FillRectangle(x, y, x + minimalSize, y + minimalSize, true);
// x += offset;
// } while (x < xmax);
// y += offset;
// } while (y < ymax);
// }
// }
// break;
// }
// default : {
// view->FillRectangle(box);
// break;
// }
// }
//}
//
// ****************************************************************************************************
// BasicLayer_BasicLayers implementation
// ****************************************************************************************************

View File

@ -43,7 +43,7 @@ class BasicLayer : public Layer {
public: operator const Code&() const {return _code;};
public: const Code& GetCode() const {return _code;};
public: const Code& getCode() const {return _code;};
public: string _GetTypeName() const { return _TName("BasicLayer::Type"); };
public: string _GetString() const;
@ -61,34 +61,32 @@ class BasicLayer : public Layer {
private: unsigned short _blueValue;
private: string _fillPattern;
private: double _displayThreshold;
// private: GdkGC* _drawGC;
// private: GdkGC* _fillGC;
// Constructors
// ************
protected: BasicLayer(Technology* technology, const Name& name, const Type& type, unsigned extractNumber, const Unit& minimalSize = 0, const Unit& minimalSpacing = 0);
public: static BasicLayer* Create(Technology* technology, const Name& name, const Type& type, unsigned extractNumber, const Unit& minimalSize = 0, const Unit& minimalSpacing = 0);
public: static BasicLayer* create(Technology* technology, const Name& name, const Type& type, unsigned extractNumber, const Unit& minimalSize = 0, const Unit& minimalSpacing = 0);
// Accessors
// *********
public: const Type& GetType() const {return _type;};
public: unsigned GetExtractNumber() const {return _extractNumber;};
public: const unsigned short& GetRedValue() const {return _redValue;};
public: const unsigned short& GetGreenValue() const {return _greenValue;};
public: const unsigned short& GetBlueValue() const {return _blueValue;};
public: const string& GetFillPattern() const {return _fillPattern;};
public: double GetDisplayThreshold() const {return _displayThreshold;};
public: virtual BasicLayers GetBasicLayers() const;
public: const Type& getType() const {return _type;};
public: unsigned getExtractNumber() const {return _extractNumber;};
public: const unsigned short& getRedValue() const {return _redValue;};
public: const unsigned short& getGreenValue() const {return _greenValue;};
public: const unsigned short& getBlueValue() const {return _blueValue;};
public: const string& getFillPattern() const {return _fillPattern;};
public: double getDisplayThreshold() const {return _displayThreshold;};
public: virtual BasicLayers getBasicLayers() const;
// Updators
// ********
public: void SetColor(unsigned short redValue, unsigned short greenValue, unsigned short blueValue);
public: void SetFillPattern(const string& fillPattern);
public: void SetDisplayThreshold(double threshold) {_displayThreshold = threshold;};
public: void setColor(unsigned short redValue, unsigned short greenValue, unsigned short blueValue);
public: void setFillPattern(const string& fillPattern);
public: void setDisplayThreshold(double threshold) {_displayThreshold = threshold;};
// Others
// ******
@ -100,11 +98,9 @@ class BasicLayer : public Layer {
public: virtual string _GetTypeName() const {return _TName("BasicLayer");};
public: virtual string _GetString() const;
public: virtual Record* _GetRecord() const;
public: virtual BasicLayer* _GetSymbolicBasicLayer() {return this;};
//public: GdkGC* _GetDrawGC();
//public: GdkGC* _GetFillGC();
public: virtual BasicLayer* _getSymbolicBasicLayer() {return this;};
public: void _Fill(View* view, const Box& box) const;
public: void _fill(View* view, const Box& box) const;
};

View File

@ -1451,7 +1451,7 @@ Cell_Slices::Locator::Locator(const Cell* cell, const Layer::Mask& mask)
{
if (_cell && (_mask != 0)) {
_sliceLocator = ((Cell*)_cell)->_GetSliceMap().GetElements().GetLocator();
while (_sliceLocator.IsValid() && !(_sliceLocator.GetElement()->GetLayer()->GetMask() & _mask))
while (_sliceLocator.IsValid() && !(_sliceLocator.GetElement()->GetLayer()->getMask() & _mask))
_sliceLocator.Progress();
}
}
@ -1499,7 +1499,7 @@ void Cell_Slices::Locator::Progress()
do {
_sliceLocator.Progress();
}
while (_sliceLocator.IsValid() && !(_sliceLocator.GetElement()->GetLayer()->GetMask() & _mask));
while (_sliceLocator.IsValid() && !(_sliceLocator.GetElement()->GetLayer()->getMask() & _mask));
}
}

View File

@ -34,7 +34,7 @@ CompositeLayer::CompositeLayer(Technology* technology, const Name& name, const T
{
}
CompositeLayer* CompositeLayer::Create(Technology* technology, const Name& name, const Type& type, const Unit& minimalSize, const Unit& minimalSpacing)
CompositeLayer* CompositeLayer::create(Technology* technology, const Name& name, const Type& type, const Unit& minimalSize, const Unit& minimalSpacing)
// ****************************************************************************************************
{
CompositeLayer* compositeLayer =
@ -45,53 +45,53 @@ CompositeLayer* CompositeLayer::Create(Technology* technology, const Name& name,
return compositeLayer;
}
BasicLayers CompositeLayer::GetBasicLayers() const
BasicLayers CompositeLayer::getBasicLayers() const
// ***********************************************
{
return GetCollection(_basicLayerList);
}
Unit CompositeLayer::GetContactSize(const BasicLayer* basicLayer) const
Unit CompositeLayer::getContactSize(const BasicLayer* basicLayer) const
// **************************************************************
{
SizeMap::const_iterator it = _contactSizeMap.find(basicLayer);
return ((it == _contactSizeMap.end()) ? 0 : (*it).second);
}
Unit CompositeLayer::GetSegmentSize(const BasicLayer* basicLayer) const
Unit CompositeLayer::getSegmentSize(const BasicLayer* basicLayer) const
// **************************************************************
{
SizeMap::const_iterator it = _segmentSizeMap.find(basicLayer);
return ((it == _segmentSizeMap.end()) ? 0 : (*it).second);
}
Unit CompositeLayer::GetSegmentExtention(const BasicLayer* basicLayer) const
Unit CompositeLayer::getSegmentExtention(const BasicLayer* basicLayer) const
// *******************************************************************
{
SizeMap::const_iterator it = _segmentExtentionMap.find(basicLayer);
return ((it == _segmentExtentionMap.end()) ? 0 : (*it).second);
}
Unit CompositeLayer::GetPadSize(const BasicLayer* basicLayer) const
Unit CompositeLayer::getPadSize(const BasicLayer* basicLayer) const
// **********************************************************
{
SizeMap::const_iterator it = _padSizeMap.find(basicLayer);
return ((it == _padSizeMap.end()) ? 0 : (*it).second);
}
void CompositeLayer::Add(BasicLayer* basicLayer, const Unit& contactSize, const Unit& segmentSize, const Unit& segmentExtention, const Unit& padSize)
void CompositeLayer::add(BasicLayer* basicLayer, const Unit& contactSize, const Unit& segmentSize, const Unit& segmentExtention, const Unit& padSize)
// ****************************************************************************************************
{
if (!basicLayer)
throw Error("Can't add basic layer : null basic layer");
if (Contains(basicLayer))
if (contains(basicLayer))
throw Error("Can't add basic layer : already done");
_basicLayerList.push_back(basicLayer);
_SetMask(GetMask() | basicLayer->GetMask());
_SetExtractMask(GetExtractMask() | basicLayer->GetExtractMask());
_setMask(getMask() | basicLayer->getMask());
_setExtractMask(getExtractMask() | basicLayer->getExtractMask());
if (contactSize != 0) _contactSizeMap[basicLayer] = contactSize;
if (segmentSize != 0) _segmentSizeMap[basicLayer] = segmentSize;
@ -104,13 +104,13 @@ void CompositeLayer::Add(BasicLayer* basicLayer, const Unit& contactSize, const
_maximalPadSize = max(padSize, _maximalPadSize);
}
void CompositeLayer::Remove(BasicLayer* basicLayer)
void CompositeLayer::remove(BasicLayer* basicLayer)
// ************************************************
{
if (!basicLayer)
throw Error("Can't remove basic layer : null basic layer");
if (!Contains(basicLayer))
if (!contains(basicLayer))
throw Error("Can't remove basic layer : not contained");
_basicLayerList.remove(basicLayer);
@ -128,18 +128,18 @@ void CompositeLayer::Remove(BasicLayer* basicLayer)
Mask mask = 0;
Mask extractMask = 0;
for_each_basic_layer(basicLayer, GetBasicLayers()) {
mask |= basicLayer->GetMask();
extractMask |= basicLayer->GetExtractMask();
_maximalContactSize = max(GetContactSize(basicLayer), _maximalContactSize);
_maximalSegmentSize = max(GetSegmentSize(basicLayer), _maximalSegmentSize);
_maximalSegmentExtention = max(GetSegmentExtention(basicLayer), _maximalSegmentExtention);
_maximalPadSize = max(GetPadSize(basicLayer), _maximalPadSize);
for_each_basic_layer(basicLayer, getBasicLayers()) {
mask |= basicLayer->getMask();
extractMask |= basicLayer->getExtractMask();
_maximalContactSize = max(getContactSize(basicLayer), _maximalContactSize);
_maximalSegmentSize = max(getSegmentSize(basicLayer), _maximalSegmentSize);
_maximalSegmentExtention = max(getSegmentExtention(basicLayer), _maximalSegmentExtention);
_maximalPadSize = max(getPadSize(basicLayer), _maximalPadSize);
end_for;
}
_SetMask(mask);
_SetExtractMask(extractMask);
_setMask(mask);
_setExtractMask(extractMask);
}
string CompositeLayer::_GetString() const
@ -179,15 +179,15 @@ Record* CompositeLayer::_GetRecord() const
return record;
}
void CompositeLayer::_UpdateSymbolicBasicLayer(const Layer::Mask& visibleBasicLayersMask)
void CompositeLayer::_updateSymbolicBasicLayer(const Layer::Mask& visibleBasicLayersMask)
// **************************************************************************************
{
_symbolicBasicLayer = NULL;
BasicLayer* symbolicBasicLayer = NULL;
for_each_basic_layer(basicLayer, GetBasicLayers()) {
if (basicLayer->GetMask() & visibleBasicLayersMask) {
for_each_basic_layer(basicLayer, getBasicLayers()) {
if (basicLayer->getMask() & visibleBasicLayersMask) {
symbolicBasicLayer = basicLayer;
if (basicLayer->GetType() == BasicLayer::Type::CONTACT)
if (basicLayer->getType() == BasicLayer::Type::CONTACT)
_symbolicBasicLayer = basicLayer;
}
end_for;

View File

@ -40,7 +40,7 @@ class CompositeLayer : public Layer {
public: operator const Code&() const {return _code;};
public: const Code& GetCode() const {return _code;};
public: const Code& getCode() const {return _code;};
public: string _GetTypeName() const { return _TName("CompositeLayer::Type"); };
public: string _GetString() const;
@ -72,27 +72,27 @@ class CompositeLayer : public Layer {
protected: CompositeLayer(Technology* technology, const Name& name, const Type& type, const Unit& minimalSize = 0, const Unit& minimalSpacing = 0);
public: static CompositeLayer* Create(Technology* technology, const Name& name, const Type& type, const Unit& minimalSize = 0, const Unit& minimalSpacing = 0);
public: static CompositeLayer* create(Technology* technology, const Name& name, const Type& type, const Unit& minimalSize = 0, const Unit& minimalSpacing = 0);
// Accessors
// *********
public: const Type& GetType() const {return _type;};
public: virtual BasicLayers GetBasicLayers() const;
public: Unit GetContactSize(const BasicLayer* basicLayer) const;
public: Unit GetSegmentSize(const BasicLayer* basicLayer) const;
public: Unit GetSegmentExtention(const BasicLayer* basicLayer) const;
public: Unit GetPadSize(const BasicLayer* basicLayer) const;
public: const Unit& GetMaximalContactSize() const {return _maximalContactSize;};
public: const Unit& GetMaximalSegmentSize() const {return _maximalSegmentSize;};
public: const Unit& GetMaximalSegmentExtention() const {return _maximalSegmentExtention;};
public: const Unit& GetMaximalPadSize() const {return _maximalPadSize;};
public: const Type& getType() const {return _type;};
public: virtual BasicLayers getBasicLayers() const;
public: Unit getContactSize(const BasicLayer* basicLayer) const;
public: Unit getSegmentSize(const BasicLayer* basicLayer) const;
public: Unit getSegmentExtention(const BasicLayer* basicLayer) const;
public: Unit getPadSize(const BasicLayer* basicLayer) const;
public: const Unit& getMaximalContactSize() const {return _maximalContactSize;};
public: const Unit& getMaximalSegmentSize() const {return _maximalSegmentSize;};
public: const Unit& getMaximalSegmentExtention() const {return _maximalSegmentExtention;};
public: const Unit& getMaximalPadSize() const {return _maximalPadSize;};
// Updators
// ********
public: void Add(BasicLayer* basicLayer, const Unit& contactSize, const Unit& segmentSize, const Unit& segmentExtention, const Unit& padSize);
public: void Remove(BasicLayer* basicLayer);
public: void add(BasicLayer* basicLayer, const Unit& contactSize, const Unit& segmentSize, const Unit& segmentExtention, const Unit& padSize);
public: void remove(BasicLayer* basicLayer);
// Others
// ******
@ -100,10 +100,10 @@ class CompositeLayer : public Layer {
public: virtual string _GetTypeName() const {return _TName("CompositeLayer");};
public: virtual string _GetString() const;
public: virtual Record* _GetRecord() const;
public: virtual BasicLayer* _GetSymbolicBasicLayer() {return _symbolicBasicLayer;};
public: BasicLayerList& _GetBasicLayerList() {return _basicLayerList;};
public: virtual BasicLayer* _getSymbolicBasicLayer() {return _symbolicBasicLayer;};
public: BasicLayerList& _getBasicLayerList() {return _basicLayerList;};
public: void _UpdateSymbolicBasicLayer(const Layer::Mask& visibleBasicLayersMask);
public: void _updateSymbolicBasicLayer(const Layer::Mask& visibleBasicLayersMask);
};

View File

@ -186,7 +186,7 @@ Box Contact::GetBoundingBox() const
Box Contact::GetBoundingBox(const BasicLayer* basicLayer) const
// ******************************************************
{
if (!_layer->Contains(basicLayer)) return Box();
if (!_layer->contains(basicLayer)) return Box();
Unit size = _GetSize(basicLayer);
@ -318,7 +318,7 @@ string Contact::_GetString() const
// *******************************
{
string s = Inherit::_GetString();
s.insert(s.length() - 1, " " + GetString(_layer->GetName()));
s.insert(s.length() - 1, " " + GetString(_layer->getName()));
s.insert(s.length() - 1, " [" + GetValueString(GetX()));
s.insert(s.length() - 1, " " + GetValueString(GetY()));
s.insert(s.length() - 1, "] " + GetValueString(_width));
@ -349,7 +349,7 @@ Unit Contact::_GetSize() const
Layer* layer = GetLayer();
if (is_a<CompositeLayer*>(layer))
size = ((CompositeLayer*)layer)->GetMaximalContactSize();
size = ((CompositeLayer*)layer)->getMaximalContactSize();
return size;
}
@ -359,69 +359,16 @@ Unit Contact::_GetSize(const BasicLayer* basicLayer) const
{
Layer* layer = GetLayer();
if (!layer->Contains(basicLayer)) return 0;
if (!layer->contains(basicLayer)) return 0;
Unit size = 0;
if (is_a<CompositeLayer*>(layer))
size = ((CompositeLayer*)layer)->GetContactSize(basicLayer);
size = ((CompositeLayer*)layer)->getContactSize(basicLayer);
return size;
}
//void Contact::_Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation)
//// ****************************************************************************************************
//{
// if (_width && _height) {
// if (1 < view->GetScreenSize(max(_width, _height)))
// basicLayer->_Fill(view, transformation.GetBox(GetBoundingBox(basicLayer)));
// }
// if (basicLayer == _layer->_GetSymbolicBasicLayer()) {
// if (view->CutPointsAreVisible() && (3 < view->GetScale())) {
// Point position = GetPosition();
// view->DrawPoint(transformation.GetPoint(position), 3);
// if (_width) {
// Box box = transformation.GetBox(Box(position).Inflate(GetHalfWidth(), 0));
// view->DrawLine(box.GetXMin(), box.GetYMin(), box.GetXMax(), box.GetYMax());
// }
// if (_height) {
// Box box = transformation.GetBox(Box(position).Inflate(0, GetHalfHeight()));
// view->DrawLine(box.GetXMin(), box.GetYMin(), box.GetXMax(), box.GetYMax());
// }
// }
// }
//}
//
//void Contact::_Highlight(View* view, const Box& updateArea, const Transformation& transformation)
//// **********************************************************************************************
//{
// if (_width && _height) {
// if (1 < view->GetScreenSize(max(_width, _height))) {
// for_each_basic_layer(basicLayer, GetLayer()->GetBasicLayers()) {
// basicLayer->_Fill(view, transformation.GetBox(GetBoundingBox(basicLayer)));
// end_for;
// }
// }
// }
// if (view->GetScale() <= 1)
// view->DrawPoint(transformation.GetPoint(GetPosition()), 1);
// else if (view->GetScale() <= 3)
// view->DrawPoint(transformation.GetPoint(GetPosition()), 2);
// else {
// Point position = GetPosition();
// view->DrawPoint(transformation.GetPoint(position), 3);
// if (_width) {
// Box box = transformation.GetBox(Box(position).Inflate(GetHalfWidth(), 0));
// view->DrawLine(box.GetXMin(), box.GetYMin(), box.GetXMax(), box.GetYMax());
// }
// if (_height) {
// Box box = transformation.GetBox(Box(position).Inflate(0, GetHalfHeight()));
// view->DrawLine(box.GetXMin(), box.GetYMin(), box.GetXMax(), box.GetYMax());
// }
// }
//}
//
// ****************************************************************************************************
// Contact::AnchorHook implementation
// ****************************************************************************************************

View File

@ -70,7 +70,7 @@ Box Horizontal::GetBoundingBox() const
Box Horizontal::GetBoundingBox(const BasicLayer* basicLayer) const
// *********************************************************
{
if (!GetLayer()->Contains(basicLayer)) return Box();
if (!GetLayer()->contains(basicLayer)) return Box();
Unit size = GetHalfWidth() + _GetSize(basicLayer);
Unit extention = _GetExtention(basicLayer);

View File

@ -503,13 +503,13 @@ static bool IsConnex(const Occurrence& componentOccurrence1, const Occurrence& c
Component* component2 = (Component*)componentOccurrence2.GetEntity();
Layer* layer1 = component1->GetLayer();
Layer* layer2 = component2->GetLayer();
if (layer1->GetExtractMask() & layer2->GetExtractMask()) {
if (layer1->getExtractMask() & layer2->getExtractMask()) {
Transformation transformation1 = componentOccurrence1.GetPath().GetTransformation();
Transformation transformation2 = componentOccurrence2.GetPath().GetTransformation();
for_each_basic_layer(basicLayer1, layer1->GetBasicLayers()) {
for_each_basic_layer(basicLayer1, layer1->getBasicLayers()) {
Box box1 = transformation1.getBox(component1->GetBoundingBox(basicLayer1));
for_each_basic_layer(basicLayer2, layer2->GetBasicLayers()) {
if (basicLayer1->GetExtractMask() & basicLayer2->GetExtractMask()) {
for_each_basic_layer(basicLayer2, layer2->getBasicLayers()) {
if (basicLayer1->getExtractMask() & basicLayer2->getExtractMask()) {
Box box2 = transformation2.getBox(component2->GetBoundingBox(basicLayer2));
if (box1.intersect(box2)) return true;
}

View File

@ -38,19 +38,19 @@ Layer::Layer(Technology* technology, const Name& name, const Unit& minimalSize,
throw Error("Can't create " + _TName("Layer") + " " + GetString(_name) + " : already exists");
}
bool Layer::Contains(const Layer* layer) const
bool Layer::contains(const Layer* layer) const
// *******************************************
{
return (layer && ((_mask & layer->GetMask()) == layer->GetMask()));
return (layer && ((_mask & layer->getMask()) == layer->getMask()));
}
bool Layer::Intersect(const Layer* layer) const
bool Layer::intersect(const Layer* layer) const
// ********************************************
{
return ((_mask & layer->GetMask()) != 0);
return ((_mask & layer->getMask()) != 0);
}
void Layer::SetName(const Name& name)
void Layer::setName(const Name& name)
// **********************************
{
if (name != _name) {
@ -66,19 +66,19 @@ void Layer::SetName(const Name& name)
}
}
void Layer::SetMinimalSize(const Unit& minimalSize)
void Layer::setMinimalSize(const Unit& minimalSize)
// ************************************************
{
_minimalSize = minimalSize;
}
void Layer::SetMinimalSpacing(const Unit& minimalSpacing)
void Layer::setMinimalSpacing(const Unit& minimalSpacing)
// ******************************************************
{
_minimalSpacing = minimalSpacing;
}
void Layer::SetPitch(const Unit& pitch)
void Layer::setPitch(const Unit& pitch)
// ************************************
{
_pitch = pitch;

View File

@ -52,28 +52,28 @@ class Layer : public DBo {
// Accessors
// *********
public: Technology* GetTechnology() const {return _technology;};
public: const Name& GetName() const {return _name;};
public: const Mask& GetMask() const {return _mask;};
public: const Mask& GetExtractMask() const {return _extractMask;};
public: const Unit& GetMinimalSize() const {return _minimalSize;};
public: const Unit& GetMinimalSpacing() const {return _minimalSpacing;};
public: Unit GetPitch() const {return (_pitch==0?(_minimalSize + _minimalSpacing):_pitch);};
public: virtual BasicLayers GetBasicLayers() const = 0;
public: Technology* getTechnology() const {return _technology;};
public: const Name& getName() const {return _name;};
public: const Mask& getMask() const {return _mask;};
public: const Mask& getExtractMask() const {return _extractMask;};
public: const Unit& getMinimalSize() const {return _minimalSize;};
public: const Unit& getMinimalSpacing() const {return _minimalSpacing;};
public: Unit getPitch() const {return (_pitch==0?(_minimalSize + _minimalSpacing):_pitch);};
public: virtual BasicLayers getBasicLayers() const = 0;
// Predicates
// **********
public: bool Contains(const Layer* layer) const;
public: bool Intersect(const Layer* layer) const;
public: bool contains(const Layer* layer) const;
public: bool intersect(const Layer* layer) const;
// Updators
// ********
public: void SetName(const Name& name);
public: void SetMinimalSize(const Unit& minimalSize);
public: void SetMinimalSpacing(const Unit& minimalSpacing);
public: void SetPitch(const Unit& pitch);
public: void setName(const Name& name);
public: void setMinimalSize(const Unit& minimalSize);
public: void setMinimalSpacing(const Unit& minimalSpacing);
public: void setPitch(const Unit& pitch);
// Others
// ******
@ -84,12 +84,12 @@ class Layer : public DBo {
public: virtual string _GetString() const;
public: virtual Record* _GetRecord() const;
public: virtual BasicLayer* _GetSymbolicBasicLayer() = 0;
public: Layer* _GetNextOfTechnologyLayerMap() const {return _nextOfTechnologyLayerMap;};
public: virtual BasicLayer* _getSymbolicBasicLayer() = 0;
public: Layer* _getNextOfTechnologyLayerMap() const {return _nextOfTechnologyLayerMap;};
public: void _SetMask(const Mask& mask) {_mask = mask;};
public: void _SetExtractMask(const Mask& extractMask) {_extractMask = extractMask;};
public: void _SetNextOfTechnologyLayerMap(Layer* layer) {_nextOfTechnologyLayerMap = layer;};
public: void _setMask(const Mask& mask) {_mask = mask;};
public: void _setExtractMask(const Mask& extractMask) {_extractMask = extractMask;};
public: void _setNextOfTechnologyLayerMap(Layer* layer) {_nextOfTechnologyLayerMap = layer;};
};

View File

@ -60,7 +60,7 @@ Box Pad::GetBoundingBox() const
Box boundingBox = _boundingBox;
if (is_a<CompositeLayer*>(_layer))
boundingBox.inflate(((CompositeLayer*)_layer)->GetMaximalPadSize());
boundingBox.inflate(((CompositeLayer*)_layer)->getMaximalPadSize());
return boundingBox;
}
@ -68,12 +68,12 @@ Box Pad::GetBoundingBox() const
Box Pad::GetBoundingBox(const BasicLayer* basicLayer) const
// **************************************************
{
if (!_layer->Contains(basicLayer)) return Box();
if (!_layer->contains(basicLayer)) return Box();
Box boundingBox = _boundingBox;
if (is_a<CompositeLayer*>(_layer))
boundingBox.inflate(((CompositeLayer*)_layer)->GetPadSize(basicLayer));
boundingBox.inflate(((CompositeLayer*)_layer)->getPadSize(basicLayer));
return boundingBox;
}
@ -103,7 +103,7 @@ string Pad::_GetString() const
// ***************************
{
string s = Inherit::_GetString();
s.insert(s.length() - 1, " " + GetString(_layer->GetName()));
s.insert(s.length() - 1, " " + GetString(_layer->getName()));
s.insert(s.length() - 1, " " + GetString(_boundingBox));
return s;
}

View File

@ -294,7 +294,7 @@ string Segment::_GetString() const
// *******************************
{
string s = Inherit::_GetString();
s.insert(s.length() - 1, " " + GetString(_layer->GetName()));
s.insert(s.length() - 1, " " + GetString(_layer->getName()));
s.insert(s.length() - 1, " [" + GetValueString(GetSourceX()) + " " + GetValueString(GetSourceY()) + "]");
s.insert(s.length() - 1, " [" + GetValueString(GetTargetX()) + " " + GetValueString(GetTargetY()) + "]");
s.insert(s.length() - 1, " " + GetValueString(_width));
@ -323,7 +323,7 @@ Unit Segment::_GetSize() const
Layer* layer = GetLayer();
if (is_a<CompositeLayer*>(layer))
size = ((CompositeLayer*)layer)->GetMaximalSegmentSize();
size = ((CompositeLayer*)layer)->getMaximalSegmentSize();
return size;
}
@ -335,7 +335,7 @@ Unit Segment::_GetExtention() const
Layer* layer = GetLayer();
if (is_a<CompositeLayer*>(layer))
extention = ((CompositeLayer*)layer)->GetMaximalSegmentExtention();
extention = ((CompositeLayer*)layer)->getMaximalSegmentExtention();
return extention;
}
@ -345,12 +345,12 @@ Unit Segment::_GetSize(const BasicLayer* basicLayer) const
{
Layer* layer = GetLayer();
if (!layer->Contains(basicLayer)) return 0;
if (!layer->contains(basicLayer)) return 0;
Unit size = 0;
if (is_a<CompositeLayer*>(layer))
size = ((CompositeLayer*)layer)->GetSegmentSize(basicLayer);
size = ((CompositeLayer*)layer)->getSegmentSize(basicLayer);
return size;
}
@ -360,44 +360,16 @@ Unit Segment::_GetExtention(const BasicLayer* basicLayer) const
{
Layer* layer = GetLayer();
if (!layer->Contains(basicLayer)) return 0;
if (!layer->contains(basicLayer)) return 0;
Unit extention = 0;
if (is_a<CompositeLayer*>(layer))
extention = ((CompositeLayer*)layer)->GetSegmentExtention(basicLayer);
extention = ((CompositeLayer*)layer)->getSegmentExtention(basicLayer);
return extention;
}
//bool Segment::_IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const
//// ***************************************************************************************
//{
// Box area(point);
// area.Inflate(aperture);
// Layer* layer = GetLayer();
// for_each_basic_layer(basicLayer, layer->GetBasicLayers()) {
// if (view->IsVisible(basicLayer))
// if (GetBoundingBox(basicLayer).Intersect(area)) return true;
// end_for;
// }
//
// return false;
//}
//
//void Segment::_Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation)
//// ****************************************************************************************************
//{
// if (1 < view->GetScreenSize(GetWidth()))
// basicLayer->_Fill(view, transformation.GetBox(GetBoundingBox(basicLayer)));
// else
// if (basicLayer == GetLayer()->_GetSymbolicBasicLayer())
// view->DrawLine(transformation.GetPoint(GetSourcePosition()),
// transformation.GetPoint(GetTargetPosition()));
//}
//
// ****************************************************************************************************
// Segment::SourceHook implementation
// ****************************************************************************************************

View File

@ -91,7 +91,7 @@ string Slice::_GetString() const
{
string s = "<" + _TName("Slice");
// s += " " + GetString(_cell->GetName());
s += " " + GetString(_layer->GetName());
s += " " + GetString(_layer->getName());
s += ">";
return s;
}
@ -108,25 +108,6 @@ Record* Slice::_GetRecord() const
return record;
}
//void Slice::_Draw(View* view, BasicLayer* basicLayer, const Box& updateArea, const Transformation& transformation)
//// ****************************************************************************************************
//{
// assert(view);
// assert(basicLayer);
// if (_layer->Contains(basicLayer)) {
// if (GetBoundingBox().Intersect(updateArea)) {
// if ((basicLayer == _layer->_GetSymbolicBasicLayer()) || (3 < view->GetScale())) {
// for_each_go(go, GetGosUnder(updateArea)) {
// go->_Draw(view, basicLayer, updateArea, transformation);
// end_for;
// }
// }
// }
// }
//}
//
} // End of Hurricane namespace.
// ****************************************************************************************************

View File

@ -9,7 +9,6 @@
#include "Layer.h"
#include "BasicLayer.h"
#include "CompositeLayer.h"
#include "Tag.h"
#include "Error.h"
@ -87,248 +86,6 @@ class Technology_BasicLayers : public Collection<BasicLayer*> {
};
// ****************************************************************************************************
// Utilitarians
// ****************************************************************************************************
static void Abort(Tag* tag, const string& reason)
// **********************************************
{
Tag* topTag = tag;
while (topTag->GetTag()) topTag = topTag->GetTag();
throw Error("Can't load technology : " + reason +
" : " + topTag->GetArgument() + " (line " + GetString(tag->GetLine()) + ")");
}
static void CreateBasicLayerFromTag(Technology* technology, Tag* tag)
// ******************************************************************
{
Name name = tag->GetArgument();
if (name.IsEmpty())
Abort(tag, "undefined basic layer name");
if (technology->GetLayer(name))
Abort(tag, "layer " + GetString(name) + " already exists");
BasicLayer::Type type;
unsigned extractNumber = 0;
Unit minimalSize = 0;
Unit minimalSpacing = 0;
unsigned short redValue = 255;
unsigned short greenValue = 255;
unsigned short blueValue = 255;
string fillPattern = "FFFFFFFFFFFFFFFF";
double displayThreshold = 0.0;
for_each_tag(childTag, tag->GetTags()) {
if (childTag->GetName() == "type") {
if (!::Scan(childTag->GetArgument(), type))
Abort(tag, "invalid type");
}
else if (childTag->GetName() == "extract-number") {
if (!::Scan(childTag->GetArgument(), extractNumber))
Abort(tag, "invalid extract-number");
}
else if (childTag->GetName() == "minimal-size") {
if (!::Scan(childTag->GetArgument(), minimalSize))
Abort(tag, "invalid minimal-size");
}
else if (childTag->GetName() == "minimal-spacing") {
if (!::Scan(childTag->GetArgument(), minimalSpacing))
Abort(tag, "invalid minimal-spacing");
}
else if (childTag->GetName() == "color") {
if (!::Scan(childTag->GetArgument(), redValue, greenValue, blueValue))
Abort(tag, "invalid color");
}
else if (childTag->GetName() == "pattern") {
if (!::Scan(childTag->GetArgument(), fillPattern))
Abort(tag, "invalid pattern");
}
else if (childTag->GetName() == "display-threshold") {
if (!::Scan(childTag->GetArgument(), displayThreshold))
Abort(tag, "invalid display-threshold");
}
end_for;
}
BasicLayer* basicLayer =
BasicLayer::Create(technology, name, type, extractNumber, minimalSize, minimalSpacing);
basicLayer->SetColor(redValue, greenValue, blueValue);
basicLayer->SetFillPattern(fillPattern);
basicLayer->SetDisplayThreshold(displayThreshold);
}
void AddBasicLayerFromTag(CompositeLayer* compositeLayer, Tag* tag)
// ****************************************************************
{
Name name = tag->GetArgument();
if (name.IsEmpty())
Abort(tag, "undefined basic layer name");
BasicLayer* basicLayer = compositeLayer->GetTechnology()->GetBasicLayer(name);
if (!basicLayer)
Abort(tag, "undefined basic layer " + GetString(name));
if (compositeLayer->Contains(basicLayer)) compositeLayer->Remove(basicLayer);
Unit contactSize = 0;
Unit segmentSize = 0;
Unit segmentExtention = 0;
Unit padSize = 0;
for_each_tag(childTag, tag->GetTags()) {
if (childTag->GetName() == "contact-size") {
if (!::Scan(childTag->GetArgument(), contactSize))
Abort(tag, "invalid contact-size");
}
else if (childTag->GetName() == "segment-size") {
if (!::Scan(childTag->GetArgument(), segmentSize))
Abort(tag, "invalid segment-size");
}
else if (childTag->GetName() == "segment-extention") {
if (!::Scan(childTag->GetArgument(), segmentExtention))
Abort(tag, "invalid segment-extention");
}
else if (childTag->GetName() == "pad-size") {
if (!::Scan(childTag->GetArgument(), padSize))
Abort(tag, "invalid pad-size");
}
end_for;
}
compositeLayer->Add(basicLayer, contactSize, segmentSize, segmentExtention, padSize);
}
void AddCompositeLayerFromTag(CompositeLayer* compositeLayer, Tag* tag)
// ********************************************************************
{
Name name = tag->GetArgument();
CompositeLayer* childCompositeLayer = compositeLayer->GetTechnology()->GetCompositeLayer(name);
if (!childCompositeLayer)
Abort(tag, "unknown composite-layer " + GetString(name));
for_each_basic_layer(basicLayer, childCompositeLayer->GetBasicLayers()) {
Unit contactSize =
max(childCompositeLayer->GetContactSize(basicLayer),
compositeLayer->GetContactSize(basicLayer));
Unit segmentSize =
max(childCompositeLayer->GetSegmentSize(basicLayer),
compositeLayer->GetSegmentSize(basicLayer));
Unit segmentExtention =
max(childCompositeLayer->GetSegmentExtention(basicLayer),
compositeLayer->GetSegmentExtention(basicLayer));
Unit padSize =
max(childCompositeLayer->GetPadSize(basicLayer),
compositeLayer->GetPadSize(basicLayer));
if (compositeLayer->Contains(basicLayer)) compositeLayer->Remove(basicLayer);
compositeLayer->Add(basicLayer, contactSize, segmentSize, segmentExtention, padSize);
Unit minimalSize = max(compositeLayer->GetMinimalSize(), childCompositeLayer->GetMinimalSize());
compositeLayer->SetMinimalSize(minimalSize);
end_for;
}
}
static void CreateCompositeLayerFromTag(Technology* technology, Tag* tag)
// **********************************************************************
{
Name name = tag->GetArgument();
if (name.IsEmpty())
Abort(tag, "undefined composite layer name");
if (technology->GetLayer(name))
Abort(tag, "layer " + GetString(name) + " already exists");
CompositeLayer::Type type;
Unit minimalSize = 0;
Unit minimalSpacing = 0;
for_each_tag(childTag, tag->GetTags()) {
if (childTag->GetName() == "type") {
if (!::Scan(childTag->GetArgument(), type))
Abort(tag, "invalid type");
}
else if (childTag->GetName() == "minimal-size") {
if (!::Scan(childTag->GetArgument(), minimalSize))
Abort(tag, "invalid minimal-size");
}
else if (childTag->GetName() == "minimal-spacing") {
if (!::Scan(childTag->GetArgument(), minimalSpacing))
Abort(tag, "invalid minimal-spacing");
}
end_for;
}
CompositeLayer* compositeLayer =
CompositeLayer::Create(technology, name, type, minimalSize, minimalSpacing);
for_each_tag(childTag, tag->GetTags()) {
if (childTag->GetName() == "basic-layer")
AddBasicLayerFromTag(compositeLayer, childTag);
if (childTag->GetName() == "composite-layer")
AddCompositeLayerFromTag(compositeLayer, childTag);
end_for;
}
}
static Technology* CreateTechnologyFromTag(DataBase* dataBase, Tag* tag)
// *********************************************************************
{
Name name;
unsigned precision;
unsigned gridStep = 1;
for_each_tag(childTag, tag->GetTags()) {
if (childTag->GetName() == "name") {
name = childTag->GetArgument();
}
else if (childTag->GetName() == "precision") {
if (!::Scan(childTag->GetArgument(), precision))
Abort(tag, "invalid precision");
if (GetMaximalPrecisionAllowed() < precision)
Abort(childTag, "too big precision (not allowed)");
}
else if (childTag->GetName() == "grid-step") {
if (!::Scan(childTag->GetArgument(), gridStep))
Abort(tag, "invalid grid-step");
if (!gridStep)
Abort(childTag, "too small grid step (not allowed)");
}
end_for;
}
if (name.IsEmpty())
Abort(tag, "undefined technology name");
Technology* technology = Technology::Create(dataBase, name);
SetPrecision(precision);
SetGridStep(gridStep);
for_each_tag(childTag, tag->GetTags()) {
if (childTag->GetName() == "basic-layer")
CreateBasicLayerFromTag(technology, childTag);
else if (childTag->GetName() == "composite-layer")
CreateCompositeLayerFromTag(technology, childTag);
end_for;
}
return technology;
}
// ****************************************************************************************************
// Technology implementation
// ****************************************************************************************************
@ -361,26 +118,6 @@ Technology* Technology::Create(DataBase* dataBase, const Name& name)
return technology;
}
Technology* Technology::CreateFromFile(DataBase* dataBase, const string& filePathName)
// ***********************************************************************************
{
Tag* tag = NULL;
Technology* technology = NULL;
try {
tag = new Tag(filePathName, "technology");
technology = CreateTechnologyFromTag(dataBase, tag);
delete tag;
}
catch (...) {
if (technology) technology->Delete();
if (tag) delete tag;
throw;
}
return technology;
}
BasicLayer* Technology::GetBasicLayer(const Name& name) const
// **********************************************************
{
@ -477,7 +214,7 @@ Technology::LayerMap::LayerMap()
Name Technology::LayerMap::_GetKey(Layer* layer) const
// ***************************************************
{
return layer->GetName();
return layer->getName();
}
unsigned Technology::LayerMap::_GetHashValue(Name name) const
@ -489,13 +226,13 @@ unsigned Technology::LayerMap::_GetHashValue(Name name) const
Layer* Technology::LayerMap::_GetNextElement(Layer* layer) const
// *************************************************************
{
return layer->_GetNextOfTechnologyLayerMap();
return layer->_getNextOfTechnologyLayerMap();
}
void Technology::LayerMap::_SetNextElement(Layer* layer, Layer* nextLayer) const
// *****************************************************************************
{
layer->_SetNextOfTechnologyLayerMap(nextLayer);
layer->_setNextOfTechnologyLayerMap(nextLayer);
};
@ -584,7 +321,7 @@ Technology_BasicLayers::Locator::Locator(const Technology* technology, const Lay
{
if (_technology) {
_basicLayerLocator = _technology->GetBasicLayers().GetLocator();
while (_basicLayerLocator.IsValid() && !(_basicLayerLocator.GetElement()->GetMask() & _mask))
while (_basicLayerLocator.IsValid() && !(_basicLayerLocator.GetElement()->getMask() & _mask))
_basicLayerLocator.Progress();
}
}
@ -631,7 +368,7 @@ void Technology_BasicLayers::Locator::Progress()
do {
_basicLayerLocator.Progress();
}
while (_basicLayerLocator.IsValid() && !(_basicLayerLocator.GetElement()->GetMask() & _mask));
while (_basicLayerLocator.IsValid() && !(_basicLayerLocator.GetElement()->getMask() & _mask));
}
string Technology_BasicLayers::Locator::_GetString() const

View File

@ -63,7 +63,6 @@ class Technology : public DBo {
protected: Technology(DataBase* dataBase, const Name& name);
public: static Technology* Create(DataBase* dataBase, const Name& name);
public: static Technology* CreateFromFile(DataBase* dataBase, const string& filePathName);
// Accessors
// *********

View File

@ -70,7 +70,7 @@ Box Vertical::GetBoundingBox() const
Box Vertical::GetBoundingBox(const BasicLayer* basicLayer) const
// *******************************************************
{
if (!GetLayer()->Contains(basicLayer)) return Box();
if (!GetLayer()->contains(basicLayer)) return Box();
Unit size = GetHalfWidth() + _GetSize(basicLayer);
Unit extention = _GetExtention(basicLayer);

View File

@ -181,12 +181,12 @@ CellWidget::CellWidget(Cell* cell,
if (technology) {
for_each_basic_layer(basiclayer, technology->GetBasicLayers()) {
_basicLayersBrush[basiclayer] =
::getBrush(basiclayer->GetFillPattern(),
basiclayer->GetRedValue(),
basiclayer->GetGreenValue(),
basiclayer->GetBlueValue());
::getBrush(basiclayer->getFillPattern(),
basiclayer->getRedValue(),
basiclayer->getGreenValue(),
basiclayer->getBlueValue());
_basicLayersPen[basiclayer] =
QPen(QColor(basiclayer->GetRedValue(), basiclayer->GetGreenValue(), basiclayer->GetBlueValue()));
QPen(QColor(basiclayer->getRedValue(), basiclayer->getGreenValue(), basiclayer->getBlueValue()));
end_for;
}
}
@ -768,7 +768,7 @@ CellWidget::isVisible(BasicLayer* layer) const
//throw Error(NULL_LAYER, __FILE__, __LINE__);
}
return (_visibleLayerMask & layer->GetMask());
return (_visibleLayerMask & layer->getMask());
}
bool
@ -778,7 +778,7 @@ CellWidget::isDrawable(BasicLayer* layer) const
//throw Error(NULL_LAYER, __FILE__, __LINE__);
}
return (layer->GetDisplayThreshold() <= _scale);
return (layer->getDisplayThreshold() <= _scale);
}
@ -911,10 +911,10 @@ CellWidget::setVisible(BasicLayer* layer,
{
if (isVisible(layer) != visible) {
if (visible) {
_visibleLayerMask |= layer->GetMask();
_visibleLayerMask |= layer->getMask();
}
else {
_visibleLayerMask &= ~layer->GetMask();
_visibleLayerMask &= ~layer->getMask();
}
onSetVisible(layer, visible);
@ -925,7 +925,7 @@ CellWidget::setVisible(BasicLayer* layer,
// invalidate();
//}
if (cell && !cell->GetSlices(layer->GetMask()).IsEmpty() && isDrawable(layer)) {
if (cell && !cell->GetSlices(layer->getMask()).IsEmpty() && isDrawable(layer)) {
invalidate();
}
}
@ -1798,7 +1798,7 @@ void CellWidget::drawContent(const Instance* instance, const BasicLayer* basicLa
void CellWidget::drawSlice(const Slice* slice, const BasicLayer* basicLayer, const H::Box& updateArea, const Transformation& transformation) const {
if (slice->GetLayer()->Contains(basicLayer)) {
if (slice->GetLayer()->contains(basicLayer)) {
if (slice->GetBoundingBox().intersect(updateArea)) {
//if ((basicLayer == _layer->_GetSymbolicBasicLayer()) || (3 < view->GetScale()))
for_each_go(go, slice->GetGosUnder(updateArea)) {

View File

@ -25,7 +25,7 @@ LayersWidget::LayersWidget(QWidget* parent)
//connect(checkBox, SIGNAL(toggled(bool)),
// renderArea, SLOT(setAntialiased(bool)));
string layerName = GetString(basicLayer->GetName());
string layerName = GetString(basicLayer->getName());
QLabel* label = new QLabel(tr(layerName.c_str()));
widgets.insert(label);
mainLayout->addWidget(label, line, 1, Qt::AlignRight);