diff --git a/hurricane/src/hurricane/Contact.cpp b/hurricane/src/hurricane/Contact.cpp index 8cb46992..892e4f4d 100644 --- a/hurricane/src/hurricane/Contact.cpp +++ b/hurricane/src/hurricane/Contact.cpp @@ -210,7 +210,7 @@ void Contact::translate(const Unit& dx, const Unit& dy) } } -void Contact::SetLayer(Layer* layer) +void Contact::setLayer(Layer* layer) // ********************************* { if (!layer) @@ -222,7 +222,7 @@ void Contact::SetLayer(Layer* layer) } } -void Contact::SetWidth(const Unit& width) +void Contact::setWidth(const Unit& width) // ************************************** { if (width != _width) { @@ -231,7 +231,7 @@ void Contact::SetWidth(const Unit& width) } } -void Contact::SetHeight(const Unit& height) +void Contact::setHeight(const Unit& height) // **************************************** { if (height != _height) { @@ -240,7 +240,7 @@ void Contact::SetHeight(const Unit& height) } } -void Contact::SetSizes(const Unit& width, const Unit& height) +void Contact::setSizes(const Unit& width, const Unit& height) // ********************************************************** { if ((width != _width) || (height != _height)) { @@ -250,47 +250,47 @@ void Contact::SetSizes(const Unit& width, const Unit& height) } } -void Contact::SetX(const Unit& x) +void Contact::setX(const Unit& x) // ****************************** { - SetPosition(x, getY()); + setPosition(x, getY()); } -void Contact::SetY(const Unit& y) +void Contact::setY(const Unit& y) // ****************************** { - SetPosition(getX(), y); + setPosition(getX(), y); } -void Contact::SetPosition(const Unit& x, const Unit& y) +void Contact::setPosition(const Unit& x, const Unit& y) // **************************************************** { Component* anchor = getAnchor(); if (!anchor) - SetOffset(x, y); + setOffset(x, y); else - SetOffset(x - anchor->getX(), y - anchor->getY()); + setOffset(x - anchor->getX(), y - anchor->getY()); } -void Contact::SetPosition(const Point& position) +void Contact::setPosition(const Point& position) // ********************************************* { - SetPosition(position.getX(), position.getY()); + setPosition(position.getX(), position.getY()); } -void Contact::SetDx(const Unit& dx) +void Contact::setDx(const Unit& dx) // ******************************** { - SetOffset(dx, _dy); + setOffset(dx, _dy); } -void Contact::SetDy(const Unit& dy) +void Contact::setDy(const Unit& dy) // ******************************** { - SetOffset(_dx, dy); + setOffset(_dx, dy); } -void Contact::SetOffset(const Unit& dx, const Unit& dy) +void Contact::setOffset(const Unit& dx, const Unit& dy) // **************************************************** { if ((dx != _dx) || (dy != _dy)) { diff --git a/hurricane/src/hurricane/Contact.h b/hurricane/src/hurricane/Contact.h index c1601b58..b853f5a6 100644 --- a/hurricane/src/hurricane/Contact.h +++ b/hurricane/src/hurricane/Contact.h @@ -86,17 +86,17 @@ class Contact : public Component { public: virtual void translate(const Unit& dx, const Unit& dy); - public: void SetLayer(Layer* layer); - public: void SetWidth(const Unit& width); - public: void SetHeight(const Unit& height); - public: void SetSizes(const Unit& width, const Unit& height); - public: void SetX(const Unit& x); - public: void SetY(const Unit& y); - public: void SetPosition(const Unit& x, const Unit& y); - public: void SetPosition(const Point& position); - public: void SetDx(const Unit& dx); - public: void SetDy(const Unit& dy); - public: void SetOffset(const Unit& dx, const Unit& dy); + public: void setLayer(Layer* layer); + public: void setWidth(const Unit& width); + public: void setHeight(const Unit& height); + public: void setSizes(const Unit& width, const Unit& height); + public: void setX(const Unit& x); + public: void setY(const Unit& y); + public: void setPosition(const Unit& x, const Unit& y); + public: void setPosition(const Point& position); + public: void setDx(const Unit& dx); + public: void setDy(const Unit& dy); + public: void setOffset(const Unit& dx, const Unit& dy); // Others // ****** diff --git a/hurricane/src/hurricane/Error.h b/hurricane/src/hurricane/Error.h index f04cbf33..7d83f007 100644 --- a/hurricane/src/hurricane/Error.h +++ b/hurricane/src/hurricane/Error.h @@ -52,7 +52,7 @@ class Error : public Exception { // Modifiers // ********* - public: void SetReason ( const string& reason ) { _reason = reason; }; + public: void setReason ( const string& reason ) { _reason = reason; }; // Others // ****** diff --git a/hurricane/src/hurricane/Exception.h b/hurricane/src/hurricane/Exception.h index 3e71e07d..c9b37957 100644 --- a/hurricane/src/hurricane/Exception.h +++ b/hurricane/src/hurricane/Exception.h @@ -40,7 +40,7 @@ class Exception : public NestedSlotAdapter { // Accessors // ********* - public: string What() const { return _getString(); }; + public: string what() const { return _getString(); }; // Others // ****** diff --git a/hurricane/src/hurricane/Horizontal.cpp b/hurricane/src/hurricane/Horizontal.cpp index ffd3d2f7..185f4c57 100644 --- a/hurricane/src/hurricane/Horizontal.cpp +++ b/hurricane/src/hurricane/Horizontal.cpp @@ -113,7 +113,7 @@ void Horizontal::translate(const Unit& dx, const Unit& dy) } } -void Horizontal::SetY(const Unit& y) +void Horizontal::setY(const Unit& y) // ********************************* { if (y != _y) { @@ -122,7 +122,7 @@ void Horizontal::SetY(const Unit& y) } } -void Horizontal::SetDxSource(const Unit& dxSource) +void Horizontal::setDxSource(const Unit& dxSource) // *********************************************** { if (dxSource != _dxSource) { @@ -131,7 +131,7 @@ void Horizontal::SetDxSource(const Unit& dxSource) } } -void Horizontal::SetDxTarget(const Unit& dxTarget) +void Horizontal::setDxTarget(const Unit& dxTarget) // *********************************************** { if (dxTarget != _dxTarget) { diff --git a/hurricane/src/hurricane/Horizontal.h b/hurricane/src/hurricane/Horizontal.h index d673d56b..3579de76 100644 --- a/hurricane/src/hurricane/Horizontal.h +++ b/hurricane/src/hurricane/Horizontal.h @@ -61,9 +61,9 @@ class Horizontal : public Segment { public: virtual void translate(const Unit& dx, const Unit& dy); - public: void SetY(const Unit& y); - public: void SetDxSource(const Unit& dxSource); - public: void SetDxTarget(const Unit& dxSource); + public: void setY(const Unit& y); + public: void setDxSource(const Unit& dxSource); + public: void setDxTarget(const Unit& dxSource); public: void translate(const Unit& dy); // Others diff --git a/hurricane/src/hurricane/Interval.cpp b/hurricane/src/hurricane/Interval.cpp index 6722515a..a802bec7 100644 --- a/hurricane/src/hurricane/Interval.cpp +++ b/hurricane/src/hurricane/Interval.cpp @@ -57,82 +57,82 @@ Interval& Interval::operator=(const Interval& interval) bool Interval::operator==(const Interval& interval) const // ****************************************************** { - return !IsEmpty() && !interval.IsEmpty() && (_vMin == interval._vMin) && (_vMax == interval._vMax); + return !isEmpty() && !interval.isEmpty() && (_vMin == interval._vMin) && (_vMax == interval._vMax); } bool Interval::operator!=(const Interval& interval) const // ****************************************************** { - return IsEmpty() || interval.IsEmpty() || (_vMin != interval._vMin) || (_vMax != interval._vMax); + return isEmpty() || interval.isEmpty() || (_vMin != interval._vMin) || (_vMax != interval._vMax); } Interval Interval::getUnion(const Interval& interval) const // ******************************************************** { - if (IsEmpty() && interval.IsEmpty()) return Interval(); + if (isEmpty() && interval.isEmpty()) return Interval(); return Interval(min(_vMin, interval._vMin), max(_vMax, interval._vMax)); } Interval Interval::getIntersection(const Interval& interval) const // *************************************************************** { - if (!Intersect(interval)) return Interval(); + if (!intersect(interval)) return Interval(); return Interval(max(_vMin, interval._vMin), min(_vMax, interval._vMax)); } -bool Interval::IsEmpty() const +bool Interval::isEmpty() const // *************************** { return (_vMax < _vMin); } -bool Interval::IsPonctual() const +bool Interval::isPonctual() const // ****************************** { return (_vMax == _vMin); } -bool Interval::Contains(const Unit& v) const +bool Interval::contains(const Unit& v) const // ***************************************** { - return !IsEmpty() && (_vMin <= v) && (v <= _vMax); + return !isEmpty() && (_vMin <= v) && (v <= _vMax); } -bool Interval::Contains(const Interval& interval) const +bool Interval::contains(const Interval& interval) const // **************************************************** { - return !IsEmpty() && !interval.IsEmpty() && (_vMin <= interval._vMin) && (interval._vMax <= _vMax); + return !isEmpty() && !interval.isEmpty() && (_vMin <= interval._vMin) && (interval._vMax <= _vMax); } -bool Interval::Intersect(const Interval& interval) const +bool Interval::intersect(const Interval& interval) const // ***************************************************** { - return !IsEmpty() && !interval.IsEmpty() && !((_vMax < interval._vMin) || (interval._vMax < _vMin)); + return !isEmpty() && !interval.isEmpty() && !((_vMax < interval._vMin) || (interval._vMax < _vMin)); } -bool Interval::Inferior(const Interval& interval, bool strict) const +bool Interval::inferior(const Interval& interval, bool strict) const // ***************************************************************** { if (_vMax < interval._vMin) return true; return !strict && (_vMax == interval._vMin); } -bool Interval::Superior(const Interval& interval, bool strict) const +bool Interval::superior(const Interval& interval, bool strict) const // ***************************************************************** { if (_vMin > interval._vMax) return true; return !strict && (_vMin == interval._vMax); } -bool Interval::IsConstrainedBy(const Interval& interval) const +bool Interval::isConstrainedBy(const Interval& interval) const // *********************************************************** { - return (!IsEmpty() && - !interval.IsEmpty() && + return (!isEmpty() && + !interval.isEmpty() && ((_vMin == interval.getVMin()) || (_vMax == interval.getVMax()))); } -Interval& Interval::MakeEmpty() +Interval& Interval::makeEmpty() // **************************** { _vMin = 1; @@ -140,16 +140,16 @@ Interval& Interval::MakeEmpty() return *this; } -Interval& Interval::Inflate(const Unit& dv) +Interval& Interval::inflate(const Unit& dv) // **************************************** { - return Inflate(dv, dv); + return inflate(dv, dv); } -Interval& Interval::Inflate(const Unit& dvMin, const Unit& dvMax) +Interval& Interval::inflate(const Unit& dvMin, const Unit& dvMax) // ************************************************************** { - if (!IsEmpty()) { + if (!isEmpty()) { _vMin -= dvMin; _vMax += dvMax; } @@ -159,7 +159,7 @@ Interval& Interval::Inflate(const Unit& dvMin, const Unit& dvMax) Interval& Interval::merge(const Unit& v) // ************************************* { - if (IsEmpty()) { + if (isEmpty()) { _vMin = v; _vMax = v; } @@ -173,23 +173,23 @@ Interval& Interval::merge(const Unit& v) Interval& Interval::merge(const Interval& interval) // ************************************************ { - if (!interval.IsEmpty()) { + if (!interval.isEmpty()) { _vMin = min(_vMin, interval._vMin); _vMax = max(_vMax, interval._vMax); } return *this; } -Interval& Interval::Intersection(const Unit& vMin, const Unit& vMax) +Interval& Interval::intersection(const Unit& vMin, const Unit& vMax) // ***************************************************************** { - return Intersection(Interval(vMin,vMax)); + return intersection(Interval(vMin,vMax)); } -Interval& Interval::Intersection(const Interval& interval) +Interval& Interval::intersection(const Interval& interval) // ******************************************************* { - if (!Intersect(interval)) MakeEmpty(); + if (!intersect(interval)) makeEmpty(); else { _vMin = max(_vMin, interval._vMin); _vMax = min(_vMax, interval._vMax); @@ -201,7 +201,7 @@ Interval& Interval::Intersection(const Interval& interval) Interval& Interval::translate(const Unit& dv) // ****************************************** { - if (!IsEmpty()) { + if (!isEmpty()) { _vMin += dv; _vMax += dv; } diff --git a/hurricane/src/hurricane/Interval.h b/hurricane/src/hurricane/Interval.h index e3a56973..aabf008d 100644 --- a/hurricane/src/hurricane/Interval.h +++ b/hurricane/src/hurricane/Interval.h @@ -58,25 +58,25 @@ class Interval { // Predicates // ********** - public: bool IsEmpty() const; - public: bool IsPonctual() const; - public: bool Contains(const Unit& v) const; - public: bool Contains(const Interval& interval) const; - public: bool Intersect(const Interval& interval) const; - public: bool Inferior(const Interval& interval, bool strict=true) const; - public: bool Superior(const Interval& interval, bool strict=true) const; - public: bool IsConstrainedBy(const Interval& interval) const; + public: bool isEmpty() const; + public: bool isPonctual() const; + public: bool contains(const Unit& v) const; + public: bool contains(const Interval& interval) const; + public: bool intersect(const Interval& interval) const; + public: bool inferior(const Interval& interval, bool strict=true) const; + public: bool superior(const Interval& interval, bool strict=true) const; + public: bool isConstrainedBy(const Interval& interval) const; // Updators // ******** - public: Interval& MakeEmpty(); - public: Interval& Inflate(const Unit& dv); - public: Interval& Inflate(const Unit& dvMin, const Unit& dvMax); + public: Interval& makeEmpty(); + public: Interval& inflate(const Unit& dv); + public: Interval& inflate(const Unit& dvMin, const Unit& dvMax); public: Interval& merge(const Unit& v); public: Interval& merge(const Interval& interval); - public: Interval& Intersection(const Unit& vMin, const Unit& vMax); - public: Interval& Intersection(const Interval& interval); + public: Interval& intersection(const Unit& vMin, const Unit& vMax); + public: Interval& intersection(const Interval& interval); public: Interval& translate(const Unit& dv); // Others diff --git a/hurricane/src/hurricane/Region.cpp b/hurricane/src/hurricane/Region.cpp index c858e6a3..6b8e9b33 100644 --- a/hurricane/src/hurricane/Region.cpp +++ b/hurricane/src/hurricane/Region.cpp @@ -105,14 +105,14 @@ class Region_Tile { // Predicates // ********** - public: bool IsVoid() const {return _isVoid;}; + public: bool isVoid() const {return _isVoid;}; public: bool contains(const Point& point) const; // Updators // ******** - public: void SplitVertical(Region* region, const Unit& x); - public: void SplitHorizontal(Region* region, const Unit& y); + public: void splitVertical(Region* region, const Unit& x); + public: void splitHorizontal(Region* region, const Unit& y); public: bool mergeLeftTile(Region* region); public: bool mergeBottomTile(Region* region); public: bool mergeTopTile(Region* region); @@ -246,11 +246,11 @@ GenericFilter Region_Tile::getIsVoidFilter() return Region_Tile::IsVoidFilter(); } -void Region_Tile::SplitVertical(Region* region, const Unit& x) +void Region_Tile::splitVertical(Region* region, const Unit& x) // *********************************************************** { if ((getXMin() < x) && (x < getXMax())) { - Region_Tile* newTile = new Region_Tile(Box(x, getYMin(), getXMax(), getYMax()), IsVoid()); + Region_Tile* newTile = new Region_Tile(Box(x, getYMin(), getXMax(), getYMax()), isVoid()); newTile->_leftTile = this; newTile->_rightTile = _rightTile; @@ -287,11 +287,11 @@ void Region_Tile::SplitVertical(Region* region, const Unit& x) } } -void Region_Tile::SplitHorizontal(Region* region, const Unit& y) +void Region_Tile::splitHorizontal(Region* region, const Unit& y) // ************************************************************* { if ((getYMin() < y) && (y < getYMax())) { - Region_Tile* newTile = new Region_Tile(Box(getXMin(), y, getXMax(), getYMax()), IsVoid()); + Region_Tile* newTile = new Region_Tile(Box(getXMin(), y, getXMax(), getYMax()), isVoid()); newTile->_bottomTile = this; newTile->_topTile = _topTile; @@ -628,7 +628,7 @@ Region_Tile::_TopSplitAtVerticalSize (Region* region) Region_Tile* upTile = _topTile; Unit height = upTile->getYMax() - getYMax(); if (upTile && upTile->getXMax() != getXMax()) { - upTile->SplitVertical (region, getXMax()); + upTile->splitVertical (region, getXMax()); upTile = _topTile; } Unit ht; @@ -640,7 +640,7 @@ Region_Tile::_TopSplitAtVerticalSize (Region* region) ht = upTile->getYMax() - getYMax(); if (height > ht) height = ht; if (upTile && upTile->getXMin() != getXMin()) { - upTile->SplitVertical (region, getXMin()); + upTile->splitVertical (region, getXMin()); } return height; }; // Region_Tile::_TopSplitAtVerticalSize @@ -655,7 +655,7 @@ Region_Tile::_BottomSplitAtVerticalSize (Region* region) Region_Tile* downTile = _bottomTile; Unit height = getYMin() - downTile->getYMin(); if (downTile && downTile->getXMin() != getXMin()) { - downTile->SplitVertical (region, getXMin()); + downTile->splitVertical (region, getXMin()); downTile = _bottomTile; } Unit ht; @@ -667,7 +667,7 @@ Region_Tile::_BottomSplitAtVerticalSize (Region* region) ht = getYMin() - downTile->getYMin(); if (height > ht) height = ht; if (downTile && downTile->getXMax() != getXMax()) { - downTile->SplitVertical (region, getXMax()); + downTile->splitVertical (region, getXMax()); } return height; }; // Region_Tile::_BottomSplitAtVerticalSize @@ -683,7 +683,7 @@ Region_Tile::_LeftSplitAtHorizontalSize (Region* region) Region_Tile* leftTile = _leftTile; Unit width = getXMin() - leftTile->getXMin(); if (leftTile && leftTile->getYMin() != getYMin()) { - leftTile->SplitHorizontal (region, getYMin()); + leftTile->splitHorizontal (region, getYMin()); leftTile = _leftTile; } Unit wt; @@ -695,7 +695,7 @@ Region_Tile::_LeftSplitAtHorizontalSize (Region* region) wt = getXMin() - leftTile->getXMin(); if (width > wt) width = wt; if (leftTile && leftTile->getYMax() != getYMax()) { - leftTile->SplitHorizontal (region, getYMax()); + leftTile->splitHorizontal (region, getYMax()); } return width; }; // Region_Tile::_LeftSplitAtHorizontalSize @@ -711,7 +711,7 @@ Region_Tile::_RightSplitAtHorizontalSize (Region* region) Region_Tile* rightTile = _rightTile; Unit width = rightTile->getXMax() - getXMax(); if (rightTile && rightTile->getYMax() != getYMax()) { - rightTile->SplitHorizontal (region, getYMax()); + rightTile->splitHorizontal (region, getYMax()); rightTile = _rightTile; } Unit wt; @@ -723,7 +723,7 @@ Region_Tile::_RightSplitAtHorizontalSize (Region* region) wt = rightTile->getXMax() - getXMax(); if (width > wt) width = wt; if (rightTile && rightTile->getYMin() != getYMin()) { - rightTile->SplitHorizontal (region, getYMin()); + rightTile->splitHorizontal (region, getYMin()); } return width; }; // Region_Tile::_RightSplitAtHorizontalSize @@ -740,7 +740,7 @@ Region_Tile::_TopSplitAtHorizontalSize (Region* region, const Unit height) while (upTile && upTile->getXMin() >= getXMin()) { if (upTile->getYMax() - getYMax() > height) { - upTile->SplitHorizontal (region, getYMax() + height); + upTile->splitHorizontal (region, getYMax() + height); if (upTile->_bottomTile != this) upTile = upTile->_bottomTile; modif = true; } @@ -765,7 +765,7 @@ Region_Tile::_BottomSplitAtHorizontalSize (Region* region, const Unit height) while (downTile && downTile->getXMax() <= getXMax()) { if (getYMin() - downTile->getYMin() > height) { - downTile->SplitHorizontal (region, getYMin() - height); + downTile->splitHorizontal (region, getYMin() - height); modif = true; if (downTile->_topTile != this) downTile = downTile->_topTile; } @@ -789,7 +789,7 @@ Region_Tile::_LeftSplitAtVerticalSize (Region* region, const Unit width) while (leftTile && leftTile->getYMax() <= getYMax()) { if (getXMin() - leftTile->getXMin() > width) { - leftTile->SplitVertical (region, getXMin() - width); + leftTile->splitVertical (region, getXMin() - width); modif = true; if (leftTile->_rightTile != this) leftTile = leftTile->_rightTile; } @@ -814,7 +814,7 @@ Region_Tile::_RightSplitAtVerticalSize (Region* region, const Unit width) while (rightTile && rightTile->getYMin() >= getYMin()) { if (rightTile->getXMax() - getXMax() > width) { - rightTile->SplitVertical (region, getXMax() + width); + rightTile->splitVertical (region, getXMax() + width); modif = true; if (rightTile->_leftTile != this) rightTile = rightTile->_leftTile; } @@ -986,7 +986,7 @@ Filter* Region_Tile::IsVoidFilter::getClone() const bool Region_Tile::IsVoidFilter::accept(Region_Tile* tile) const // ************************************************************ { - return tile->IsVoid(); + return tile->isVoid(); } string Region_Tile::IsVoidFilter::_getString() const @@ -2013,12 +2013,12 @@ Region_Intervals::Locator::Locator(const Region::SwapLine* swapLine) Unit x = _swapLine->getPosition(); Unit yMax = _swapLine->getExtention().getVMax(); _lowerTile = _swapLine->_getBaseTile(); - while (_lowerTile && _lowerTile->IsVoid()) + while (_lowerTile && _lowerTile->isVoid()) _lowerTile = _lowerTile->getTopTile(x); if (_lowerTile && (yMax < _lowerTile->getYMin())) _lowerTile = NULL; if (_lowerTile) { Region::Tile* tile = _lowerTile; - while (tile && !tile->IsVoid()) { + while (tile && !tile->isVoid()) { _upperTile = tile; tile = tile->getTopTile(x); if (tile && (yMax < tile->getYMin())) tile = NULL; @@ -2030,12 +2030,12 @@ Region_Intervals::Locator::Locator(const Region::SwapLine* swapLine) Unit y = _swapLine->getPosition(); Unit xMax = _swapLine->getExtention().getVMax(); _lowerTile = _swapLine->_getBaseTile(); - while (_lowerTile && _lowerTile->IsVoid()) + while (_lowerTile && _lowerTile->isVoid()) _lowerTile = _lowerTile->getRightTile(y); if (_lowerTile && (xMax < _lowerTile->getXMin())) _lowerTile = NULL; if (_lowerTile) { Region::Tile* tile = _lowerTile; - while (tile && !tile->IsVoid()) { + while (tile && !tile->isVoid()) { _upperTile = tile; tile = tile->getRightTile(y); if (tile && (xMax < tile->getXMin())) tile = NULL; @@ -2106,13 +2106,13 @@ void Region_Intervals::Locator::progress() Unit x = _swapLine->getPosition(); Unit yMax = _swapLine->getExtention().getVMax(); _lowerTile = _upperTile->getTopTile(x); - while (_lowerTile && _lowerTile->IsVoid()) + while (_lowerTile && _lowerTile->isVoid()) _lowerTile = _lowerTile->getTopTile(x); if (_lowerTile && (yMax < _lowerTile->getYMin())) _lowerTile = NULL; _upperTile = NULL; if (_lowerTile) { Region::Tile* tile = _lowerTile; - while (tile && !tile->IsVoid()) { + while (tile && !tile->isVoid()) { _upperTile = tile; tile = tile->getTopTile(x); if (tile && (yMax < tile->getYMin())) tile = NULL; @@ -2124,13 +2124,13 @@ void Region_Intervals::Locator::progress() Unit y = _swapLine->getPosition(); Unit xMax = _swapLine->getExtention().getVMax(); _lowerTile = _upperTile->getRightTile(y); - while (_lowerTile && _lowerTile->IsVoid()) + while (_lowerTile && _lowerTile->isVoid()) _lowerTile = _lowerTile->getRightTile(y); if (_lowerTile && (xMax < _lowerTile->getXMin())) _lowerTile = NULL; _upperTile = NULL; if (_lowerTile) { Region::Tile* tile = _lowerTile; - while (tile && !tile->IsVoid()) { + while (tile && !tile->isVoid()) { _upperTile = tile; tile = tile->getRightTile(y); if (tile && (xMax < tile->getXMin())) tile = NULL; @@ -2221,17 +2221,17 @@ Region::SwapLine::SwapLine(Region* region, const Type& type, const Interval& ext if (!_region) throw Error("Can't create " + _TName("Region::SwapLine") + " : null region"); - if (!_region->IsEmpty()) { + if (!_region->isEmpty()) { switch (_type) { case Type::VERTICAL : { _position = _region->getXMin(); - if (_extention.IsEmpty()) _extention = Interval(_region->getYMin(), _region->getYMax()); + if (_extention.isEmpty()) _extention = Interval(_region->getYMin(), _region->getYMax()); _baseTile = _region->_getTileAt(Point(_position, _extention.getVMin())); break; } case Type::HORIZONTAL : { _position = _region->getYMin(); - if (_extention.IsEmpty()) _extention = Interval(_region->getXMin(), _region->getXMax()); + if (_extention.isEmpty()) _extention = Interval(_region->getXMin(), _region->getXMax()); _baseTile = _region->_getTileAt(Point(_extention.getVMin(), _position)); break; } @@ -2250,15 +2250,15 @@ Region::SwapLine::SwapLine(Region* region, const Type& type, const Unit& positio if (!_region) throw Error("Can't create " + _TName("Region::SwapLine") + " : null region"); - if (!_region->IsEmpty()) { + if (!_region->isEmpty()) { switch (_type) { case Type::VERTICAL : { - if (_extention.IsEmpty()) _extention = Interval(_region->getYMin(), _region->getYMax()); + if (_extention.isEmpty()) _extention = Interval(_region->getYMin(), _region->getYMax()); _baseTile = _region->_getTileAt(Point(_position, _extention.getVMin())); break; } case Type::HORIZONTAL : { - if (_extention.IsEmpty()) _extention = Interval(_region->getXMin(), _region->getXMax()); + if (_extention.isEmpty()) _extention = Interval(_region->getXMin(), _region->getXMax()); _baseTile = _region->_getTileAt(Point(_extention.getVMin(), _position)); break; } @@ -2371,10 +2371,10 @@ void Region::SwapLine::progress(int n) void Region::SwapLine::translate(const Unit& quantity) // *************************************************** { - if (quantity) SetPosition(getPosition() + quantity); + if (quantity) setPosition(getPosition() + quantity); } -void Region::SwapLine::SetPosition(const Unit& position) +void Region::SwapLine::setPosition(const Unit& position) // ***************************************************** { if (position != _position) { @@ -2456,13 +2456,13 @@ Region::Region(const Region& region) Region::~Region() // ************** { - Clear(); + clear(); } Region& Region::operator=(const Region& region) // ******************************************** { - Clear(); + clear(); // keep trace (as void tile) of the initial bounding box Box initialBoundingBox = region.getBoundingBox(); if (! initialBoundingBox.isEmpty()) { @@ -2557,32 +2557,32 @@ Region::SwapLine Region::getHorizontalSwapLine(const Unit& y, const Interval& ex return SwapLine((Region*)this, Region::SwapLine::Type::HORIZONTAL, y, extention); } -bool Region::IsEmpty() const +bool Region::isEmpty() const // ************************* { return Region_Tiles(this).getSubSet(!Tile::getIsVoidFilter()).IsEmpty(); } -bool Region::Contains(const Point& point) const +bool Region::contains(const Point& point) const // ******************************************** { return getBoundingBox().contains(point) && _getNonVoidTileAt(point); } -bool Region::Contains(const Box& box) const +bool Region::contains(const Box& box) const // **************************************** { - if (box.isPonctual()) return Contains(box.getCenter()); + if (box.isPonctual()) return contains(box.getCenter()); return getBoundingBox().contains(box) && Region_TilesUnder (this, Box(box).inflate(-1)) .getSubSet(Tile::getIsVoidFilter()).IsEmpty(); } -bool Region::Contains(const Region& region) const +bool Region::contains(const Region& region) const // ********************************************** { for_each_box(box, region.getBoxesUnder(getBoundingBox())) { - if (!Contains(box)) return false; + if (!contains(box)) return false; end_for; } return true; @@ -2595,7 +2595,7 @@ bool Region::Intersect(const Box& box) const if (box.isPonctual()) return contains(box.getCenter()); if (! getBoundingBox().Intersect(box)) return false; if (! Region_TilesUnder (this, Box(box).inflate(1)) - .getSubSet(! Tile::getIsVoidFilter()).IsEmpty()) return true; + .getSubSet(! Tile::getIsVoidFilter()).isEmpty()) return true; return false; } @@ -2610,7 +2610,7 @@ bool Region::Intersect(const Region& region) const } #endif -Region& Region::Clear() +Region& Region::clear() // ******************** { stack tileStack; @@ -2660,11 +2660,11 @@ Region& Region::fill(const Box& box) } if (!getBoundingBox().contains(box)) - _Update(box, false); + _update(box, false); else { Tile* startTile = _getStartTile(_getTileAt(Point(box.getXMax(), box.getYMin()))); GenericCollection tiles = _getTilesUnder(Box(box).inflate(0, 0, -1, -1), startTile); - if (!tiles.getSubSet(Tile::getIsVoidFilter()).IsEmpty()) _Update(box, false, startTile); + if (!tiles.getSubSet(Tile::getIsVoidFilter()).IsEmpty()) _update(box, false, startTile); } return *this; @@ -2686,7 +2686,7 @@ Region& Region::getUnion (const Region& region) return fill(region); } -Region& Region::Groove(const Box& box) +Region& Region::groove(const Box& box) // *********************************** { if (!_bottomRightTile) return *this; @@ -2697,17 +2697,17 @@ Region& Region::Groove(const Box& box) Tile* startTile = _getStartTile(_getTileAt(Point(correctedBox.getXMax(), correctedBox.getYMin()))); GenericCollection tiles = _getTilesUnder(Box(correctedBox).inflate(0, 0, -1, -1), startTile); - if (!tiles.getSubSet(!Tile::getIsVoidFilter()).IsEmpty()) _Update(box, true, startTile); + if (!tiles.getSubSet(!Tile::getIsVoidFilter()).IsEmpty()) _update(box, true, startTile); return *this; } -Region& Region::Groove(const Region& region) +Region& Region::groove(const Region& region) // ***************************************** { Box boundingBox = getBoundingBox(); for_each_box(box, region.getBoxesUnder(boundingBox)) { - Groove(box); + groove(box); end_for; } return *this; @@ -2720,7 +2720,7 @@ Region& Region::getIntersection (const Region& region) for_each_box (box, region.getVoidBoxesUnder (boundingBox)) { //for_each_box (box, region.getVoidBoxes ()) { //if (! boundingBox.Intersect (box)) continue; - Groove (box); + groove (box); end_for; } return *this; @@ -2729,7 +2729,7 @@ Region& Region::getIntersection (const Region& region) Region& Region::Inflate(const Unit& quantity) // ****************************************** { - if (!IsEmpty()) { + if (!isEmpty()) { if (0 < quantity) { list boxList; for_each_object(Tile*, tile, Region_Tiles(this).getSubSet(!Tile::getIsVoidFilter())) { @@ -2742,14 +2742,14 @@ Region& Region::Inflate(const Unit& quantity) } } else if (quantity < 0) { - _GrowthToFit(getBoundingBox().inflate(getUnit(1))); + _growthToFit(getBoundingBox().inflate(getUnit(1))); list boxList; for_each_object(Tile*, tile, Region_Tiles(this).getSubSet(Tile::getIsVoidFilter())) { boxList.push_back(tile->getBoundingBox()); end_for; } for_each_box(box, getCollection(boxList)) { - Groove(box.inflate(-quantity)); + groove(box.inflate(-quantity)); end_for; } } @@ -2839,7 +2839,7 @@ GenericCollection Region::_getTilesUnder(const Box& area, Tile* st return Region_TilesUnder(this, area, startTile); } -void Region::_Split(const Box& box) +void Region::_split(const Box& box) // ******************************** { if (getBoundingBox().intersect(box)) { @@ -2850,7 +2850,7 @@ void Region::_Split(const Box& box) Box line = Box(box.getXMin(), box.getYMin(), box.getXMax() - 1, box.getYMin()); _getTilesUnder(line, startTile).fill(tileList); for_each_object(Tile*, tile, getCollection(tileList)) { - tile->SplitHorizontal(this, box.getYMin()); + tile->splitHorizontal(this, box.getYMin()); end_for; } @@ -2858,7 +2858,7 @@ void Region::_Split(const Box& box) line = Box(box.getXMin(), box.getYMax(), box.getXMax() - 1, box.getYMax()); _getTilesUnder(line, startTile).fill(tileList); for_each_object(Tile*, tile, getCollection(tileList)) { - tile->SplitHorizontal(this, box.getYMax()); + tile->splitHorizontal(this, box.getYMax()); end_for; } @@ -2866,7 +2866,7 @@ void Region::_Split(const Box& box) line = Box(box.getXMin(), box.getYMin(), box.getXMin(), box.getYMax() - 1); _getTilesUnder(line, startTile).fill(tileList); for_each_object(Tile*, tile, getCollection(tileList)) { - tile->SplitVertical(this, box.getXMin()); + tile->splitVertical(this, box.getXMin()); end_for; } @@ -2874,13 +2874,13 @@ void Region::_Split(const Box& box) line = Box(box.getXMax(), box.getYMin(), box.getXMax(), box.getYMax() - 1); _getTilesUnder(line, startTile).fill(tileList); for_each_object(Tile*, tile, getCollection(tileList)) { - tile->SplitVertical(this, box.getXMax()); + tile->splitVertical(this, box.getXMax()); end_for; } } } -void Region::_GrowthToFit(const Box& box) +void Region::_growthToFit(const Box& box) // ************************************** { if (box.isEmpty()) return; @@ -2938,14 +2938,14 @@ void Region::_GrowthToFit(const Box& box) } } -void Region::_Update(const Box& box, bool isVoid, Tile* startTile) +void Region::_update(const Box& box, bool isVoid, Tile* startTile) // ************************************************************** { if (box.isEmpty() || !_bottomRightTile || !box.getWidth() || !box.getHeight()) return; - if (!getBoundingBox().contains(box)) _GrowthToFit(box); + if (!getBoundingBox().contains(box)) _growthToFit(box); - _Split(box); + _split(box); Tile* newTile = new Tile(box, isVoid); @@ -2999,10 +2999,10 @@ void Region::_Update(const Box& box, bool isVoid, Tile* startTile) newTile->CleanNeighbours(this); newTile->mergeNeighbours(this); -}; // Region::_Update +}; // Region::_update bool -Region::VerticalEnhancement() +Region::verticalEnhancement() // ************************** { bool modif = false; @@ -3028,15 +3028,15 @@ Region::VerticalEnhancement() modif = tile->VerticalEnhancement (this); } result.fill (tile->getBoundingBox()); - Groove (tile->getBoundingBox()); - } while (! IsEmpty()); + groove (tile->getBoundingBox()); + } while (! isEmpty()); fill (result); return modif; }; // Region::VerticalEnhancement bool -Region::VerticalEnhancement(Point point) +Region::verticalEnhancement(Point point) // *************************************** // Amelioration de la tuile contenant point { @@ -3048,7 +3048,7 @@ Region::VerticalEnhancement(Point point) bool -Region::HorizontalEnhancement() +Region::horizontalEnhancement() // **************************** { bool modif = false; @@ -3074,14 +3074,14 @@ Region::HorizontalEnhancement() modif = tile->HorizontalEnhancement (this); } result.fill (tile->getBoundingBox()); - Groove (tile->getBoundingBox()); - } while (! IsEmpty()); + groove (tile->getBoundingBox()); + } while (! isEmpty()); fill (result); return modif; -}; // Region::HorizontalEnhancement +}; bool -Region::HorizontalEnhancement(Point point) +Region::horizontalEnhancement(Point point) // *************************************** // Amelioration de la tuile contenant point { @@ -3093,7 +3093,7 @@ Region::HorizontalEnhancement(Point point) Interval -Region::TopBottomFacing (const Box box) const +Region::topBottomFacing (const Box box) const // ********************************************** // Retourne le merge des intervales en vis a vis entre les boites // dessus et dessous de box @@ -3107,7 +3107,7 @@ Region::TopBottomFacing (const Box box) const }; // Region::TopBottomFacing Interval -Region::LeftRightFacing (const Box box) const +Region::leftRightFacing (const Box box) const // ********************************************** // Retourne le merge des intervales en vis a vis entre les boites // a gauche et droite de box diff --git a/hurricane/src/hurricane/Region.h b/hurricane/src/hurricane/Region.h index 63657b57..613c48d5 100644 --- a/hurricane/src/hurricane/Region.h +++ b/hurricane/src/hurricane/Region.h @@ -100,7 +100,7 @@ class Region { public: void progress(int n = 1); public: void translate(const Unit& quantity); - public: void SetPosition(const Unit& position); + public: void setPosition(const Unit& position); // Others // ****** @@ -160,11 +160,11 @@ class Region { // Predicates // ********** - public: bool IsEmpty() const; + public: bool isEmpty() const; - public: bool Contains(const Point& point) const; - public: bool Contains(const Box& box) const; - public: bool Contains(const Region& region) const; + public: bool contains(const Point& point) const; + public: bool contains(const Box& box) const; + public: bool contains(const Region& region) const; #if 0 // pas encore teste public: bool Intersect(const Box& box) const; public: bool Intersect(const Region& region) const; @@ -173,25 +173,25 @@ class Region { // Updators // ******** - public: Region& Clear(); + public: Region& clear(); public: Region& fill(const Box& box); public: Region& fill(const Region& region); public: Region& getUnion(const Region& region); - public: Region& Groove(const Box& box); - public: Region& Groove(const Region& region); + public: Region& groove(const Box& box); + public: Region& groove(const Region& region); public: Region& getIntersection(const Region& region); public: Region& Inflate(const Unit& quantity); public: Region& translate(const Unit& dx, const Unit& dy); - public: bool VerticalEnhancement(); - public: bool VerticalEnhancement(Point point); - public: bool HorizontalEnhancement(); - public: bool HorizontalEnhancement(Point point); - public: Interval TopBottomFacing (const Box box) const; - public: Interval LeftRightFacing (const Box box) const; + public: bool verticalEnhancement(); + public: bool verticalEnhancement(Point point); + public: bool horizontalEnhancement(); + public: bool horizontalEnhancement(Point point); + public: Interval topBottomFacing (const Box box) const; + public: Interval leftRightFacing (const Box box) const; // Others // ****** @@ -210,9 +210,9 @@ class Region { public: void _setBottomRightTile(Tile* bottomRightTile) {_bottomRightTile = bottomRightTile;}; public: void _setTopLeftTile(Tile* topLeftTile) {_topLeftTile = topLeftTile;}; - public: void _Split(const Box& box); - public: void _GrowthToFit(const Box& box); - public: void _Update(const Box& box, bool isVoid, Tile* startTile = NULL); + public: void _split(const Box& box); + public: void _growthToFit(const Box& box); + public: void _update(const Box& box, bool isVoid, Tile* startTile = NULL); }; diff --git a/hurricane/src/hurricane/Segment.cpp b/hurricane/src/hurricane/Segment.cpp index dcc8acd5..e3db546d 100644 --- a/hurricane/src/hurricane/Segment.cpp +++ b/hurricane/src/hurricane/Segment.cpp @@ -241,7 +241,7 @@ Point Segment::getTargetPosition() const return Point(getTargetX(), getTargetY()); } -void Segment::SetLayer(Layer* layer) +void Segment::setLayer(Layer* layer) // ********************************* { if (!layer) @@ -253,7 +253,7 @@ void Segment::SetLayer(Layer* layer) } } -void Segment::SetWidth(const Unit& width) +void Segment::setWidth(const Unit& width) // ************************************** { if (width != _width) { @@ -262,7 +262,7 @@ void Segment::SetWidth(const Unit& width) } } -void Segment::Invert() +void Segment::invert() // ******************* { Component* source = getSource(); diff --git a/hurricane/src/hurricane/Segment.h b/hurricane/src/hurricane/Segment.h index 1e68097c..d4e56531 100644 --- a/hurricane/src/hurricane/Segment.h +++ b/hurricane/src/hurricane/Segment.h @@ -100,9 +100,9 @@ class Segment : public Component { // Updators // ******** - public: void SetLayer(Layer* layer); - public: void SetWidth(const Unit& width); - public: void Invert(); + public: void setLayer(Layer* layer); + public: void setWidth(const Unit& width); + public: void invert(); // Others // ****** diff --git a/hurricane/src/hurricane/Vertical.cpp b/hurricane/src/hurricane/Vertical.cpp index 52176018..9183c74a 100644 --- a/hurricane/src/hurricane/Vertical.cpp +++ b/hurricane/src/hurricane/Vertical.cpp @@ -113,7 +113,7 @@ void Vertical::translate(const Unit& dx, const Unit& dy) } } -void Vertical::SetX(const Unit& x) +void Vertical::setX(const Unit& x) // ******************************* { if (x != _x) { @@ -122,7 +122,7 @@ void Vertical::SetX(const Unit& x) } } -void Vertical::SetDySource(const Unit& dySource) +void Vertical::setDySource(const Unit& dySource) // ********************************************* { if (dySource != _dySource) { @@ -131,7 +131,7 @@ void Vertical::SetDySource(const Unit& dySource) } } -void Vertical::SetDyTarget(const Unit& dyTarget) +void Vertical::setDyTarget(const Unit& dyTarget) // ********************************************* { if (dyTarget != _dyTarget) { diff --git a/hurricane/src/hurricane/Vertical.h b/hurricane/src/hurricane/Vertical.h index 4aee0752..ed80c694 100644 --- a/hurricane/src/hurricane/Vertical.h +++ b/hurricane/src/hurricane/Vertical.h @@ -61,9 +61,9 @@ class Vertical : public Segment { public: virtual void translate(const Unit& dx, const Unit& dy); - public: void SetX(const Unit& x); - public: void SetDySource(const Unit& dySource); - public: void SetDyTarget(const Unit& dyTarget); + public: void setX(const Unit& x); + public: void setDySource(const Unit& dySource); + public: void setDyTarget(const Unit& dyTarget); public: void translate(const Unit& dx); // Others