light modifications
This commit is contained in:
parent
8852389baa
commit
6a98b38248
|
@ -149,7 +149,7 @@ void Cell::flattenNets(bool buildRings)
|
|||
cerr << "[ERROR] " << primaryPlug << "\n"
|
||||
<< " has attached components, not managed yet." << endl;
|
||||
} else {
|
||||
primaryPlug->getBodyHook()->Detach ();
|
||||
primaryPlug->getBodyHook()->detach ();
|
||||
}
|
||||
}
|
||||
end_for
|
||||
|
@ -160,12 +160,12 @@ void Cell::flattenNets(bool buildRings)
|
|||
currentRP->materialize ();
|
||||
if ( buildRings ) {
|
||||
if ( previousRP ) {
|
||||
currentRP->getBodyHook()->Attach ( previousRP->getBodyHook() );
|
||||
currentRP->getBodyHook()->attach ( previousRP->getBodyHook() );
|
||||
}
|
||||
Plug* plug = static_cast<Plug*>( plugOccurrence.getEntity() );
|
||||
if ( plugOccurrence.getPath().isEmpty() ) {
|
||||
plug->getBodyHook()->Attach ( currentRP->getBodyHook() );
|
||||
plug->getBodyHook()->Detach ();
|
||||
plug->getBodyHook()->attach ( currentRP->getBodyHook() );
|
||||
plug->getBodyHook()->detach ();
|
||||
}
|
||||
previousRP = currentRP;
|
||||
}
|
||||
|
@ -179,10 +179,10 @@ void Cell::flattenNets(bool buildRings)
|
|||
currentRP = createRoutingPad ( pin );
|
||||
if ( buildRings ) {
|
||||
if ( previousRP ) {
|
||||
currentRP->getBodyHook()->Attach ( previousRP->getBodyHook() );
|
||||
currentRP->getBodyHook()->attach ( previousRP->getBodyHook() );
|
||||
}
|
||||
pin->getBodyHook()->Attach ( currentRP->getBodyHook() );
|
||||
pin->getBodyHook()->Detach ();
|
||||
pin->getBodyHook()->attach ( currentRP->getBodyHook() );
|
||||
pin->getBodyHook()->detach ();
|
||||
}
|
||||
previousRP = currentRP;
|
||||
}
|
||||
|
|
|
@ -390,11 +390,11 @@ void Component::_preDestroy()
|
|||
component->unmaterialize();
|
||||
for_each_hook(hook, component->getHooks()) {
|
||||
for_each_hook(hook, hook->getHooks()) {
|
||||
if (hook->IsMaster() && (componentSet.find(hook->getComponent()) == componentSet.end()))
|
||||
if (hook->isMaster() && (componentSet.find(hook->getComponent()) == componentSet.end()))
|
||||
masterHookSet.insert(hook);
|
||||
end_for;
|
||||
}
|
||||
if (!hook->IsMaster()) hook->Detach();
|
||||
if (!hook->isMaster()) hook->detach();
|
||||
end_for;
|
||||
}
|
||||
end_for;
|
||||
|
@ -430,7 +430,7 @@ void Component::_preDestroy()
|
|||
}
|
||||
/**/
|
||||
|
||||
_bodyHook.Detach();
|
||||
_bodyHook.detach();
|
||||
|
||||
Inherit::_preDestroy();
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class Component : public Go {
|
|||
|
||||
public: virtual Component* getComponent() const;
|
||||
|
||||
public: virtual bool IsMaster() const {return true;};
|
||||
public: virtual bool isMaster() const {return true;};
|
||||
|
||||
public: virtual string _getTypeName() const { return _TName("Component::BodyHook"); };
|
||||
public: virtual string _getString() const;
|
||||
|
|
|
@ -122,7 +122,7 @@ Contact::Contact(Net* net, Component* anchor, Layer* layer, const Unit& dx, cons
|
|||
if (!_layer)
|
||||
throw Error("Can't create " + _TName("Contact") + " : null layer");
|
||||
|
||||
_anchorHook.Attach(anchor->getBodyHook());
|
||||
_anchorHook.attach(anchor->getBodyHook());
|
||||
}
|
||||
|
||||
Contact* Contact::create(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height)
|
||||
|
@ -308,7 +308,7 @@ void Contact::_preDestroy()
|
|||
|
||||
Inherit::_preDestroy();
|
||||
|
||||
_anchorHook.Detach();
|
||||
_anchorHook.detach();
|
||||
|
||||
// trace << "exiting Contact::PreDestroy" << endl;
|
||||
// trace_out();
|
||||
|
|
|
@ -37,7 +37,7 @@ class Contact : public Component {
|
|||
|
||||
public: virtual Component* getComponent() const;
|
||||
|
||||
public: virtual bool IsMaster() const {return false;};
|
||||
public: virtual bool isMaster() const {return false;};
|
||||
|
||||
public: virtual string _getTypeName() const { return _TName("Contact::AnchorHook"); };
|
||||
public: virtual string _getString() const;
|
||||
|
|
|
@ -160,7 +160,7 @@ size_t DeepNet::_createRoutingPads ( bool buildRings )
|
|||
currentRP = createRoutingPad ( this, plugOccurrence );
|
||||
if ( buildRings ) {
|
||||
if ( previousRP ) {
|
||||
currentRP->getBodyHook()->Attach ( previousRP->getBodyHook() );
|
||||
currentRP->getBodyHook()->attach ( previousRP->getBodyHook() );
|
||||
}
|
||||
previousRP = currentRP;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class Hook_IsMasterFilter : public Filter<Hook*> {
|
|||
|
||||
public: virtual Filter<Hook*>* getClone() const {return new Hook_IsMasterFilter(*this);};
|
||||
|
||||
public: virtual bool accept(Hook* hook) const {return hook->IsMaster();};
|
||||
public: virtual bool accept(Hook* hook) const {return hook->isMaster();};
|
||||
|
||||
public: virtual string _getString() const {return "<" + _TName("Hook::IsMasterFilter>");};
|
||||
|
||||
|
@ -206,7 +206,7 @@ Hook* Hook::getMasterHook() const
|
|||
{
|
||||
Hook* hook = (Hook*)this;
|
||||
do {
|
||||
if (hook->IsMaster()) return hook;
|
||||
if (hook->isMaster()) return hook;
|
||||
hook = hook->_nextHook;
|
||||
} while (hook != this);
|
||||
return NULL;
|
||||
|
@ -224,7 +224,7 @@ Hook* Hook::getPreviousMasterHook() const
|
|||
Hook* previousMasterHook = NULL;
|
||||
Hook* hook = (Hook*)this;
|
||||
do {
|
||||
if (hook->IsMaster()) previousMasterHook = hook;
|
||||
if (hook->isMaster()) previousMasterHook = hook;
|
||||
hook = hook->_nextHook;
|
||||
} while (hook != this);
|
||||
return previousMasterHook;
|
||||
|
@ -248,22 +248,22 @@ HookFilter Hook::getIsMasterFilter()
|
|||
return Hook_IsMasterFilter();
|
||||
}
|
||||
|
||||
bool Hook::IsAttached() const
|
||||
bool Hook::isAttached() const
|
||||
// **************************
|
||||
{
|
||||
if (!IsMaster())
|
||||
if (!isMaster())
|
||||
return (getMasterHook() != NULL);
|
||||
else
|
||||
return (getNextMasterHook() != this);
|
||||
}
|
||||
|
||||
Hook* Hook::Detach()
|
||||
Hook* Hook::detach()
|
||||
// *****************
|
||||
{
|
||||
Hook* previousHook = NULL;
|
||||
Hook* hook = _nextHook;
|
||||
while (hook != this) {
|
||||
if (!IsMaster() || hook->IsMaster()) previousHook = hook;
|
||||
if (!isMaster() || hook->isMaster()) previousHook = hook;
|
||||
hook = hook->_nextHook;
|
||||
}
|
||||
if (previousHook) {
|
||||
|
@ -272,8 +272,8 @@ Hook* Hook::Detach()
|
|||
previousHook->_nextHook = nextHook;
|
||||
|
||||
// /*
|
||||
if (IsMaster()) {
|
||||
assert(previousHook->IsMaster());
|
||||
if (isMaster()) {
|
||||
assert(previousHook->isMaster());
|
||||
Component* component = getComponent();
|
||||
Rubber* rubber = component->getRubber();
|
||||
if (rubber) {
|
||||
|
@ -287,16 +287,16 @@ Hook* Hook::Detach()
|
|||
return previousHook;
|
||||
}
|
||||
|
||||
Hook* Hook::Attach(Hook* hook)
|
||||
Hook* Hook::attach(Hook* hook)
|
||||
// ***************************
|
||||
{
|
||||
if (IsAttached())
|
||||
if (isAttached())
|
||||
throw Error("Can't attach : already attached");
|
||||
|
||||
if (!hook)
|
||||
throw Error("Can't attach : null hook");
|
||||
|
||||
if (!hook->IsMaster())
|
||||
if (!hook->isMaster())
|
||||
throw Error("Can't attach : not a master hook");
|
||||
|
||||
if (hook == this)
|
||||
|
@ -308,7 +308,7 @@ Hook* Hook::Attach(Hook* hook)
|
|||
_nextHook = nextHook;
|
||||
|
||||
// /*
|
||||
if (IsMaster()) {
|
||||
if (isMaster()) {
|
||||
Rubber* rubber = hook->getComponent()->getRubber();
|
||||
if (rubber)
|
||||
getComponent()->_setRubber(rubber);
|
||||
|
@ -322,7 +322,7 @@ Hook* Hook::Attach(Hook* hook)
|
|||
|
||||
void Hook::_setNextHook(Hook* hook)
|
||||
{
|
||||
if (IsMaster())
|
||||
if (isMaster())
|
||||
{
|
||||
Rubber* rubber = hook->getComponent()->getRubber();
|
||||
if (rubber)
|
||||
|
@ -334,13 +334,13 @@ void Hook::_setNextHook(Hook* hook)
|
|||
Hook* Hook::merge(Hook* hook)
|
||||
// **************************
|
||||
{
|
||||
if (!IsMaster())
|
||||
if (!isMaster())
|
||||
throw Error("Can't merge : not a master");
|
||||
|
||||
if (!hook)
|
||||
throw Error("Can't merge : null hook");
|
||||
|
||||
if (!hook->IsMaster())
|
||||
if (!hook->isMaster())
|
||||
throw Error("Can't merge : not a master hook");
|
||||
|
||||
if (hook == this)
|
||||
|
@ -546,13 +546,13 @@ Hook_SlaveHooks::Locator::Locator(const Hook* hook)
|
|||
_hook(hook),
|
||||
_currentHook(NULL)
|
||||
{
|
||||
if (_hook && _hook->IsMaster()) {
|
||||
if (_hook && _hook->isMaster()) {
|
||||
_currentHook = _hook->getPreviousMasterHook();
|
||||
if (_currentHook) {
|
||||
_currentHook = _currentHook->getNextHook();
|
||||
if (_currentHook == _hook) _currentHook = NULL;
|
||||
}
|
||||
assert(!_currentHook || !_currentHook->IsMaster());
|
||||
assert(!_currentHook || !_currentHook->isMaster());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -596,7 +596,7 @@ void Hook_SlaveHooks::Locator::progress()
|
|||
if (_currentHook) {
|
||||
_currentHook = _currentHook->getNextHook();
|
||||
if (_currentHook == _hook) _currentHook = NULL;
|
||||
assert(!_currentHook || !_currentHook->IsMaster());
|
||||
assert(!_currentHook || !_currentHook->isMaster());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,15 +67,15 @@ class Hook : public NestedSlotAdapter {
|
|||
// Predicates
|
||||
// **********
|
||||
|
||||
public: virtual bool IsMaster() const = 0;
|
||||
public: virtual bool isMaster() const = 0;
|
||||
|
||||
public: bool IsAttached() const;
|
||||
public: bool isAttached() const;
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
||||
public: Hook* Detach();
|
||||
public: Hook* Attach(Hook* hook);
|
||||
public: Hook* detach();
|
||||
public: Hook* attach(Hook* hook);
|
||||
public: Hook* merge(Hook* hook);
|
||||
public: void _setNextHook(Hook* hook);
|
||||
|
||||
|
|
|
@ -566,14 +566,14 @@ void Net::merge(Net* net)
|
|||
Hook* masterHook = plug->getBodyHook();
|
||||
Hook* nextMasterHook = masterHook->getNextMasterHook();
|
||||
if (nextMasterHook != masterHook) {
|
||||
masterHook->Detach();
|
||||
masterHook->detach();
|
||||
mainPlug->getBodyHook()->merge(nextMasterHook);
|
||||
}
|
||||
Hooks slaveHooks = masterHook->getSlaveHooks();
|
||||
while (!slaveHooks.IsEmpty()) {
|
||||
Hook* slaveHook = slaveHooks.getFirst();
|
||||
slaveHook->Detach();
|
||||
slaveHook->Attach(mainPlug->getBodyHook());
|
||||
slaveHook->detach();
|
||||
slaveHook->attach(mainPlug->getBodyHook());
|
||||
}
|
||||
plug->_destroy();
|
||||
end_for;
|
||||
|
@ -613,8 +613,8 @@ void Net::_preDestroy()
|
|||
for_each_hook(hook, component->getHooks()) {
|
||||
// 15 05 2006 xtof : detach all hooks in rings when
|
||||
// a net deletion occurs, can't see why master hooks were not detached.
|
||||
//if (!hook->IsMaster()) hook->Detach();
|
||||
hook->Detach();
|
||||
//if (!hook->IsMaster()) hook->detach();
|
||||
hook->detach();
|
||||
end_for;
|
||||
}
|
||||
end_for;
|
||||
|
|
|
@ -128,7 +128,7 @@ Rubber* Rubber::_create(Hook* hook)
|
|||
if (!hook)
|
||||
throw Error("Can't create " + _TName("Rubber") + " : null hook");
|
||||
|
||||
if (!hook->IsMaster())
|
||||
if (!hook->isMaster())
|
||||
throw Error("Can't create " + _TName("Rubber") + " : not a master hook");
|
||||
|
||||
Net* net = hook->getComponent()->getNet();
|
||||
|
@ -220,7 +220,7 @@ void Rubber::_setNet(Net* net)
|
|||
void Rubber::_setHook(Hook* hook)
|
||||
// ******************************
|
||||
{
|
||||
assert(hook->IsMaster());
|
||||
assert(hook->isMaster());
|
||||
assert(hook->getComponent()->getNet() == getNet());
|
||||
_hook = hook;
|
||||
}
|
||||
|
|
|
@ -177,8 +177,8 @@ Segment::Segment(Net* net, Component* source, Component* target, Layer* layer, c
|
|||
if (!_layer)
|
||||
throw Error("Can't create " + _TName("Segment") + " : null layer");
|
||||
|
||||
if (source) _sourceHook.Attach(source->getBodyHook());
|
||||
if (target) _targetHook.Attach(target->getBodyHook());
|
||||
if (source) _sourceHook.attach(source->getBodyHook());
|
||||
if (target) _targetHook.attach(target->getBodyHook());
|
||||
}
|
||||
|
||||
Hooks Segment::getHooks() const
|
||||
|
@ -268,10 +268,10 @@ void Segment::Invert()
|
|||
Component* source = getSource();
|
||||
Component* target = getTarget();
|
||||
if (source && target && (target != source)) {
|
||||
getSourceHook()->Detach();
|
||||
getTargetHook()->Detach();
|
||||
getSourceHook()->Attach(target->getBodyHook());
|
||||
getTargetHook()->Attach(source->getBodyHook());
|
||||
getSourceHook()->detach();
|
||||
getTargetHook()->detach();
|
||||
getSourceHook()->attach(target->getBodyHook());
|
||||
getTargetHook()->attach(source->getBodyHook());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -283,8 +283,8 @@ void Segment::_preDestroy()
|
|||
|
||||
Inherit::_preDestroy();
|
||||
|
||||
_sourceHook.Detach();
|
||||
_targetHook.Detach();
|
||||
_sourceHook.detach();
|
||||
_targetHook.detach();
|
||||
|
||||
// trace << "exiting Segment::_preDestroy:" << endl;
|
||||
// trace_out();
|
||||
|
|
|
@ -37,7 +37,7 @@ class Segment : public Component {
|
|||
|
||||
public: virtual Component* getComponent() const;
|
||||
|
||||
public: virtual bool IsMaster() const {return false;};
|
||||
public: virtual bool isMaster() const {return false;};
|
||||
|
||||
public: virtual string _getTypeName() const { return _TName("Segment::SourceHook"); };
|
||||
public: virtual string _getString() const;
|
||||
|
@ -54,7 +54,7 @@ class Segment : public Component {
|
|||
|
||||
public: virtual Component* getComponent() const;
|
||||
|
||||
public: virtual bool IsMaster() const {return false;};
|
||||
public: virtual bool isMaster() const {return false;};
|
||||
|
||||
public: virtual string _getTypeName() const { return _TName("Segment::TargetHook"); };
|
||||
public: virtual string _getString() const;
|
||||
|
|
Loading…
Reference in New Issue