cleaning in namespaces

This commit is contained in:
Christophe Alexandre 2008-03-28 09:48:47 +00:00
parent ecba4fe7e0
commit 68760f612d
63 changed files with 123 additions and 174 deletions

View File

@ -2,7 +2,7 @@
#define __CELL_EDITOR_H #define __CELL_EDITOR_H
#include "Cell.h" #include "Cell.h"
using namespace H; using namespace Hurricane;
#include <QMainWindow> #include <QMainWindow>

View File

@ -4,7 +4,7 @@
#include <QStyleOptionGraphicsItem> #include <QStyleOptionGraphicsItem>
#include "Slice.h" #include "Slice.h"
using namespace H; using namespace Hurricane;
#include "Utils.h" #include "Utils.h"
#include "InstanceGraphicsItem.h" #include "InstanceGraphicsItem.h"

View File

@ -4,7 +4,7 @@
#include <QGraphicsScene> #include <QGraphicsScene>
#include "Cell.h" #include "Cell.h"
using namespace H; using namespace Hurricane;
class CellScene : public QGraphicsScene { class CellScene : public QGraphicsScene {
Q_OBJECT Q_OBJECT

View File

@ -6,7 +6,7 @@
#include "Slice.h" #include "Slice.h"
#include "Segment.h" #include "Segment.h"
#include "BasicLayer.h" #include "BasicLayer.h"
using namespace H; using namespace Hurricane;
#include "Utils.h" #include "Utils.h"
#include "InstanceGraphicsItem.h" #include "InstanceGraphicsItem.h"

View File

@ -6,7 +6,7 @@
#include "CompositeLayer.h" #include "CompositeLayer.h"
#include "BasicLayer.h" #include "BasicLayer.h"
using namespace H; using namespace Hurricane;
#include "Utils.h" #include "Utils.h"
#include "CellGraphicsItem.h" #include "CellGraphicsItem.h"

View File

@ -5,7 +5,7 @@
#include <QTransform> #include <QTransform>
#include "Box.h" #include "Box.h"
#include "Transformation.h" #include "Transformation.h"
using namespace H; using namespace Hurricane;
inline void boxToRectangle(const Box& box, QRectF& rec) { inline void boxToRectangle(const Box& box, QRectF& rec) {
double xmin = getValue(box.getXMin()); double xmin = getValue(box.getXMin());

View File

@ -350,19 +350,19 @@ Record* BasicLayer::Type::_getRecord() const
} // End of Hurricane namespace. } // End of Hurricane namespace.
bool Scan(const string& s, H::BasicLayer::Type& type) bool Scan(const string& s, Hurricane::BasicLayer::Type& type)
// ************************************************** // **************************************************
{ {
if (s == "UNDEFINED") { if (s == "UNDEFINED") {
type = H::BasicLayer::Type::UNDEFINED; type = Hurricane::BasicLayer::Type::UNDEFINED;
return true; return true;
} }
if (s == "CONDUCTING") { if (s == "CONDUCTING") {
type = H::BasicLayer::Type::CONDUCTING; type = Hurricane::BasicLayer::Type::CONDUCTING;
return true; return true;
} }
if (s == "CONTACT") { if (s == "CONTACT") {
type = H::BasicLayer::Type::CONTACT; type = Hurricane::BasicLayer::Type::CONTACT;
return true; return true;
} }
return false; return false;

View File

@ -140,7 +140,7 @@ template<>
SetNestedSlotAdapter(Hurricane::BasicLayer) SetNestedSlotAdapter(Hurricane::BasicLayer)
bool Scan(const string& s, H::BasicLayer::Type& type); bool Scan(const string& s, Hurricane::BasicLayer::Type& type);
#endif // HURRICANE_BASIC_LAYER #endif // HURRICANE_BASIC_LAYER

View File

@ -49,13 +49,6 @@
// | Macros Definition | // | Macros Definition |
// x-----------------------------------------------------------------x // x-----------------------------------------------------------------x
#define Hurricane H
#define BEGIN_NAMESPACE_HURRICANE namespace Hurricane {
#define END_NAMESPACE_HURRICANE }
#define USING_NAMESPACE_HURRICANE using namespace std; using namespace Hurricane;
#define is_a (bool)dynamic_cast #define is_a (bool)dynamic_cast

View File

@ -246,19 +246,19 @@ Record* CompositeLayer::Type::_getRecord() const
// Generic functions // Generic functions
// **************************************************************************************************** // ****************************************************************************************************
bool Scan(const string& s, H::CompositeLayer::Type& type) bool Scan(const string& s, Hurricane::CompositeLayer::Type& type)
// *************************************************** // ***************************************************
{ {
if (s == "UNDEFINED") { if (s == "UNDEFINED") {
type = H::CompositeLayer::Type::UNDEFINED; type = Hurricane::CompositeLayer::Type::UNDEFINED;
return true; return true;
} }
if (s == "METAL") { if (s == "METAL") {
type = H::CompositeLayer::Type::METAL; type = Hurricane::CompositeLayer::Type::METAL;
return true; return true;
} }
if (s == "VIA") { if (s == "VIA") {
type = H::CompositeLayer::Type::VIA; type = Hurricane::CompositeLayer::Type::VIA;
return true; return true;
} }
return false; return false;

View File

@ -120,7 +120,7 @@ SetNestedSlotAdapter(Hurricane::CompositeLayer)
// **************************************************************************************************** // ****************************************************************************************************
bool Scan(const string& s, H::CompositeLayer::Type& type); bool Scan(const string& s, Hurricane::CompositeLayer::Type& type);
#endif // HURRICANE_COMPOSITE_LAYER #endif // HURRICANE_COMPOSITE_LAYER

View File

@ -178,7 +178,7 @@ Record* Name::_getRecord() const
// Generic functions // Generic functions
// **************************************************************************************************** // ****************************************************************************************************
bool Scan ( const string& s, H::Name& name ) bool Scan ( const string& s, Hurricane::Name& name )
// ***************************************** // *****************************************
{ {
name = s; name = s;

View File

@ -79,7 +79,7 @@ class Name {
ValueIOStreamSupport(Hurricane::Name) ValueIOStreamSupport(Hurricane::Name)
bool Scan ( const string& s, H::Name& name ); bool Scan ( const string& s, Hurricane::Name& name );
#endif // HURRICANE_NAME #endif // HURRICANE_NAME

View File

@ -170,12 +170,12 @@ string getValueString(const Unit& unit)
bool Scan(const string& s, H::Unit& unit) bool Scan(const string& s, Hurricane::Unit& unit)
// *********************************** // ***********************************
{ {
double d; double d;
if (Scan(s, d)) { if (Scan(s, d)) {
unit = H::getUnit(d); unit = Hurricane::getUnit(d);
return true; return true;
} }
return false; return false;

View File

@ -97,7 +97,7 @@ string getValueString(const Unit& unit);
bool Scan(const string& s, H::Unit& unit); bool Scan(const string& s, Hurricane::Unit& unit);
#endif // HURRICANE_UNIT #endif // HURRICANE_UNIT

View File

@ -157,7 +157,7 @@ template<class Element> class VectorCollection : public Collection<Element> {
public: Record* _getRecord() const public: Record* _getRecord() const
// ************************* // *************************
{ {
H::Record* record = NULL; Hurricane::Record* record = NULL;
if (!_elementVector->empty()) { if (!_elementVector->empty()) {
record = new Record(_getString()); record = new Record(_getString());
unsigned n = 1; unsigned n = 1;

View File

@ -60,8 +60,8 @@
#include "Error.h" #include "Error.h"
#include "Warning.h" #include "Warning.h"
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
namespace Isobar { namespace Isobar {

View File

@ -58,8 +58,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -65,7 +65,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -64,8 +64,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -58,7 +58,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -63,7 +63,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -57,7 +57,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -62,7 +62,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -58,8 +58,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -86,7 +86,7 @@ extern "C" {
extern PyMethodDef PyDataBase_Methods[]; extern PyMethodDef PyDataBase_Methods[];
extern PyObject* PyDataBase_getDataBase ( PyObject* module ); extern PyObject* PyDataBase_getDataBase ( PyObject* module );
extern PyObject* PyDataBase_Link ( H::DataBase* db ); extern PyObject* PyDataBase_Link ( Hurricane::DataBase* db );
extern void PyDataBase_LinkPyType (); extern void PyDataBase_LinkPyType ();
extern void PyDataBase_Constructor (); extern void PyDataBase_Constructor ();

View File

@ -66,7 +66,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -60,7 +60,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -121,7 +121,7 @@ namespace {
} // End of local namespace. } // End of local namespace.
USING_NAMESPACE_HURRICANE using namespace Hurricane;

View File

@ -57,13 +57,12 @@
#include "PyOccurrence.h" #include "PyOccurrence.h"
#include "PyOccurrenceLocator.h" #include "PyOccurrenceLocator.h"
USING_NAMESPACE_HURRICANE using namespace Hurricane;
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -62,9 +62,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -65,7 +65,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -58,8 +58,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -59,8 +59,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -57,7 +57,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -61,8 +61,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -61,7 +61,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -54,8 +54,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -62,15 +62,13 @@
#include "PyPinLocator.h" #include "PyPinLocator.h"
#include "NetExternalComponents.h" #include "NetExternalComponents.h"
USING_NAMESPACE_HURRICANE using namespace Hurricane;
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -56,8 +56,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -60,8 +60,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -57,8 +57,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -59,8 +59,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -58,8 +58,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -58,7 +58,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -58,9 +58,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -59,9 +59,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -58,9 +58,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -57,9 +57,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -61,9 +61,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -47,18 +47,13 @@
// | | // | |
// x-----------------------------------------------------------------x // x-----------------------------------------------------------------x
#include "PyReferenceLocator.h" #include "PyReferenceLocator.h"
#include "PyReference.h" #include "PyReference.h"
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -62,9 +62,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -58,9 +58,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -60,8 +60,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -58,7 +58,7 @@
namespace Isobar { namespace Isobar {
USING_NAMESPACE_HURRICANE using namespace Hurricane;
extern "C" { extern "C" {

View File

@ -59,9 +59,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -57,8 +57,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -54,9 +54,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -59,9 +59,7 @@
namespace Isobar { namespace Isobar {
using namespace Hurricane;
USING_NAMESPACE_HURRICANE
extern "C" { extern "C" {

View File

@ -2,7 +2,7 @@
#define __CELL_VIEWER_H #define __CELL_VIEWER_H
#include "Cell.h" #include "Cell.h"
using namespace H; using namespace Hurricane;
#include <QMainWindow> #include <QMainWindow>

View File

@ -18,7 +18,7 @@
#include "Slot.h" #include "Slot.h"
#include "Technology.h" #include "Technology.h"
#include "Transformation.h" #include "Transformation.h"
using namespace H; using namespace Hurricane;
#include <QPaintEvent> #include <QPaintEvent>
#include <QPainter> #include <QPainter>
@ -1775,7 +1775,7 @@ CellWidget::postRedraw(const Box& area)
} }
void CellWidget::drawContent(const Cell* cell, const BasicLayer* basicLayer, const H::Box& updateArea, const Transformation& transformation) const { void CellWidget::drawContent(const Cell* cell, const BasicLayer* basicLayer, const Hurricane::Box& updateArea, const Transformation& transformation) const {
for_each_instance(instance, cell->getInstancesUnder(updateArea)) { for_each_instance(instance, cell->getInstancesUnder(updateArea)) {
drawContent(instance, basicLayer, updateArea, transformation); drawContent(instance, basicLayer, updateArea, transformation);
end_for; end_for;
@ -1788,7 +1788,7 @@ void CellWidget::drawContent(const Cell* cell, const BasicLayer* basicLayer, con
} }
void CellWidget::drawContent(const Instance* instance, const BasicLayer* basicLayer, const H::Box& updateArea, const Transformation& transformation) const { void CellWidget::drawContent(const Instance* instance, const BasicLayer* basicLayer, const Hurricane::Box& updateArea, const Transformation& transformation) const {
Box masterArea = updateArea; Box masterArea = updateArea;
Transformation masterTransformation = instance->getTransformation(); Transformation masterTransformation = instance->getTransformation();
instance->getTransformation().getInvert().applyOn(masterArea); instance->getTransformation().getInvert().applyOn(masterArea);
@ -1797,7 +1797,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 { void CellWidget::drawSlice(const Slice* slice, const BasicLayer* basicLayer, const Hurricane::Box& updateArea, const Transformation& transformation) const {
if (slice->getLayer()->contains(basicLayer)) { if (slice->getLayer()->contains(basicLayer)) {
if (slice->getBoundingBox().intersect(updateArea)) { if (slice->getBoundingBox().intersect(updateArea)) {
//if ((basicLayer == _layer->_getSymbolicBasicLayer()) || (3 < view->getScale())) //if ((basicLayer == _layer->_getSymbolicBasicLayer()) || (3 < view->getScale()))
@ -1835,22 +1835,22 @@ void CellWidget::drawContact(const Contact* contact, const BasicLayer* basicLaye
drawRectangle(transformation.getBox(contact->getBoundingBox(basicLayer))); drawRectangle(transformation.getBox(contact->getBoundingBox(basicLayer)));
} }
void CellWidget::drawPhantoms(const Cell* cell, const H::Box& updateArea, const Transformation& transformation) const { void CellWidget::drawPhantoms(const Cell* cell, const Hurricane::Box& updateArea, const Transformation& transformation) const {
for_each_instance(instance, cell->getInstancesUnder(updateArea)) { for_each_instance(instance, cell->getInstancesUnder(updateArea)) {
drawPhantoms(instance, updateArea, transformation); drawPhantoms(instance, updateArea, transformation);
end_for; end_for;
} }
} }
void CellWidget::drawPhantoms(const Instance* instance, const H::Box& updateArea, const Transformation& transformation) const { void CellWidget::drawPhantoms(const Instance* instance, const Hurricane::Box& updateArea, const Transformation& transformation) const {
H::Box masterArea = updateArea; Hurricane::Box masterArea = updateArea;
Transformation masterTransformation = instance->getTransformation(); Transformation masterTransformation = instance->getTransformation();
instance->getTransformation().getInvert().applyOn(masterArea); instance->getTransformation().getInvert().applyOn(masterArea);
transformation.applyOn(masterTransformation); transformation.applyOn(masterTransformation);
drawPhantoms(instance->getMasterCell(), masterArea, masterTransformation); drawPhantoms(instance->getMasterCell(), masterArea, masterTransformation);
} }
void CellWidget::drawBoundaries(const Cell* cell, const H::Box& updateArea, const Transformation& transformation) const { void CellWidget::drawBoundaries(const Cell* cell, const Hurricane::Box& updateArea, const Transformation& transformation) const {
drawRectangle(transformation.getBox(cell->getAbutmentBox())); drawRectangle(transformation.getBox(cell->getAbutmentBox()));
for_each_instance(instance, cell->getInstances()) { for_each_instance(instance, cell->getInstances()) {
drawBoundaries(instance, updateArea, transformation); drawBoundaries(instance, updateArea, transformation);
@ -1858,8 +1858,8 @@ void CellWidget::drawBoundaries(const Cell* cell, const H::Box& updateArea, cons
} }
} }
void CellWidget::drawBoundaries(const Instance* instance, const H::Box& updateArea, const Transformation& transformation) const { void CellWidget::drawBoundaries(const Instance* instance, const Hurricane::Box& updateArea, const Transformation& transformation) const {
H::Box masterArea = updateArea; Hurricane::Box masterArea = updateArea;
Transformation masterTransformation = instance->getTransformation(); Transformation masterTransformation = instance->getTransformation();
instance->getTransformation().getInvert().applyOn(masterArea); instance->getTransformation().getInvert().applyOn(masterArea);
transformation.applyOn(masterTransformation); transformation.applyOn(masterTransformation);

View File

@ -18,7 +18,7 @@
#include "BasicLayer.h" #include "BasicLayer.h"
#include "Occurrences.h" #include "Occurrences.h"
#include "Points.h" #include "Points.h"
using namespace H; using namespace Hurricane;
//#include "Selectors.h" //#include "Selectors.h"
//OPEN_MY_NAMESPACE //OPEN_MY_NAMESPACE
@ -170,9 +170,9 @@ class /* Q_EXPORT */ CellWidget : public QWidget {
void abortStartedCommand(); void abortStartedCommand();
void drawContent(const Cell* cell, const BasicLayer* basicLayer, const H::Box& updateArea, const Transformation& transformation) const; void drawContent(const Cell* cell, const BasicLayer* basicLayer, const Hurricane::Box& updateArea, const Transformation& transformation) const;
void drawContent(const Instance* instance, const BasicLayer* basicLayer, const H::Box& updateArea, const Transformation& transformation) const; void drawContent(const Instance* instance, const BasicLayer* basicLayer, const Hurricane::Box& updateArea, const Transformation& transformation) const;
void drawSlice(const Slice* slice, const BasicLayer* basicLayer, const H::Box& updateArea, const Transformation& transformation) const; void drawSlice(const Slice* slice, const BasicLayer* basicLayer, const Hurricane::Box& updateArea, const Transformation& transformation) const;
void drawPhantoms(const Cell* cell, const Box& updateArea, const Transformation& transformation) const; void drawPhantoms(const Cell* cell, const Box& updateArea, const Transformation& transformation) const;
void drawPhantoms(const Instance* instance, const Box& updateArea, const Transformation& transformation) const; void drawPhantoms(const Instance* instance, const Box& updateArea, const Transformation& transformation) const;
void drawBoundaries(const Cell* cell, const Box& updateArea, const Transformation& transformation) const; void drawBoundaries(const Cell* cell, const Box& updateArea, const Transformation& transformation) const;

View File

@ -1,7 +1,7 @@
#include "DataBase.h" #include "DataBase.h"
#include "Technology.h" #include "Technology.h"
#include "BasicLayer.h" #include "BasicLayer.h"
using namespace H; using namespace Hurricane;
#include <QCheckBox> #include <QCheckBox>
#include <QLabel> #include <QLabel>