setLayer on Pad

This commit is contained in:
Christophe Alexandre 2008-07-04 07:48:18 +00:00
parent 0f253fbb30
commit 287145f3c0
4 changed files with 16 additions and 3 deletions

View File

@ -10,7 +10,7 @@
#include "hurricane/BasicLayer.h" #include "hurricane/BasicLayer.h"
#include "hurricane/Plug.h" #include "hurricane/Plug.h"
#include "hurricane/Error.h" #include "hurricane/Error.h"
# include "hurricane/Slot.h" #include "hurricane/Slot.h"
namespace Hurricane { namespace Hurricane {

View File

@ -81,6 +81,18 @@ void Pad::translate(const DbU::Unit& dx, const DbU::Unit& dy)
} }
} }
void Pad::setLayer(const Layer* layer)
// ***********************************
{
if (!layer)
throw Error("Can't set layer : null layer");
if (layer != _layer) {
invalidate(false);
_layer = layer;
}
}
void Pad::setBoundingBox(const Box& boundingBox) void Pad::setBoundingBox(const Box& boundingBox)
// ********************************************* // *********************************************
{ {

View File

@ -281,8 +281,8 @@ inline Hurricane::Record* getRecord<const Hurricane::Net::Direction::Code*>
INSPECTOR_P_SUPPORT(Hurricane::Net); INSPECTOR_P_SUPPORT(Hurricane::Net);
INSPECTOR_P_SUPPORT(Hurricane::Net::ComponentSet); INSPECTOR_P_SUPPORT(Hurricane::Net::ComponentSet);
INSPECTOR_P_SUPPORT(Hurricane::Net::RubberSet); INSPECTOR_P_SUPPORT(Hurricane::Net::RubberSet);
INSPECTOR_PV_SUPPORT(Hurricane::Net::Type); INSPECTOR_P_SUPPORT(Hurricane::Net::Type);
INSPECTOR_PV_SUPPORT(Hurricane::Net::Direction); INSPECTOR_P_SUPPORT(Hurricane::Net::Direction);
#endif // HURRICANE_NET #endif // HURRICANE_NET

View File

@ -53,6 +53,7 @@ class Pad : public Component {
// Updators // Updators
// ******** // ********
public: void setLayer(const Layer* layer);
public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy); public: virtual void translate(const DbU::Unit& dx, const DbU::Unit& dy);
public: void setBoundingBox(const Box& boundingBox); public: void setBoundingBox(const Box& boundingBox);