still some cleaning

This commit is contained in:
Christophe Alexandre 2008-04-02 12:11:31 +00:00
parent 8b253627e5
commit c59d99e99f
24 changed files with 198 additions and 379 deletions

View File

@ -134,7 +134,7 @@ void Cell::flattenNets(bool buildRings)
for_each_occurrence ( occurrence, getHyperNetRootNetOccurrences() ) { for_each_occurrence ( occurrence, getHyperNetRootNetOccurrences() ) {
HyperNet hyperNet ( occurrence ); HyperNet hyperNet ( occurrence );
if ( !occurrence.getPath().IsEmpty() ) { if ( !occurrence.getPath().isEmpty() ) {
DeepNet* deepNet = DeepNet::create ( hyperNet ); DeepNet* deepNet = DeepNet::create ( hyperNet );
if (deepNet) deepNet->_createRoutingPads ( buildRings ); if (deepNet) deepNet->_createRoutingPads ( buildRings );
} else { } else {
@ -163,7 +163,7 @@ void Cell::flattenNets(bool buildRings)
currentRP->getBodyHook()->Attach ( previousRP->getBodyHook() ); currentRP->getBodyHook()->Attach ( previousRP->getBodyHook() );
} }
Plug* plug = static_cast<Plug*>( plugOccurrence.getEntity() ); Plug* plug = static_cast<Plug*>( plugOccurrence.getEntity() );
if ( plugOccurrence.getPath().IsEmpty() ) { if ( plugOccurrence.getPath().isEmpty() ) {
plug->getBodyHook()->Attach ( currentRP->getBodyHook() ); plug->getBodyHook()->Attach ( currentRP->getBodyHook() );
plug->getBodyHook()->Detach (); plug->getBodyHook()->Detach ();
} }

View File

@ -3767,7 +3767,7 @@ string Cell_HyperNetRootNetOccurrences::_getString() const
string s = "<" + _TName("Cell::HyperNetRootNetOccurrences"); string s = "<" + _TName("Cell::HyperNetRootNetOccurrences");
if (_cell) { if (_cell) {
s += " " + getString(_cell); s += " " + getString(_cell);
if (!_path.IsEmpty()) s += " " + getString(_path); if (!_path.isEmpty()) s += " " + getString(_path);
} }
s += ">"; s += ">";
return s; return s;
@ -3884,170 +3884,12 @@ string Cell_HyperNetRootNetOccurrences::Locator::_getString() const
// *************************************************** // ***************************************************
{ {
string s = "<" + _TName("Cell::HyperNetRootNetOccurrences::Locator"); string s = "<" + _TName("Cell::HyperNetRootNetOccurrences::Locator");
if (!_path.IsEmpty()) if (!_path.isEmpty())
s += " " + _path.getName(); s += " " + _path.getName();
s += ">"; s += ">";
return s; return s;
} }
// ****************************************************************************************************
// Cell_ImpactedMainViews implementation
// ****************************************************************************************************
//Cell_ImpactedMainViews::Cell_ImpactedMainViews(const Cell* cell)
//// *************************************************************
//: Inherit(),
// _cell(cell)
//{
//}
//
//Cell_ImpactedMainViews::Cell_ImpactedMainViews(const Cell_ImpactedMainViews& impactedMainViews)
//// ********************************************************************************************
//: Inherit(),
// _cell(impactedMainViews._cell)
//{
//}
//
//Cell_ImpactedMainViews& Cell_ImpactedMainViews::operator=(const Cell_ImpactedMainViews& impactedMainViews)
//// ****************************************************************************************************
//{
// _cell = impactedMainViews._cell;
// return *this;
//}
//
//Collection<MainView*>* Cell_ImpactedMainViews::getClone() const
//// ************************************************************
//{
// return new Cell_ImpactedMainViews(*this);
//}
//
//Locator<MainView*>* Cell_ImpactedMainViews::getLocator() const
//// ***********************************************************
//{
// return new Locator(_cell);
//}
//
//string Cell_ImpactedMainViews::_getString() const
//// **********************************************
//{
// string s = "<" + _TName("Cell::ImpactedMainViews");
// if (_cell) s += " " + getString(_cell);
// s += ">";
// return s;
//}
//
//
//
//// ****************************************************************************************************
//// Cell_ImpactedMainViews::Locator implementation
//// ****************************************************************************************************
//
//Cell_ImpactedMainViews::Locator::Locator(const Cell* cell)
//// *******************************************************
//: Inherit(),
// _cell(cell),
// _cellSet(),
// _cellStack(),
// _mainViewLocator(),
// _mainView(NULL)
//{
// if (_cell) {
// _cellSet.insert((Cell*)_cell);
// _cellStack.push((Cell*)_cell);
// while (!_mainView && !_cellStack.empty()) {
// Cell* cell = _cellStack.top();
// _cellStack.pop();
// for_each_instance(instance, cell->getSlaveInstances()) {
// Cell* cell = instance->getCell();
// if (_cellSet.find(cell) == _cellSet.end()) {
// _cellSet.insert(cell);
// _cellStack.push(cell);
// }
// end_for;
// }
// _mainViewLocator = cell->getMainViews().getLocator();
// _mainView = _mainViewLocator.getElement();
// }
// }
//}
//
//Cell_ImpactedMainViews::Locator::Locator(const Locator& locator)
//// *************************************************************
//: Inherit(),
// _cell(locator._cell),
// _cellSet(locator._cellSet),
// _cellStack(locator._cellStack),
// _mainViewLocator(locator._mainViewLocator),
// _mainView(locator._mainView)
//{
//}
//
//Cell_ImpactedMainViews::Locator& Cell_ImpactedMainViews::Locator::operator=(const Locator& locator)
//// ************************************************************************************************
//{
// _cell = locator._cell;
// _cellSet = locator._cellSet;
// _cellStack = locator._cellStack;
// _mainViewLocator = locator._mainViewLocator;
// _mainView = locator._mainView;
// return *this;
//}
//
//MainView* Cell_ImpactedMainViews::Locator::getElement() const
//// **********************************************************
//{
// return _mainView;
//}
//
//Locator<MainView*>* Cell_ImpactedMainViews::Locator::getClone() const
//// ******************************************************************
//{
// return new Locator(*this);
//}
//
//bool Cell_ImpactedMainViews::Locator::isValid() const
//// **************************************************
//{
// return (_mainView != NULL);
//}
//
//void Cell_ImpactedMainViews::Locator::progress()
//// *********************************************
//{
// if (_mainView) {
// _mainView = NULL;
// do {
// _mainViewLocator.progress();
// _mainView = _mainViewLocator.getElement();
// if (!_mainView && !_cellStack.empty()) {
// Cell* cell = _cellStack.top();
// _cellStack.pop();
// for_each_instance(instance, cell->getSlaveInstances()) {
// Cell* cell = instance->getCell();
// if (_cellSet.find(cell) == _cellSet.end()) {
// _cellSet.insert(cell);
// _cellStack.push(cell);
// }
// end_for;
// }
// _mainViewLocator = cell->getMainViews().getLocator();
// _mainView = _mainViewLocator.getElement();
// }
// } while (!_mainView && !_cellStack.empty());
// }
//}
//
//string Cell_ImpactedMainViews::Locator::_getString() const
//// *******************************************************
//{
// string s = "<" + _TName("Cell::ImpactedMainViews::Locator");
// if (_cell) s += " " + getString(_cell);
// s += ">";
// return s;
//}
//
//
// **************************************************************************************************** // ****************************************************************************************************
// Cell_SubCells implementation // Cell_SubCells implementation
// **************************************************************************************************** // ****************************************************************************************************

View File

@ -425,7 +425,7 @@ void Component::_preDestroy()
if (!masterHook) if (!masterHook)
masterHook = hook; masterHook = hook;
else else
hook->Merge(masterHook); hook->merge(masterHook);
end_for; end_for;
} }
/**/ /**/

View File

@ -133,7 +133,7 @@ DeepNet* DeepNet::create ( HyperNet& hyperNet )
Occurrence rootNetOccurrence = getHyperNetRootNetOccurrence ( hyperNet.getNetOccurrence() ); Occurrence rootNetOccurrence = getHyperNetRootNetOccurrence ( hyperNet.getNetOccurrence() );
if ( rootNetOccurrence.getMasterCell()->isFlattenLeaf() ) return NULL; if ( rootNetOccurrence.getMasterCell()->isFlattenLeaf() ) return NULL;
if ( rootNetOccurrence.getPath().IsEmpty() ) return NULL; if ( rootNetOccurrence.getPath().isEmpty() ) return NULL;
DeepNet* deepNet = new DeepNet ( rootNetOccurrence ); DeepNet* deepNet = new DeepNet ( rootNetOccurrence );
deepNet->_postCreate (); deepNet->_postCreate ();

View File

@ -331,7 +331,7 @@ void Hook::_setNextHook(Hook* hook)
_nextHook = hook; _nextHook = hook;
} }
Hook* Hook::Merge(Hook* hook) Hook* Hook::merge(Hook* hook)
// ************************** // **************************
{ {
if (!IsMaster()) if (!IsMaster())

View File

@ -76,7 +76,7 @@ class Hook : public NestedSlotAdapter {
public: Hook* Detach(); public: Hook* Detach();
public: Hook* Attach(Hook* hook); public: Hook* Attach(Hook* hook);
public: Hook* Merge(Hook* hook); public: Hook* merge(Hook* hook);
public: void _setNextHook(Hook* hook); public: void _setNextHook(Hook* hook);
// Others // Others

View File

@ -318,12 +318,12 @@ Occurrence getHyperNetRootNetOccurrence(const Occurrence& netoccurrence)
if (!net) if (!net)
throw Error("getHyperNetRootNetOccurrence : not a net occurrence"); throw Error("getHyperNetRootNetOccurrence : not a net occurrence");
if (!net->IsExternal()) if (!net->isExternal())
return netoccurrence; return netoccurrence;
Path path = netoccurrence.getPath(); Path path = netoccurrence.getPath();
if (path.IsEmpty()) if (path.isEmpty())
return netoccurrence; return netoccurrence;
Instance* instance = path.getTailInstance(); Instance* instance = path.getTailInstance();
@ -332,7 +332,7 @@ Occurrence getHyperNetRootNetOccurrence(const Occurrence& netoccurrence)
if (!plug) if (!plug)
throw Error("getHyperNetRootNetOccurrence : no plug for external net !"); throw Error("getHyperNetRootNetOccurrence : no plug for external net !");
if(!plug->IsConnected()) if(!plug->isConnected())
return netoccurrence; return netoccurrence;
return getHyperNetRootNetOccurrence(Occurrence(plug->getNet(), path.getHeadPath())); return getHyperNetRootNetOccurrence(Occurrence(plug->getNet(), path.getHeadPath()));
@ -344,10 +344,10 @@ bool IsHyperNetRootNetOccurrence(Occurrence netoccurrence)
{ {
Net* net=dynamic_cast<Net*>(netoccurrence.getEntity()); Net* net=dynamic_cast<Net*>(netoccurrence.getEntity());
if (!net) return false; if (!net) return false;
if (!net->IsExternal()) return true; if (!net->isExternal()) return true;
if (netoccurrence.getPath().IsEmpty()) return true; if (netoccurrence.getPath().isEmpty()) return true;
if (net->IsGlobal()) return false; if (net->isGlobal()) return false;
if (!netoccurrence.getPath().getTailInstance()->getPlug(net)->IsConnected()) if (!netoccurrence.getPath().getTailInstance()->getPlug(net)->isConnected())
return true; return true;
return false; return false;
} }
@ -565,7 +565,7 @@ void HyperNet_NetOccurrences::Locator::progress()
end_for; end_for;
} }
if (net->IsExternal()) { if (net->isExternal()) {
Instance* instance = path.getTailInstance(); Instance* instance = path.getTailInstance();
if (instance) { if (instance) {
Plug* plug = instance->getPlug(net); Plug* plug = instance->getPlug(net);
@ -803,7 +803,7 @@ void HyperNet_NetOccurrencesUnder::Locator::progress()
end_for; end_for;
} }
if (net->IsExternal()) { if (net->isExternal()) {
Instance* instance = path.getTailInstance(); Instance* instance = path.getTailInstance();
if (instance) { if (instance) {
Plug* plug = instance->getPlug(net); Plug* plug = instance->getPlug(net);
@ -976,7 +976,7 @@ void HyperNet_LeafPlugOccurrences::Locator::progress()
_netOccurrenceLocator.progress(); _netOccurrenceLocator.progress();
Net* net = (Net*)netOccurrence.getEntity(); Net* net = (Net*)netOccurrence.getEntity();
Path path = netOccurrence.getPath(); Path path = netOccurrence.getPath();
if (!path.IsEmpty() && net->getCell()->isLeaf()) if (!path.isEmpty() && net->getCell()->isLeaf())
{ {
Instance *instance = path.getTailInstance(); Instance *instance = path.getTailInstance();
Plug *plug=instance->getPlug(net); Plug *plug=instance->getPlug(net);

View File

@ -384,7 +384,7 @@ void Instance::setMasterCell(Cell* masterCell, bool secureFlag)
list<Net*> masterNetList; list<Net*> masterNetList;
for_each_plug(plug, getConnectedPlugs()) { for_each_plug(plug, getConnectedPlugs()) {
Net* masterNet = masterCell->getNet(plug->getMasterNet()->getName()); Net* masterNet = masterCell->getNet(plug->getMasterNet()->getName());
if (!masterNet || !masterNet->IsExternal()) if (!masterNet || !masterNet->isExternal())
throw Error("Can't set master (bad master net matching)"); throw Error("Can't set master (bad master net matching)");
connectedPlugList.push_back(plug); connectedPlugList.push_back(plug);
masterNetList.push_back(masterNet); masterNetList.push_back(masterNet);

View File

@ -156,7 +156,7 @@ Interval& Interval::Inflate(const Unit& dvMin, const Unit& dvMax)
return *this; return *this;
} }
Interval& Interval::Merge(const Unit& v) Interval& Interval::merge(const Unit& v)
// ************************************* // *************************************
{ {
if (IsEmpty()) { if (IsEmpty()) {
@ -170,7 +170,7 @@ Interval& Interval::Merge(const Unit& v)
return *this; return *this;
} }
Interval& Interval::Merge(const Interval& interval) Interval& Interval::merge(const Interval& interval)
// ************************************************ // ************************************************
{ {
if (!interval.IsEmpty()) { if (!interval.IsEmpty()) {

View File

@ -73,8 +73,8 @@ class Interval {
public: Interval& MakeEmpty(); public: Interval& MakeEmpty();
public: Interval& Inflate(const Unit& dv); public: Interval& Inflate(const Unit& dv);
public: Interval& Inflate(const Unit& dvMin, const Unit& dvMax); public: Interval& Inflate(const Unit& dvMin, const Unit& dvMax);
public: Interval& Merge(const Unit& v); public: Interval& merge(const Unit& v);
public: Interval& Merge(const Interval& interval); public: Interval& merge(const Interval& interval);
public: Interval& Intersection(const Unit& vMin, const Unit& vMax); public: Interval& Intersection(const Unit& vMin, const Unit& vMax);
public: Interval& Intersection(const Interval& interval); public: Interval& Intersection(const Interval& interval);
public: Interval& translate(const Unit& dv); public: Interval& translate(const Unit& dv);

View File

@ -37,7 +37,7 @@ class Net_IsCellNetFilter : public Filter<Net*> {
public: virtual Filter<Net*>* getClone() const {return new Net_IsCellNetFilter(*this);}; public: virtual Filter<Net*>* getClone() const {return new Net_IsCellNetFilter(*this);};
public: virtual bool accept(Net* net) const {return !net->IsDeepNet();}; public: virtual bool accept(Net* net) const {return !net->isDeepNet();};
public: virtual string _getString() const {return "<" + _TName("Net::IsCellNetFilter>");}; public: virtual string _getString() const {return "<" + _TName("Net::IsCellNetFilter>");};
@ -54,7 +54,7 @@ class Net_IsDeepNetFilter : public Filter<Net*> {
public: virtual Filter<Net*>* getClone() const {return new Net_IsDeepNetFilter(*this);}; public: virtual Filter<Net*>* getClone() const {return new Net_IsDeepNetFilter(*this);};
public: virtual bool accept(Net* net) const {return net->IsDeepNet();}; public: virtual bool accept(Net* net) const {return net->isDeepNet();};
public: virtual string _getString() const {return "<" + _TName("Net::IsDeepNetFilter>");}; public: virtual string _getString() const {return "<" + _TName("Net::IsDeepNetFilter>");};
@ -71,7 +71,7 @@ class Net_IsGlobalFilter : public Filter<Net*> {
public: virtual Filter<Net*>* getClone() const {return new Net_IsGlobalFilter(*this);}; public: virtual Filter<Net*>* getClone() const {return new Net_IsGlobalFilter(*this);};
public: virtual bool accept(Net* net) const {return net->IsGlobal();}; public: virtual bool accept(Net* net) const {return net->isGlobal();};
public: virtual string _getString() const {return "<" + _TName("Net::IsGlobalFilter>");}; public: virtual string _getString() const {return "<" + _TName("Net::IsGlobalFilter>");};
@ -88,7 +88,7 @@ class Net_IsExternalFilter : public Filter<Net*> {
public: virtual Filter<Net*>* getClone() const {return new Net_IsExternalFilter(*this);}; public: virtual Filter<Net*>* getClone() const {return new Net_IsExternalFilter(*this);};
public: virtual bool accept(Net* net) const {return net->IsExternal();}; public: virtual bool accept(Net* net) const {return net->isExternal();};
public: virtual string _getString() const {return "<" + _TName("Net::IsExternalFilter>");}; public: virtual string _getString() const {return "<" + _TName("Net::IsExternalFilter>");};
@ -105,7 +105,7 @@ class Net_IsClockFilter : public Filter<Net*> {
public: virtual Filter<Net*>* getClone() const {return new Net_IsClockFilter(*this);}; public: virtual Filter<Net*>* getClone() const {return new Net_IsClockFilter(*this);};
public: virtual bool accept(Net* net) const {return net->IsClock();}; public: virtual bool accept(Net* net) const {return net->isClock();};
public: virtual string _getString() const {return "<" + _TName("Net::IsClockFilter>");}; public: virtual string _getString() const {return "<" + _TName("Net::IsClockFilter>");};
@ -122,7 +122,7 @@ class Net_IsSupplyFilter : public Filter<Net*> {
public: virtual Filter<Net*>* getClone() const {return new Net_IsSupplyFilter(*this);}; public: virtual Filter<Net*>* getClone() const {return new Net_IsSupplyFilter(*this);};
public: virtual bool accept(Net* net) const {return net->IsSupply();}; public: virtual bool accept(Net* net) const {return net->isSupply();};
public: virtual string _getString() const {return "<" + _TName("Net::IsSupplyFilter>");}; public: virtual string _getString() const {return "<" + _TName("Net::IsSupplyFilter>");};
@ -139,7 +139,7 @@ class Net_IsPowerFilter : public Filter<Net*> {
public: virtual Filter<Net*>* getClone() const {return new Net_IsPowerFilter(*this);}; public: virtual Filter<Net*>* getClone() const {return new Net_IsPowerFilter(*this);};
public: virtual bool accept(Net* net) const {return net->IsPower();}; public: virtual bool accept(Net* net) const {return net->isPower();};
public: virtual string _getString() const {return "<" + _TName("Net::IsPowerFilter>");}; public: virtual string _getString() const {return "<" + _TName("Net::IsPowerFilter>");};
@ -156,7 +156,7 @@ class Net_IsGroundFilter : public Filter<Net*> {
public: virtual Filter<Net*>* getClone() const {return new Net_IsGroundFilter(*this);}; public: virtual Filter<Net*>* getClone() const {return new Net_IsGroundFilter(*this);};
public: virtual bool accept(Net* net) const {return net->IsGround();}; public: virtual bool accept(Net* net) const {return net->isGround();};
public: virtual string _getString() const {return "<" + _TName("Net::IsGroundFilter>");}; public: virtual string _getString() const {return "<" + _TName("Net::IsGroundFilter>");};
@ -410,7 +410,7 @@ NetFilter Net::getIsGroundFilter()
return Net_IsGroundFilter(); return Net_IsGroundFilter();
} }
void Net::SetName(const Name& name) void Net::setName(const Name& name)
// ******************************** // ********************************
{ {
if (name != _name) { if (name != _name) {
@ -426,19 +426,19 @@ void Net::SetName(const Name& name)
} }
} }
void Net::SetArity(const Arity& arity) void Net::setArity(const Arity& arity)
// *********************************** // ***********************************
{ {
_arity = arity; _arity = arity;
} }
void Net::SetGlobal(bool isGlobal) void Net::setGlobal(bool isGlobal)
// ******************************* // *******************************
{ {
_isGlobal = isGlobal; _isGlobal = isGlobal;
} }
void Net::SetExternal(bool isExternal) void Net::setExternal(bool isExternal)
// *********************************** // ***********************************
{ {
if (isExternal != _isExternal) { if (isExternal != _isExternal) {
@ -450,7 +450,7 @@ void Net::SetExternal(bool isExternal)
_isExternal = isExternal; _isExternal = isExternal;
if (_isExternal) { if (_isExternal) {
OpenUpdateSession(); OpenUpdateSession();
SetPosition(Point(0, 0)); setPosition(Point(0, 0));
for_each_instance(instance, _cell->getSlaveInstances()) { for_each_instance(instance, _cell->getSlaveInstances()) {
Plug::_create(instance, this); Plug::_create(instance, this);
end_for; end_for;
@ -460,13 +460,13 @@ void Net::SetExternal(bool isExternal)
} }
} }
void Net::SetType(const Type& type) void Net::setType(const Type& type)
// ******************************** // ********************************
{ {
_type = type; _type = type;
} }
void Net::SetPosition(const Point& position) void Net::setPosition(const Point& position)
// ***************************************** // *****************************************
{ {
if (_position != position) { if (_position != position) {
@ -478,7 +478,7 @@ void Net::SetPosition(const Point& position)
} }
} }
void Net::SetDirection(const Direction& direction) void Net::setDirection(const Direction& direction)
// *********************************************** // ***********************************************
{ {
_direction = direction; _direction = direction;
@ -510,7 +510,7 @@ void Net::unmaterialize()
} }
} }
static void MergeNets(Net* net1, Net* net2) static void mergeNets(Net* net1, Net* net2)
// **************************************** // ****************************************
{ {
assert(net1); assert(net1);
@ -518,24 +518,24 @@ static void MergeNets(Net* net1, Net* net2)
if (net2->getName()[0] != '~') { if (net2->getName()[0] != '~') {
if ((net1->getName()[0] == '~') || if ((net1->getName()[0] == '~') ||
(net2->IsGlobal() && !net1->IsGlobal()) || (net2->isGlobal() && !net1->isGlobal()) ||
(net2->IsExternal() && !net1->IsExternal())) { (net2->isExternal() && !net1->isExternal())) {
Net* tmpNet = net1; Net* tmpNet = net1;
net1 = net2; net1 = net2;
net2 = tmpNet; net2 = tmpNet;
} }
} }
if (net2->IsExternal() && !net1->IsExternal()) { if (net2->isExternal() && !net1->isExternal()) {
Net* tmpNet = net1; Net* tmpNet = net1;
net1 = net2; net1 = net2;
net2 = tmpNet; net2 = tmpNet;
} }
net1->Merge(net2); net1->merge(net2);
} }
void Net::Merge(Net* net) void Net::merge(Net* net)
// ********************** // **********************
{ {
if (!net) if (!net)
@ -547,27 +547,27 @@ void Net::Merge(Net* net)
if (net->getCell() != _cell) if (net->getCell() != _cell)
throw Error("Can't merge net : incompatible net"); throw Error("Can't merge net : incompatible net");
if (!IsExternal() && net->IsExternal() && !net->getConnectedSlavePlugs().IsEmpty()) if (!isExternal() && net->isExternal() && !net->getConnectedSlavePlugs().IsEmpty())
throw Error("Can't merge net : incompatible net"); throw Error("Can't merge net : incompatible net");
for_each_rubber(rubber, net->getRubbers()) rubber->_setNet(this); end_for; for_each_rubber(rubber, net->getRubbers()) rubber->_setNet(this); end_for;
for_each_component(component, net->getComponents()) component->_setNet(this); end_for; for_each_component(component, net->getComponents()) component->_setNet(this); end_for;
if (IsExternal() && net->IsExternal()) { if (isExternal() && net->isExternal()) {
for_each_plug(plug, net->getConnectedSlavePlugs()) { for_each_plug(plug, net->getConnectedSlavePlugs()) {
Plug* mainPlug = plug->getInstance()->getPlug(this); Plug* mainPlug = plug->getInstance()->getPlug(this);
if (mainPlug->IsConnected() && (mainPlug->getNet() != plug->getNet())) if (mainPlug->isConnected() && (mainPlug->getNet() != plug->getNet()))
MergeNets(mainPlug->getNet(), plug->getNet()); mergeNets(mainPlug->getNet(), plug->getNet());
end_for; end_for;
} }
for_each_plug(plug, net->getConnectedSlavePlugs()) { for_each_plug(plug, net->getConnectedSlavePlugs()) {
Plug* mainPlug = plug->getInstance()->getPlug(this); Plug* mainPlug = plug->getInstance()->getPlug(this);
if (!mainPlug->IsConnected()) mainPlug->SetNet(plug->getNet()); if (!mainPlug->isConnected()) mainPlug->setNet(plug->getNet());
Hook* masterHook = plug->getBodyHook(); Hook* masterHook = plug->getBodyHook();
Hook* nextMasterHook = masterHook->getNextMasterHook(); Hook* nextMasterHook = masterHook->getNextMasterHook();
if (nextMasterHook != masterHook) { if (nextMasterHook != masterHook) {
masterHook->Detach(); masterHook->Detach();
mainPlug->getBodyHook()->Merge(nextMasterHook); mainPlug->getBodyHook()->merge(nextMasterHook);
} }
Hooks slaveHooks = masterHook->getSlaveHooks(); Hooks slaveHooks = masterHook->getSlaveHooks();
while (!slaveHooks.IsEmpty()) { while (!slaveHooks.IsEmpty()) {
@ -624,7 +624,7 @@ void Net::_preDestroy()
if (!is_a<Plug*>(component)) if (!is_a<Plug*>(component))
component->destroy(); component->destroy();
else else
((Plug*)component)->SetNet(NULL); ((Plug*)component)->setNet(NULL);
end_for; end_for;
} }

View File

@ -175,28 +175,28 @@ class Net : public Entity {
// Predicates // Predicates
// ********** // **********
public: virtual bool IsDeepNet () const {return false;}; public: virtual bool isDeepNet () const {return false;};
public: bool IsGlobal () const {return _isGlobal;}; public: bool isGlobal () const {return _isGlobal;};
public: bool IsExternal() const {return _isExternal;}; public: bool isExternal() const {return _isExternal;};
public: bool IsLogical () const {return (_type == Type::LOGICAL);}; public: bool isLogical () const {return (_type == Type::LOGICAL);};
public: bool IsClock () const {return (_type == Type::CLOCK);}; public: bool isClock () const {return (_type == Type::CLOCK);};
public: bool IsPower () const {return (_type == Type::POWER);}; public: bool isPower () const {return (_type == Type::POWER);};
public: bool IsGround () const {return (_type == Type::GROUND);}; public: bool isGround () const {return (_type == Type::GROUND);};
public: bool IsSupply () const {return (IsPower() || IsGround());}; public: bool isSupply () const {return (isPower() || isGround());};
// Updators // Updators
// ******** // ********
public: void SetName(const Name& name); public: void setName(const Name& name);
public: void SetArity(const Arity& arity); public: void setArity(const Arity& arity);
public: void SetGlobal(bool isGlobal); public: void setGlobal(bool isGlobal);
public: void SetExternal(bool isExternal); public: void setExternal(bool isExternal);
public: void SetType(const Type& type); public: void setType(const Type& type);
public: void SetDirection(const Direction& direction); public: void setDirection(const Direction& direction);
public: void SetPosition(const Point& position); public: void setPosition(const Point& position);
public: void materialize(); public: void materialize();
public: void unmaterialize(); public: void unmaterialize();
public: void Merge(Net* net); public: void merge(Net* net);
// Others // Others
// ****** // ******

View File

@ -31,7 +31,7 @@ static StandardRelation* getExternalComponentsRelation(const Net* net) {
} }
Components getExternalComponents(const Net* net) { Components getExternalComponents(const Net* net) {
if (!net->IsExternal()) if (!net->isExternal())
throw Error("Impossible to retrieve external components on non external net " throw Error("Impossible to retrieve external components on non external net "
+ net->getName()._getString()); + net->getName()._getString());
@ -43,7 +43,7 @@ Components getExternalComponents(const Net* net) {
void setExternal(Component* component) { void setExternal(Component* component) {
Net* net = component->getNet(); Net* net = component->getNet();
if (!net->IsExternal()) if (!net->isExternal())
throw Error("Impossible to set as external a component member of non external net " throw Error("Impossible to set as external a component member of non external net "
+ net->getName()._getString()); + net->getName()._getString());
StandardRelation* externalComponentsRelation = getExternalComponentsRelation(net); StandardRelation* externalComponentsRelation = getExternalComponentsRelation(net);

View File

@ -214,22 +214,22 @@ Transformation Path::getTransformation(const Transformation& transformation) con
return (_sharedPath) ? _sharedPath->getTransformation(transformation) : transformation; return (_sharedPath) ? _sharedPath->getTransformation(transformation) : transformation;
} }
bool Path::IsEmpty() const bool Path::isEmpty() const
// *********************** // ***********************
{ {
return (_sharedPath == NULL); return (_sharedPath == NULL);
} }
void Path::MakeEmpty() void Path::makeEmpty()
// ******************* // *******************
{ {
_sharedPath = NULL; _sharedPath = NULL;
} }
void Path::SetNameSeparator(char nameSeparator) void Path::setNameSeparator(char nameSeparator)
// ******************************************** // ********************************************
{ {
SharedPath::SetNameSeparator(nameSeparator); SharedPath::setNameSeparator(nameSeparator);
} }
string Path::_getString() const string Path::_getString() const

View File

@ -73,13 +73,13 @@ class Path {
// Predicates // Predicates
// ********** // **********
public: bool IsEmpty() const; public: bool isEmpty() const;
// Updators // Updators
// ******** // ********
public: void MakeEmpty(); public: void makeEmpty();
public: static void SetNameSeparator(char nameSeparator); public: static void setNameSeparator(char nameSeparator);
// Others // Others
// ****** // ******

View File

@ -29,7 +29,7 @@ class Plug_IsConnectedFilter : public Filter<Plug*> {
public: virtual Filter<Plug*>* getClone() const {return new Plug_IsConnectedFilter(*this);}; public: virtual Filter<Plug*>* getClone() const {return new Plug_IsConnectedFilter(*this);};
public: virtual bool accept(Plug* plug) const {return plug->IsConnected();}; public: virtual bool accept(Plug* plug) const {return plug->isConnected();};
public: virtual string _getString() const {return "<" + _TName("Plug::IsConnectedFilter>");}; public: virtual string _getString() const {return "<" + _TName("Plug::IsConnectedFilter>");};
@ -57,7 +57,7 @@ Plug::Plug(Instance* instance, Net* masterNet)
if (_masterNet->getCell() != _instance->getMasterCell()) if (_masterNet->getCell() != _instance->getMasterCell())
throw Error("Can't create " + _TName("Plug") + " : incompatible master net"); throw Error("Can't create " + _TName("Plug") + " : incompatible master net");
if (!_masterNet->IsExternal()) if (!_masterNet->isExternal())
throw Error("Can't create " + _TName("Plug") + " : not an external master net"); throw Error("Can't create " + _TName("Plug") + " : not an external master net");
if (_instance->getPlug(_masterNet)) if (_instance->getPlug(_masterNet))
@ -118,7 +118,7 @@ PlugFilter Plug::getIsUnconnectedFilter()
return !Plug_IsConnectedFilter(); return !Plug_IsConnectedFilter();
} }
void Plug::SetNet(Net* net) void Plug::setNet(Net* net)
// ************************ // ************************
{ {
if (net != getNet()) { if (net != getNet()) {

View File

@ -68,14 +68,14 @@ class Plug : public Component {
// Predicates // Predicates
// ********** // **********
public: bool IsConnected() const {return (getNet() != NULL);}; public: bool isConnected() const {return (getNet() != NULL);};
// Updators // Updators
// ******** // ********
public: virtual void translate(const Unit& dx, const Unit& dy) {}; public: virtual void translate(const Unit& dx, const Unit& dy) {};
public: void SetNet(Net* net); public: void setNet(Net* net);
public: virtual void materialize() {}; public: virtual void materialize() {};
public: virtual void unmaterialize() {}; public: virtual void unmaterialize() {};

View File

@ -113,11 +113,11 @@ class Region_Tile {
public: void SplitVertical(Region* region, const Unit& x); public: void SplitVertical(Region* region, const Unit& x);
public: void SplitHorizontal(Region* region, const Unit& y); public: void SplitHorizontal(Region* region, const Unit& y);
public: bool MergeLeftTile(Region* region); public: bool mergeLeftTile(Region* region);
public: bool MergeBottomTile(Region* region); public: bool mergeBottomTile(Region* region);
public: bool MergeTopTile(Region* region); public: bool mergeTopTile(Region* region);
public: bool MergeRightTile(Region* region); public: bool mergeRightTile(Region* region);
public: void MergeNeighbours(Region* region); public: void mergeNeighbours(Region* region);
public: void CleanNeighbours(Region* region); public: void CleanNeighbours(Region* region);
public: bool VerticalEnhancement(Region* region); public: bool VerticalEnhancement(Region* region);
public: bool HorizontalEnhancement(Region* region); public: bool HorizontalEnhancement(Region* region);
@ -328,7 +328,7 @@ void Region_Tile::SplitHorizontal(Region* region, const Unit& y)
} }
} }
bool Region_Tile::MergeLeftTile(Region* region) bool Region_Tile::mergeLeftTile(Region* region)
// ******************************************** // ********************************************
{ {
Region_Tile* uselessTile = _leftTile; Region_Tile* uselessTile = _leftTile;
@ -370,7 +370,7 @@ bool Region_Tile::MergeLeftTile(Region* region)
return true; return true;
} }
bool Region_Tile::MergeBottomTile(Region* region) bool Region_Tile::mergeBottomTile(Region* region)
// ********************************************** // **********************************************
{ {
Region_Tile* uselessTile = _bottomTile; Region_Tile* uselessTile = _bottomTile;
@ -412,7 +412,7 @@ bool Region_Tile::MergeBottomTile(Region* region)
return true; return true;
} }
bool Region_Tile::MergeTopTile(Region* region) bool Region_Tile::mergeTopTile(Region* region)
// ******************************************* // *******************************************
{ {
Region_Tile* uselessTile = _topTile; Region_Tile* uselessTile = _topTile;
@ -454,7 +454,7 @@ bool Region_Tile::MergeTopTile(Region* region)
return true; return true;
} }
bool Region_Tile::MergeRightTile(Region* region) bool Region_Tile::mergeRightTile(Region* region)
// ********************************************* // *********************************************
{ {
Region_Tile* uselessTile = _rightTile; Region_Tile* uselessTile = _rightTile;
@ -496,11 +496,11 @@ bool Region_Tile::MergeRightTile(Region* region)
return true; return true;
} }
void Region_Tile::MergeNeighbours(Region* region) void Region_Tile::mergeNeighbours(Region* region)
// ********************************************** // **********************************************
{ {
while (MergeLeftTile(region) || MergeTopTile(region) || while (mergeLeftTile(region) || mergeTopTile(region) ||
MergeBottomTile(region) || MergeRightTile(region)) { mergeBottomTile(region) || mergeRightTile(region)) {
} }
} }
@ -539,22 +539,22 @@ void Region_Tile::CleanNeighbours(Region* region)
tile = *tileSet.begin(); tile = *tileSet.begin();
while (true) { while (true) {
Region_Tile* leftTile = tile->_leftTile; Region_Tile* leftTile = tile->_leftTile;
if ((leftTile == this) || !tile->MergeLeftTile(region)) break; if ((leftTile == this) || !tile->mergeLeftTile(region)) break;
tileSet.erase(leftTile); tileSet.erase(leftTile);
} }
while (true) { while (true) {
Region_Tile* topTile = tile->_topTile; Region_Tile* topTile = tile->_topTile;
if ((topTile == this) || !tile->MergeTopTile(region)) break; if ((topTile == this) || !tile->mergeTopTile(region)) break;
tileSet.erase(topTile); tileSet.erase(topTile);
} }
while (true) { while (true) {
Region_Tile* bottomTile = tile->_bottomTile; Region_Tile* bottomTile = tile->_bottomTile;
if ((bottomTile == this) || !tile->MergeBottomTile(region)) break; if ((bottomTile == this) || !tile->mergeBottomTile(region)) break;
tileSet.erase(bottomTile); tileSet.erase(bottomTile);
} }
while (true) { while (true) {
Region_Tile* rightTile = tile->_rightTile; Region_Tile* rightTile = tile->_rightTile;
if ((rightTile == this) || !tile->MergeRightTile(region)) break; if ((rightTile == this) || !tile->mergeRightTile(region)) break;
tileSet.erase(rightTile); tileSet.erase(rightTile);
} }
tileSet.erase(tile); tileSet.erase(tile);
@ -745,8 +745,8 @@ Region_Tile::_TopSplitAtHorizontalSize (Region* region, const Unit height)
modif = true; modif = true;
} }
if (upTile->_rightTile && upTile->_rightTile->getXMax() == getXMax()) { if (upTile->_rightTile && upTile->_rightTile->getXMax() == getXMax()) {
// Merge upTile et upTile->_rightTile // merge upTile et upTile->_rightTile
modif = upTile->MergeRightTile (region) || modif; modif = upTile->mergeRightTile (region) || modif;
} }
upTile = upTile->_leftTile; upTile = upTile->_leftTile;
} }
@ -770,8 +770,8 @@ Region_Tile::_BottomSplitAtHorizontalSize (Region* region, const Unit height)
if (downTile->_topTile != this) downTile = downTile->_topTile; if (downTile->_topTile != this) downTile = downTile->_topTile;
} }
if (downTile->_leftTile && downTile->_leftTile->getXMin() == getXMin()) { if (downTile->_leftTile && downTile->_leftTile->getXMin() == getXMin()) {
// Merge downTile et downTile->_leftTile // merge downTile et downTile->_leftTile
modif = downTile->MergeLeftTile (region) || modif; modif = downTile->mergeLeftTile (region) || modif;
} }
downTile = downTile->_rightTile; downTile = downTile->_rightTile;
} }
@ -794,8 +794,8 @@ Region_Tile::_LeftSplitAtVerticalSize (Region* region, const Unit width)
if (leftTile->_rightTile != this) leftTile = leftTile->_rightTile; if (leftTile->_rightTile != this) leftTile = leftTile->_rightTile;
} }
if (leftTile->_bottomTile && leftTile->_bottomTile->getYMin() == getYMin()) { if (leftTile->_bottomTile && leftTile->_bottomTile->getYMin() == getYMin()) {
// Merge leftTile et leftTile->_bottomTile // merge leftTile et leftTile->_bottomTile
modif = leftTile->MergeBottomTile (region) || modif; modif = leftTile->mergeBottomTile (region) || modif;
} }
leftTile = leftTile->_topTile; leftTile = leftTile->_topTile;
} }
@ -819,8 +819,8 @@ Region_Tile::_RightSplitAtVerticalSize (Region* region, const Unit width)
if (rightTile->_leftTile != this) rightTile = rightTile->_leftTile; if (rightTile->_leftTile != this) rightTile = rightTile->_leftTile;
} }
if (rightTile->_topTile && rightTile->_topTile->getYMax() == getYMax()) { if (rightTile->_topTile && rightTile->_topTile->getYMax() == getYMax()) {
// Merge rightTile et rightTile->_leftTile // merge rightTile et rightTile->_leftTile
modif = rightTile->MergeTopTile (region) || modif; modif = rightTile->mergeTopTile (region) || modif;
} }
rightTile = rightTile->_bottomTile; rightTile = rightTile->_bottomTile;
} }
@ -837,7 +837,7 @@ Region_Tile::_getTopNeighbour () const
Region_Tile* topTile = _topTile; Region_Tile* topTile = _topTile;
while (topTile && topTile->getXMax() > getXMin()) { while (topTile && topTile->getXMax() > getXMin()) {
if (topTile->_isVoid == _isVoid) { if (topTile->_isVoid == _isVoid) {
result.Merge (Interval (topTile->getXMin(), topTile->getXMax())); result.merge (Interval (topTile->getXMin(), topTile->getXMax()));
} }
topTile = topTile->_leftTile; topTile = topTile->_leftTile;
} }
@ -853,7 +853,7 @@ Region_Tile::_getBottomNeighbour () const
Region_Tile* bottomTile = _bottomTile; Region_Tile* bottomTile = _bottomTile;
while (bottomTile && bottomTile->getXMin() < getXMax()) { while (bottomTile && bottomTile->getXMin() < getXMax()) {
if (bottomTile->_isVoid == _isVoid) { if (bottomTile->_isVoid == _isVoid) {
result.Merge (Interval (bottomTile->getXMin(), bottomTile->getXMax())); result.merge (Interval (bottomTile->getXMin(), bottomTile->getXMax()));
} }
bottomTile = bottomTile->_rightTile; bottomTile = bottomTile->_rightTile;
} }
@ -869,7 +869,7 @@ Region_Tile::_getLeftNeighbour () const
Region_Tile* leftTile = _leftTile; Region_Tile* leftTile = _leftTile;
while (leftTile && leftTile->getYMin() < getYMax()) { while (leftTile && leftTile->getYMin() < getYMax()) {
if (leftTile->_isVoid == _isVoid) { if (leftTile->_isVoid == _isVoid) {
result.Merge (Interval (leftTile->getYMin(), leftTile->getYMax())); result.merge (Interval (leftTile->getYMin(), leftTile->getYMax()));
} }
leftTile = leftTile->_topTile; leftTile = leftTile->_topTile;
} }
@ -885,7 +885,7 @@ Region_Tile::_getRightNeighbour () const
Region_Tile* rightTile = _rightTile; Region_Tile* rightTile = _rightTile;
while (rightTile && rightTile->getYMax() > getYMin()) { while (rightTile && rightTile->getYMax() > getYMin()) {
if (rightTile->_isVoid == _isVoid) { if (rightTile->_isVoid == _isVoid) {
result.Merge (Interval (rightTile->getYMin(), rightTile->getYMax())); result.merge (Interval (rightTile->getYMin(), rightTile->getYMax()));
} }
rightTile = rightTile->_bottomTile; rightTile = rightTile->_bottomTile;
} }
@ -901,12 +901,12 @@ Region_Tile::VerticalEnhancement(Region* region)
while (_IsTopFull ()) { while (_IsTopFull ()) {
Unit height = _TopSplitAtVerticalSize (region); Unit height = _TopSplitAtVerticalSize (region);
modif = _TopSplitAtHorizontalSize (region, height); modif = _TopSplitAtHorizontalSize (region, height);
modif = MergeTopTile (region) || modif; modif = mergeTopTile (region) || modif;
} }
while (_IsBottomFull ()) { while (_IsBottomFull ()) {
Unit height = _BottomSplitAtVerticalSize (region); Unit height = _BottomSplitAtVerticalSize (region);
modif = _BottomSplitAtHorizontalSize (region, height); modif = _BottomSplitAtHorizontalSize (region, height);
modif = MergeBottomTile (region) || modif; modif = mergeBottomTile (region) || modif;
} }
return modif; return modif;
}; // Region_Tile::VerticalEnhancement }; // Region_Tile::VerticalEnhancement
@ -920,12 +920,12 @@ Region_Tile::HorizontalEnhancement(Region* region)
while (_IsLeftFull ()) { while (_IsLeftFull ()) {
Unit width = _LeftSplitAtHorizontalSize (region); Unit width = _LeftSplitAtHorizontalSize (region);
modif = _LeftSplitAtVerticalSize (region, width); modif = _LeftSplitAtVerticalSize (region, width);
modif = MergeLeftTile (region) || modif; modif = mergeLeftTile (region) || modif;
} }
while (_IsRightFull ()) { while (_IsRightFull ()) {
Unit width = _RightSplitAtHorizontalSize (region); Unit width = _RightSplitAtHorizontalSize (region);
modif = _RightSplitAtVerticalSize (region, width); modif = _RightSplitAtVerticalSize (region, width);
modif = MergeRightTile (region) || modif; modif = mergeRightTile (region) || modif;
} }
return modif; return modif;
}; // Region_Tile::HorizontalEnhancement }; // Region_Tile::HorizontalEnhancement
@ -2998,7 +2998,7 @@ void Region::_Update(const Box& box, bool isVoid, Tile* startTile)
} }
newTile->CleanNeighbours(this); newTile->CleanNeighbours(this);
newTile->MergeNeighbours(this); newTile->mergeNeighbours(this);
}; // Region::_Update }; // Region::_Update
bool bool
@ -3095,7 +3095,7 @@ Region::HorizontalEnhancement(Point point)
Interval 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 // Retourne le merge des intervales en vis a vis entre les boites
// dessus et dessous de box // dessus et dessous de box
{ {
Interval result = Interval(); Interval result = Interval();
@ -3109,7 +3109,7 @@ Region::TopBottomFacing (const Box box) const
Interval 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 // Retourne le merge des intervales en vis a vis entre les boites
// a gauche et droite de box // a gauche et droite de box
{ {
Interval result = Interval(); Interval result = Interval();

View File

@ -74,7 +74,7 @@ void RoutingPad::_postCreate()
{ {
Inherit::_postCreate(); Inherit::_postCreate();
if (!_occurrence.getPath().IsEmpty()) if (!_occurrence.getPath().isEmpty())
_occurrence.getMasterCell()->_addSlaveEntity(_occurrence.getEntity(),this); _occurrence.getMasterCell()->_addSlaveEntity(_occurrence.getEntity(),this);
} }
@ -224,7 +224,7 @@ void RoutingPad::_preDestroy()
// trace_in(); // trace_in();
if (!_occurrence.getPath().IsEmpty()) if (!_occurrence.getPath().isEmpty())
_occurrence.getMasterCell()->_removeSlaveEntity(_occurrence.getEntity(),this); _occurrence.getMasterCell()->_removeSlaveEntity(_occurrence.getEntity(),this);
Inherit::_preDestroy(); Inherit::_preDestroy();
@ -317,7 +317,7 @@ Occurrence RoutingPad::getPlugOccurrence()
Component* component= static_cast<Component*>(_occurrence.getEntity()); Component* component= static_cast<Component*>(_occurrence.getEntity());
Net* net=component->getNet(); Net* net=component->getNet();
Path path=_occurrence.getPath(); Path path=_occurrence.getPath();
if (path.IsEmpty()) if (path.isEmpty())
throw Error("Empty Path => not in an instance"); throw Error("Empty Path => not in an instance");
Instance* instance=path.getTailInstance(); Instance* instance=path.getTailInstance();
Plug* plug=instance->getPlug(net); Plug* plug=instance->getPlug(net);

View File

@ -190,7 +190,7 @@ Transformation SharedPath::getTransformation(const Transformation& transformatio
return headTransformation.getTransformation(tailTransformation); return headTransformation.getTransformation(tailTransformation);
} }
void SharedPath::SetNameSeparator(char nameSeparator) void SharedPath::setNameSeparator(char nameSeparator)
// ************************************************** // **************************************************
{ {
NAME_SEPARATOR = nameSeparator; NAME_SEPARATOR = nameSeparator;

View File

@ -89,7 +89,7 @@ class SharedPath {
// Updators // Updators
// ******** // ********
public: static void SetNameSeparator(char nameSeparator); public: static void setNameSeparator(char nameSeparator);
// Accessors // Accessors
// ********* // *********

View File

@ -166,13 +166,13 @@ extern "C" {
DirectGetLongAttribute(PyNet_getY,getY,PyNet,Net) DirectGetLongAttribute(PyNet_getY,getY,PyNet,Net)
// Standart Predicates (Attributes). // Standart Predicates (Attributes).
DirectGetBoolAttribute(PyNet_IsGlobal ,IsGlobal ,PyNet,Net) DirectGetBoolAttribute(PyNet_isGlobal ,isGlobal ,PyNet,Net)
DirectGetBoolAttribute(PyNet_IsExternal,IsExternal,PyNet,Net) DirectGetBoolAttribute(PyNet_isExternal,isExternal,PyNet,Net)
DirectGetBoolAttribute(PyNet_IsLogical ,IsLogical ,PyNet,Net) DirectGetBoolAttribute(PyNet_isLogical ,isLogical ,PyNet,Net)
DirectGetBoolAttribute(PyNet_IsClock ,IsClock ,PyNet,Net) DirectGetBoolAttribute(PyNet_isClock ,isClock ,PyNet,Net)
DirectGetBoolAttribute(PyNet_IsGround ,IsGround ,PyNet,Net) DirectGetBoolAttribute(PyNet_isGround ,isGround ,PyNet,Net)
DirectGetBoolAttribute(PyNet_IsPower ,IsPower ,PyNet,Net) DirectGetBoolAttribute(PyNet_isPower ,isPower ,PyNet,Net)
DirectGetBoolAttribute(PyNet_IsSupply ,IsSupply ,PyNet,Net) DirectGetBoolAttribute(PyNet_isSupply ,isSupply ,PyNet,Net)
GetBoundStateAttribute(PyNet_IsPyBound ,PyNet,Net) GetBoundStateAttribute(PyNet_IsPyBound ,PyNet,Net)
@ -349,20 +349,20 @@ extern "C" {
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyNet_SetName ()" // Attribute Method : "PyNet_setName ()"
static PyObject* PyNet_SetName ( PyNet *self, PyObject* args ) static PyObject* PyNet_setName ( PyNet *self, PyObject* args )
{ {
trace << "PyNet_SetName()" << endl; trace << "PyNet_setName()" << endl;
HTRY HTRY
METHOD_HEAD ( "Net.SetName()" ) METHOD_HEAD ( "Net.setName()" )
PyObject* arg0; PyObject* arg0;
if ( ! ParseOneArg ( "Net.SetName", args, NET_ARG, (PyObject**)&arg0 ) ) return ( NULL ); if ( ! ParseOneArg ( "Net.setName", args, NET_ARG, (PyObject**)&arg0 ) ) return ( NULL );
net->SetName ( *PYNAME_O(arg0) ); net->setName ( *PYNAME_O(arg0) );
HCATCH HCATCH
@ -371,20 +371,20 @@ extern "C" {
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyNet_SetGlobal ()" // Attribute Method : "PyNet_setGlobal ()"
static PyObject* PyNet_SetGlobal ( PyNet *self, PyObject* args ) static PyObject* PyNet_setGlobal ( PyNet *self, PyObject* args )
{ {
trace << "PyNet_SetGlobal()" << endl; trace << "PyNet_setGlobal()" << endl;
HTRY HTRY
METHOD_HEAD ( "Net.SetGlobal()" ) METHOD_HEAD ( "Net.setGlobal()" )
PyObject* arg0; PyObject* arg0;
if ( ! ParseOneArg ( "Net.SetGlobal", args, INT_ARG, (PyObject**)&arg0 ) ) return ( NULL ); if ( ! ParseOneArg ( "Net.setGlobal", args, INT_ARG, (PyObject**)&arg0 ) ) return ( NULL );
net->SetGlobal ( PyInt_AsLong(arg0) != 0 ); net->setGlobal ( PyInt_AsLong(arg0) != 0 );
HCATCH HCATCH
@ -394,20 +394,20 @@ extern "C" {
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyNet_SetExternal ()" // Attribute Method : "PyNet_setExternal ()"
static PyObject* PyNet_SetExternal ( PyNet *self, PyObject* args ) static PyObject* PyNet_setExternal ( PyNet *self, PyObject* args )
{ {
trace << "PyNet_SetExternal()" << endl; trace << "PyNet_setExternal()" << endl;
HTRY HTRY
METHOD_HEAD ( "Net.SetExternal()" ) METHOD_HEAD ( "Net.setExternal()" )
PyObject* arg0; PyObject* arg0;
if ( ! ParseOneArg ( "Net.SetExternal", args, INT_ARG, (PyObject**)&arg0 ) ) return ( NULL ); if ( ! ParseOneArg ( "Net.setExternal", args, INT_ARG, (PyObject**)&arg0 ) ) return ( NULL );
net->SetExternal ( PyInt_AsLong(arg0) != 0 ); net->setExternal ( PyInt_AsLong(arg0) != 0 );
HCATCH HCATCH
@ -417,20 +417,20 @@ extern "C" {
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyNet_SetType ()" // Attribute Method : "PyNet_setType ()"
static PyObject* PyNet_SetType ( PyNet *self, PyObject* args ) static PyObject* PyNet_setType ( PyNet *self, PyObject* args )
{ {
trace << "PyNet_SetType()" << endl; trace << "PyNet_setType()" << endl;
HTRY HTRY
METHOD_HEAD ( "Net.SetType()" ) METHOD_HEAD ( "Net.setType()" )
PyObject* arg0; PyObject* arg0;
if ( ! ParseOneArg ( "Net.SetType", args, INT_ARG, (PyObject**)&arg0 ) ) return ( NULL ); if ( ! ParseOneArg ( "Net.setType", args, INT_ARG, (PyObject**)&arg0 ) ) return ( NULL );
net->SetType ( PyInt_AsType(arg0) ); net->setType ( PyInt_AsType(arg0) );
HCATCH HCATCH
@ -440,20 +440,20 @@ extern "C" {
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyNet_SetDirection ()" // Attribute Method : "PyNet_setDirection ()"
static PyObject* PyNet_SetDirection ( PyNet *self, PyObject* args ) static PyObject* PyNet_setDirection ( PyNet *self, PyObject* args )
{ {
trace << "PyNet_SetDirection()" << endl; trace << "PyNet_setDirection()" << endl;
HTRY HTRY
METHOD_HEAD ( "Net.SetDirection()" ) METHOD_HEAD ( "Net.setDirection()" )
PyObject* arg0; PyObject* arg0;
if ( ! ParseOneArg ( "Net.SetDirection", args, INT_ARG, (PyObject**)&arg0 ) ) return ( NULL ); if ( ! ParseOneArg ( "Net.setDirection", args, INT_ARG, (PyObject**)&arg0 ) ) return ( NULL );
net->SetDirection ( PyInt_AsDirection(arg0) ); net->setDirection ( PyInt_AsDirection(arg0) );
HCATCH HCATCH
@ -463,20 +463,20 @@ extern "C" {
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyNet_SetPosition ()" // Attribute Method : "PyNet_setPosition ()"
static PyObject* PyNet_SetPosition ( PyNet *self, PyObject* args ) static PyObject* PyNet_setPosition ( PyNet *self, PyObject* args )
{ {
trace << "PyNet_SetPosition()" << endl; trace << "PyNet_setPosition()" << endl;
HTRY HTRY
METHOD_HEAD ( "Net.SetPosition()" ) METHOD_HEAD ( "Net.setPosition()" )
PyObject* arg0; PyObject* arg0;
if ( ! ParseOneArg ( "Net.SetPosition", args, POINT_ARG, (PyObject**)&arg0 ) ) return ( NULL ); if ( ! ParseOneArg ( "Net.setPosition", args, POINT_ARG, (PyObject**)&arg0 ) ) return ( NULL );
net->SetPosition ( *PYPOINT_O(arg0) ); net->setPosition ( *PYPOINT_O(arg0) );
HCATCH HCATCH
@ -485,20 +485,19 @@ extern "C" {
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyNet_Merge ()" // Attribute Method : "PyNet_merge ()"
static PyObject* PyNet_Merge ( PyNet *self, PyObject* args ) static PyObject* PyNet_merge ( PyNet *self, PyObject* args ) {
{ trace << "PyNet_merge()" << endl;
trace << "PyNet_Merge()" << endl;
HTRY HTRY
METHOD_HEAD ( "Net.Merge()" ) METHOD_HEAD ( "Net.merge()" )
PyObject* arg0; PyObject* arg0;
if ( ! ParseOneArg ( "Net.Merge", args, NET_ARG, (PyObject**)&arg0 ) ) return ( NULL ); if ( ! ParseOneArg ( "Net.merge", args, NET_ARG, (PyObject**)&arg0 ) ) return ( NULL );
net->Merge ( PYNET_O(arg0) ); net->merge ( PYNET_O(arg0) );
HCATCH HCATCH
@ -515,51 +514,31 @@ extern "C" {
PyMethodDef PyNet_Methods[] = PyMethodDef PyNet_Methods[] =
{ { "getName" , (PyCFunction)PyNet_getName , METH_NOARGS , "Returns the net name." } { { "getName" , (PyCFunction)PyNet_getName , METH_NOARGS , "Returns the net name." }
//, { "getArity" , (PyCFunction)PyNet_getArity , METH_NOARGS , "Returns the signal arity." }
, { "getType" , (PyCFunction)PyNet_getType , METH_NOARGS , { "getType" , (PyCFunction)PyNet_getType , METH_NOARGS
, "Returns the signal type (by default set to UNDEFINED)." } , "Returns the signal type (by default set to UNDEFINED)." }
, { "getDirection" , (PyCFunction)PyNet_getDirection , METH_NOARGS , { "getDirection" , (PyCFunction)PyNet_getDirection , METH_NOARGS
, "Returns the signal direction (by default set to UNDEFINED)." } , "Returns the signal direction (by default set to UNDEFINED)." }
//, { "getPosition" , (PyCFunction)PyNet_getPosition , METH_NOARGS
// , "Returns the X,Y position of the net. This position is used for computing the location of the plugs (on slave instances calling the cell owning this net) having that net as master." }
, { "getX" , (PyCFunction)PyNet_getX , METH_NOARGS , "Returns net abscissa." } , { "getX" , (PyCFunction)PyNet_getX , METH_NOARGS , "Returns net abscissa." }
, { "getY" , (PyCFunction)PyNet_getY , METH_NOARGS , "Returns net ordinate." } , { "getY" , (PyCFunction)PyNet_getY , METH_NOARGS , "Returns net ordinate." }
//, { "getRubbers" , (PyCFunction)PyNet_getRubbers , METH_NOARGS , "Returns the collection of net's rubbers." }
//, { "getComponents" , (PyCFunction)PyNet_getComponents , METH_NOARGS , "Returns the collection of net's components." }
, { "getExternalComponents", (PyCFunction)PyNet_getExternalComponentsLocator , METH_NOARGS , "Returns the collection of net's external components. (only for an external net)" } , { "getExternalComponents", (PyCFunction)PyNet_getExternalComponentsLocator , METH_NOARGS , "Returns the collection of net's external components. (only for an external net)" }
, { "getPlugsLocator" , (PyCFunction)PyNet_getPlugsLocator , METH_NOARGS , "Returns the collection of net's plugs." } , { "getPlugsLocator" , (PyCFunction)PyNet_getPlugsLocator , METH_NOARGS , "Returns the collection of net's plugs." }
//, { "getContacts" , (PyCFunction)PyNet_getContacts , METH_NOARGS , "Returns the collection of net's contacts." }
, { "getPinsLocator" , (PyCFunction)PyNet_getPinsLocator , METH_NOARGS , "Returns the collection of net's pins." } , { "getPinsLocator" , (PyCFunction)PyNet_getPinsLocator , METH_NOARGS , "Returns the collection of net's pins." }
, { "getSegmentsLocator" , (PyCFunction)PyNet_getSegmentsLocator , METH_NOARGS , "Returns the collection of net's segments." } , { "getSegmentsLocator" , (PyCFunction)PyNet_getSegmentsLocator , METH_NOARGS , "Returns the collection of net's segments." }
//, { "getSegments" , (PyCFunction)PyNet_getSegments , METH_NOARGS , "Returns the collection of net's segments." } , { "isGlobal" , (PyCFunction)PyNet_isGlobal , METH_NOARGS, "return true if the net is global" }
//, { "getVerticals" , (PyCFunction)PyNet_getVerticals , METH_NOARGS , "Returns the collection of net's vertical segments." } , { "isExternal" , (PyCFunction)PyNet_isExternal , METH_NOARGS, "return true if the the net is external." }
//, { "getHorizontals" , (PyCFunction)PyNet_getHorizontals , METH_NOARGS , "Returns the collection of net's horizontal segments." } , { "isLogical" , (PyCFunction)PyNet_isLogical , METH_NOARGS, "return true if the net is logical ." }
//, { "getPads" , (PyCFunction)PyNet_getPads , METH_NOARGS , "Returns the collection of net's pads." } , { "isClock" , (PyCFunction)PyNet_isClock , METH_NOARGS, "return true if the net is a clock" }
//, { "getSavePlugs" , (PyCFunction)PyNet_getSavePlugs , METH_NOARGS , "Returns the collection of plugs which have this net as master." } , { "isPower" , (PyCFunction)PyNet_isPower , METH_NOARGS, "return true if the net is a power" }
//, { "getConnectedSavePlugs", (PyCFunction)PyNet_getConnectedSavePlugs , METH_NOARGS , { "isGround" , (PyCFunction)PyNet_isGround , METH_NOARGS, "return true if the net is a ground" }
// , "Returns the collection of connected plugs which have this net as master." } , { "isSupply" , (PyCFunction)PyNet_isSupply , METH_NOARGS, "return true if the net is a supply" }
//, { "getUnconnectedSavePlugs", (PyCFunction)PyNet_getUnconnectedSavePlugs, METH_NOARGS , { "isBound" , (PyCFunction)PyNet_IsPyBound , METH_NOARGS, "return true if the net is bounded to the hurricane net" }
// , "Returns the collection of unconnected plugs which have this net as master." } , { "setName" , (PyCFunction)PyNet_setName , METH_VARARGS, "Allows to change net name." }
, { "IsGlobal" , (PyCFunction)PyNet_IsGlobal , METH_NOARGS, "return true if the net is global" } , { "setGlobal" , (PyCFunction)PyNet_setGlobal , METH_VARARGS, "set the net global." }
, { "IsExternal" , (PyCFunction)PyNet_IsExternal , METH_NOARGS, "return true if the the net is external." } , { "setExternal" , (PyCFunction)PyNet_setExternal , METH_VARARGS, "set the net external." }
, { "IsLogical" , (PyCFunction)PyNet_IsLogical , METH_NOARGS, "return true if the net is logical ." } , { "setType" , (PyCFunction)PyNet_setType , METH_VARARGS, "set the type of the net." }
, { "IsClock" , (PyCFunction)PyNet_IsClock , METH_NOARGS, "return true if the net is a clock" } , { "setDirection" , (PyCFunction)PyNet_setDirection , METH_VARARGS, "set the direction of the net." }
, { "IsPower" , (PyCFunction)PyNet_IsPower , METH_NOARGS, "return true if the net is a power" } , { "setPosition" , (PyCFunction)PyNet_setPosition , METH_VARARGS, "set the X,Y location of the net." }
, { "IsGround" , (PyCFunction)PyNet_IsGround , METH_NOARGS, "return true if the net is a ground" } , { "merge" , (PyCFunction)PyNet_merge , METH_VARARGS
, { "IsSupply" , (PyCFunction)PyNet_IsSupply , METH_NOARGS, "return true if the net is a supply" }
, { "IsBound" , (PyCFunction)PyNet_IsPyBound , METH_NOARGS, "return true if the net is bounded to the hurricane net" }
, { "SetName" , (PyCFunction)PyNet_SetName , METH_VARARGS, "Allows to change net name." }
//, { "SetArity" , (PyCFunction)PyNet_SetArity , METH_VARARGS, "Sets the signal arity to <arity>." }
, { "SetGlobal" , (PyCFunction)PyNet_SetGlobal , METH_VARARGS, "Set the net global." }
, { "SetExternal" , (PyCFunction)PyNet_SetExternal , METH_VARARGS, "Set the net external." }
, { "SetType" , (PyCFunction)PyNet_SetType , METH_VARARGS, "Set the type of the net." }
, { "SetDirection" , (PyCFunction)PyNet_SetDirection , METH_VARARGS, "Set the direction of the net." }
, { "SetPosition" , (PyCFunction)PyNet_SetPosition , METH_VARARGS, "Set the X,Y location of the net." }
//, { "Materialize" , (PyCFunction)PyNet_Materialize , METH_NOARGS
// , "Materializes all the rubbers and components of a net." }
//, { "Unmaterialize" , (PyCFunction)PyNet_Unmaterialize , METH_NOARGS
// , "De-materializes all the rubbers and components of a net." }
, { "Merge" , (PyCFunction)PyNet_Merge , METH_VARARGS
, "Merges the net <net> to the net <this> which keeps its characteristics (arity, global, external and direction)." } , "Merges the net <net> to the net <this> which keeps its characteristics (arity, global, external and direction)." }
, { "destroy" , (PyCFunction)PyNet_destroy , METH_NOARGS , { "destroy" , (PyCFunction)PyNet_destroy , METH_NOARGS
, "Destroy associated hurricane object, the python object remains." } , "Destroy associated hurricane object, the python object remains." }

View File

@ -83,7 +83,7 @@ extern "C" {
// Standart Predicates (Attributes). // Standart Predicates (Attributes).
DirectGetBoolAttribute(PyPath_IsEmpty ,IsEmpty ,PyPath,Path) DirectGetBoolAttribute(PyPath_isEmpty ,isEmpty ,PyPath,Path)
// Standart Destroy (Attribute). // Standart Destroy (Attribute).
@ -294,7 +294,7 @@ extern "C" {
, { "getName" , (PyCFunction)PyPath_getName , METH_NOARGS , "Returns the concatenation of instances names." } , { "getName" , (PyCFunction)PyPath_getName , METH_NOARGS , "Returns the concatenation of instances names." }
, { "getTransformation" , (PyCFunction)PyPath_getTransformation , METH_VARARGS, "Return the resulting transformation." } , { "getTransformation" , (PyCFunction)PyPath_getTransformation , METH_VARARGS, "Return the resulting transformation." }
, { "getInstancesLocator", (PyCFunction)PyPath_getInstancesLocator, METH_NOARGS , "Returns the collection of instances defining the path." } , { "getInstancesLocator", (PyCFunction)PyPath_getInstancesLocator, METH_NOARGS , "Returns the collection of instances defining the path." }
, { "IsEmpty" , (PyCFunction)PyPath_IsEmpty , METH_NOARGS , "Return true if the path is empty." } , { "isEmpty" , (PyCFunction)PyPath_isEmpty , METH_NOARGS , "Return true if the path is empty." }
, { "destroy" , (PyCFunction)PyPath_destroy , METH_NOARGS , { "destroy" , (PyCFunction)PyPath_destroy , METH_NOARGS
, "Destroy associated hurricane object, the python object remains." } , "Destroy associated hurricane object, the python object remains." }
, {NULL, NULL, 0, NULL} /* sentinel */ , {NULL, NULL, 0, NULL} /* sentinel */

View File

@ -84,7 +84,7 @@ extern "C" {
// Standart Predicates (Attributes). // Standart Predicates (Attributes).
DirectGetBoolAttribute(PyPlug_IsConnected,IsConnected,PyPlug,Plug) DirectGetBoolAttribute(PyPlug_isConnected,isConnected,PyPlug,Plug)
@ -129,8 +129,7 @@ extern "C" {
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyPlug_getNet ()" // Attribute Method : "PyPlug_getNet ()"
static PyObject* PyPlug_getNet ( PyPlug *self ) static PyObject* PyPlug_getNet ( PyPlug *self ) {
{
trace << "PyPlug_getNet ()" << endl; trace << "PyPlug_getNet ()" << endl;
Net* net = NULL; Net* net = NULL;
@ -147,20 +146,19 @@ extern "C" {
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Attribute Method : "PyPlug_SetNet ()" // Attribute Method : "PyPlug_setNet ()"
static PyObject* PyPlug_SetNet ( PyPlug *self, PyObject* args ) static PyObject* PyPlug_setNet ( PyPlug *self, PyObject* args ) {
{ trace << "PyPlug_setNet()" << endl;
trace << "PyPlug_SetNet()" << endl;
HTRY HTRY
METHOD_HEAD ( "Plug.SetNet()" ) METHOD_HEAD ( "Plug.setNet()" )
PyNet* net; PyNet* net;
if ( ! ParseOneArg ( "Plug.SetNet", args, NET_ARG, (PyObject**)&net ) ) return ( NULL ); if ( ! ParseOneArg ( "Plug.setNet", args, NET_ARG, (PyObject**)&net ) ) return ( NULL );
plug->SetNet ( PYNET_O(net) ); plug->setNet ( PYNET_O(net) );
HCATCH HCATCH
@ -178,8 +176,8 @@ extern "C" {
{ { "getInstance" , (PyCFunction)PyPlug_getInstance , METH_NOARGS , "Return the instance to which belongs the plug." } { { "getInstance" , (PyCFunction)PyPlug_getInstance , METH_NOARGS , "Return the instance to which belongs the plug." }
, { "getMasterNet" , (PyCFunction)PyPlug_getMasterNet , METH_NOARGS , "Returns the external net referenced by the plug in the master cell of its instance." } , { "getMasterNet" , (PyCFunction)PyPlug_getMasterNet , METH_NOARGS , "Returns the external net referenced by the plug in the master cell of its instance." }
, { "getNet" , (PyCFunction)PyPlug_getNet , METH_NOARGS , "Returns the net connected by the plug in the cell of its instance." } , { "getNet" , (PyCFunction)PyPlug_getNet , METH_NOARGS , "Returns the net connected by the plug in the cell of its instance." }
, { "IsConnected" , (PyCFunction)PyPlug_IsConnected , METH_NOARGS , "Returns true if the plug is connected, else false." } , { "isConnected" , (PyCFunction)PyPlug_isConnected , METH_NOARGS , "Returns true if the plug is connected, else false." }
, { "SetNet" , (PyCFunction)PyPlug_SetNet , METH_VARARGS, "This method allows to connect or change the net of a plug." } , { "setNet" , (PyCFunction)PyPlug_setNet , METH_VARARGS, "This method allows to connect or change the net of a plug." }
, {NULL, NULL, 0, NULL} /* sentinel */ , {NULL, NULL, 0, NULL} /* sentinel */
}; };