small cleaning

This commit is contained in:
Christophe Alexandre 2008-03-20 18:07:05 +00:00
parent 9a6415ae4d
commit c00fb4b2ef
6 changed files with 26 additions and 26 deletions

View File

@ -114,7 +114,7 @@ template<class Type> class Collection : public NestedSlotAdapter {
// Utilitarians // Utilitarians
// ************ // ************
public: void Fill(list<Type>& list) const public: void fill(list<Type>& list) const
// ************************************** // **************************************
{ {
GenericLocator<Type> locator = getLocator(); GenericLocator<Type> locator = getLocator();
@ -124,7 +124,7 @@ template<class Type> class Collection : public NestedSlotAdapter {
} }
} }
public: void Fill(set<Type>& set) const public: void fill(set<Type>& set) const
// ************************************ // ************************************
{ {
GenericLocator<Type> locator = getLocator(); GenericLocator<Type> locator = getLocator();
@ -134,7 +134,7 @@ template<class Type> class Collection : public NestedSlotAdapter {
} }
} }
public: template<class Compare> void Fill(set<Type, Compare>& set) const public: template<class Compare> void fill(set<Type, Compare>& set) const
// ********************************************************************* // *********************************************************************
{ {
GenericLocator<Type> locator = getLocator(); GenericLocator<Type> locator = getLocator();
@ -144,7 +144,7 @@ template<class Type> class Collection : public NestedSlotAdapter {
} }
} }
public: void Fill(vector<Type>& vector) const public: void fill(vector<Type>& vector) const
// ****************************************** // ******************************************
{ {
GenericLocator<Type> locator = getLocator(); GenericLocator<Type> locator = getLocator();

View File

@ -382,7 +382,7 @@ void Component::_preDestroy()
clearProperties(); clearProperties();
set<Component*> componentSet; set<Component*> componentSet;
getSlaveComponents().Fill(componentSet); getSlaveComponents().fill(componentSet);
set<Hook*> masterHookSet; set<Hook*> masterHookSet;
componentSet.insert(this); componentSet.insert(this);

View File

@ -98,7 +98,7 @@ void DisplaySlot::Flush()
{ {
OpenUpdateSession(); OpenUpdateSession();
vector<Go*> govect; vector<Go*> govect;
_quadTree.getGos().Fill(govect); _quadTree.getGos().fill(govect);
for (unsigned i = 0 ; i < govect.size() ; i++) { for (unsigned i = 0 ; i < govect.size() ; i++) {
govect[i]->destroy(); govect[i]->destroy();
} }

View File

@ -79,7 +79,7 @@ Path::Path(const Path& headPath, const Path& tailPath)
: _sharedPath(tailPath._getSharedPath()) : _sharedPath(tailPath._getSharedPath())
{ {
vector<Instance*> instances; vector<Instance*> instances;
headPath.getInstances().Fill(instances); headPath.getInstances().fill(instances);
for (vector<Instance*>::reverse_iterator rit=instances.rbegin() ; rit != instances.rend() ; rit++) for (vector<Instance*>::reverse_iterator rit=instances.rbegin() ; rit != instances.rend() ; rit++)
{ Instance* instance=*rit; { Instance* instance=*rit;

View File

@ -2447,7 +2447,7 @@ Region::Region(const Region& region)
_bottomRightTile = new Tile(region.getBoundingBox(), true); _bottomRightTile = new Tile(region.getBoundingBox(), true);
_topLeftTile = _bottomRightTile; _topLeftTile = _bottomRightTile;
for_each_box(box, region.getBoxes()) { for_each_box(box, region.getBoxes()) {
Fill(box); fill(box);
end_for; end_for;
} }
} }
@ -2469,7 +2469,7 @@ Region& Region::operator=(const Region& region)
_bottomRightTile = new Tile (initialBoundingBox, true); _bottomRightTile = new Tile (initialBoundingBox, true);
_topLeftTile = _bottomRightTile; _topLeftTile = _bottomRightTile;
for_each_box(box, region.getBoxes()) { for_each_box(box, region.getBoxes()) {
Fill(box); fill(box);
end_for; end_for;
} }
} }
@ -2648,7 +2648,7 @@ Region& Region::Clear()
return *this; return *this;
} }
Region& Region::Fill(const Box& box) Region& Region::fill(const Box& box)
// ********************************* // *********************************
{ {
if (box.isEmpty() || !box.getWidth() || !box.getHeight()) return *this; if (box.isEmpty() || !box.getWidth() || !box.getHeight()) return *this;
@ -2670,11 +2670,11 @@ Region& Region::Fill(const Box& box)
return *this; return *this;
} }
Region& Region::Fill(const Region& region) Region& Region::fill(const Region& region)
// *************************************** // ***************************************
{ {
for_each_box(box, region.getBoxes()) { for_each_box(box, region.getBoxes()) {
Fill(box); fill(box);
end_for; end_for;
} }
return *this; return *this;
@ -2683,7 +2683,7 @@ Region& Region::Fill(const Region& region)
Region& Region::getUnion (const Region& region) Region& Region::getUnion (const Region& region)
// ******************************************** // ********************************************
{ {
return Fill(region); return fill(region);
} }
Region& Region::Groove(const Box& box) Region& Region::Groove(const Box& box)
@ -2737,7 +2737,7 @@ Region& Region::Inflate(const Unit& quantity)
end_for; end_for;
} }
for_each_box(box, getCollection(boxList)) { for_each_box(box, getCollection(boxList)) {
Fill(box.inflate(quantity)); fill(box.inflate(quantity));
end_for; end_for;
} }
} }
@ -2763,7 +2763,7 @@ Region& Region::Translate(const Unit& dx, const Unit& dy)
{ {
if ((dx != 0) || (dy != 0)) { if ((dx != 0) || (dy != 0)) {
set<Tile*> tileSet; set<Tile*> tileSet;
_getTiles().Fill(tileSet); _getTiles().fill(tileSet);
for_each_object(Tile*, tile, getCollection(tileSet)) { for_each_object(Tile*, tile, getCollection(tileSet)) {
tile->_boundingBox.translate(dx, dy); tile->_boundingBox.translate(dx, dy);
end_for; end_for;
@ -2848,7 +2848,7 @@ void Region::_Split(const Box& box)
list<Tile*> tileList; list<Tile*> tileList;
Box line = Box(box.getXMin(), box.getYMin(), box.getXMax() - 1, box.getYMin()); Box line = Box(box.getXMin(), box.getYMin(), box.getXMax() - 1, box.getYMin());
_getTilesUnder(line, startTile).Fill(tileList); _getTilesUnder(line, startTile).fill(tileList);
for_each_object(Tile*, tile, getCollection(tileList)) { for_each_object(Tile*, tile, getCollection(tileList)) {
tile->SplitHorizontal(this, box.getYMin()); tile->SplitHorizontal(this, box.getYMin());
end_for; end_for;
@ -2856,7 +2856,7 @@ void Region::_Split(const Box& box)
tileList.clear(); tileList.clear();
line = Box(box.getXMin(), box.getYMax(), box.getXMax() - 1, box.getYMax()); line = Box(box.getXMin(), box.getYMax(), box.getXMax() - 1, box.getYMax());
_getTilesUnder(line, startTile).Fill(tileList); _getTilesUnder(line, startTile).fill(tileList);
for_each_object(Tile*, tile, getCollection(tileList)) { for_each_object(Tile*, tile, getCollection(tileList)) {
tile->SplitHorizontal(this, box.getYMax()); tile->SplitHorizontal(this, box.getYMax());
end_for; end_for;
@ -2864,7 +2864,7 @@ void Region::_Split(const Box& box)
tileList.clear(); tileList.clear();
line = Box(box.getXMin(), box.getYMin(), box.getXMin(), box.getYMax() - 1); line = Box(box.getXMin(), box.getYMin(), box.getXMin(), box.getYMax() - 1);
_getTilesUnder(line, startTile).Fill(tileList); _getTilesUnder(line, startTile).fill(tileList);
for_each_object(Tile*, tile, getCollection(tileList)) { for_each_object(Tile*, tile, getCollection(tileList)) {
tile->SplitVertical(this, box.getXMin()); tile->SplitVertical(this, box.getXMin());
end_for; end_for;
@ -2872,7 +2872,7 @@ void Region::_Split(const Box& box)
tileList.clear(); tileList.clear();
line = Box(box.getXMax(), box.getYMin(), box.getXMax(), box.getYMax() - 1); line = Box(box.getXMax(), box.getYMin(), box.getXMax(), box.getYMax() - 1);
_getTilesUnder(line, startTile).Fill(tileList); _getTilesUnder(line, startTile).fill(tileList);
for_each_object(Tile*, tile, getCollection(tileList)) { for_each_object(Tile*, tile, getCollection(tileList)) {
tile->SplitVertical(this, box.getXMax()); tile->SplitVertical(this, box.getXMax());
end_for; end_for;
@ -2950,7 +2950,7 @@ void Region::_Update(const Box& box, bool isVoid, Tile* startTile)
Tile* newTile = new Tile(box, isVoid); Tile* newTile = new Tile(box, isVoid);
list<Tile*> tileList; list<Tile*> tileList;
_getTilesUnder(Box(box).inflate(0, 0, -1, -1), startTile).Fill(tileList); _getTilesUnder(Box(box).inflate(0, 0, -1, -1), startTile).fill(tileList);
for_each_object(Tile*, tile, getCollection(tileList)) { for_each_object(Tile*, tile, getCollection(tileList)) {
if (_topLeftTile == tile) _topLeftTile = newTile; if (_topLeftTile == tile) _topLeftTile = newTile;
if (_bottomRightTile == tile) _bottomRightTile = newTile; if (_bottomRightTile == tile) _bottomRightTile = newTile;
@ -3027,10 +3027,10 @@ Region::VerticalEnhancement()
if (maxBox.getWidth() >= getUnit(2)) { if (maxBox.getWidth() >= getUnit(2)) {
modif = tile->VerticalEnhancement (this); modif = tile->VerticalEnhancement (this);
} }
result.Fill (tile->getBoundingBox()); result.fill (tile->getBoundingBox());
Groove (tile->getBoundingBox()); Groove (tile->getBoundingBox());
} while (! IsEmpty()); } while (! IsEmpty());
Fill (result); fill (result);
return modif; return modif;
}; // Region::VerticalEnhancement }; // Region::VerticalEnhancement
@ -3073,10 +3073,10 @@ Region::HorizontalEnhancement()
if (maxBox.getWidth() >= getUnit(2)) { if (maxBox.getWidth() >= getUnit(2)) {
modif = tile->HorizontalEnhancement (this); modif = tile->HorizontalEnhancement (this);
} }
result.Fill (tile->getBoundingBox()); result.fill (tile->getBoundingBox());
Groove (tile->getBoundingBox()); Groove (tile->getBoundingBox());
} while (! IsEmpty()); } while (! IsEmpty());
Fill (result); fill (result);
return modif; return modif;
}; // Region::HorizontalEnhancement }; // Region::HorizontalEnhancement

View File

@ -175,8 +175,8 @@ class Region {
public: Region& Clear(); public: Region& Clear();
public: Region& Fill(const Box& box); public: Region& fill(const Box& box);
public: Region& Fill(const Region& region); public: Region& fill(const Region& region);
public: Region& getUnion(const Region& region); public: Region& getUnion(const Region& region);
public: Region& Groove(const Box& box); public: Region& Groove(const Box& box);