104 if (mType < rhs.mType)
106 if (mType > rhs.mType)
108 return mId < rhs.mId;
118 return mType == rhs.mType && mId == rhs.mId;
128 return !(*
this == rhs);
138 uint
qHash(
const Node &
n);
150 log_warning(
"gui",
"Gate id {} cannot be moved, not found in current placement", gateId);
157 log_warning(
"gui",
"Target position is already occupied");
173 log_warning(
"gui",
"Module id {} cannot be moved, not found in current placement", moduleId);
180 log_warning(
"gui",
"Target position is already occupied");
194 return (it ==
constEnd() ?
nullptr :
new std::pair<int,int>(it->x(),it->y()));
200 return (it ==
constEnd() ?
nullptr :
new std::pair(it->x(),it->y()));
225 : mMode(mod), mPreferredOrigin(orign) {;}
255 if (mMode < rhs.mMode)
257 if (mMode > rhs.mMode)
259 return mPreferredOrigin < rhs.mPreferredOrigin;
269 return mMode == rhs.mMode && mPreferredOrigin == rhs.mPreferredOrigin;
291 Node mPreferredOrigin;
std::pair< int, int > * gatePosition(u32 gateId) const
std::pair< int, int > * modulePosition(u32 moduleId) const
void setGatePosition(u32 gateId, std::pair< int, int >p, bool swap=false)
GridPlacement(const QHash< hal::Node, QPoint > &data)
void setModulePosition(u32 moduleId, std::pair< int, int >p, bool swap=false)
The Node class object represents a module or a gate.
bool operator<(const Node &rhs) const
operator < to provide an ordering scheme for maps and ordered lists
bool isModule() const
isModule test wheter node is a module
NodeType type() const
type getter for type information
bool isGate() const
isGate test whether node is a gate
bool operator==(const Node &rhs) const
operator == to test whether two nodes are equal
Node(u32 i=0, NodeType t=None)
bool isNull() const
isNull test for null-Node object typically returned from functions
u32 id() const
id getter for ID information
bool operator!=(const Node &rhs) const
operator != to test whether two nodes are not equal
Container class to store a PlacementHint togerther with a set of modules and gates.
PlacementHint mPlacementHint
PlacementEntry(const PlacementHint &plc, const QSet< u32 > &mods, const QSet< u32 > &gats)
The PlacementHint class object provides hints for the layouter how new box objects are placed on a vi...
bool operator<(const PlacementHint &rhs) const
operator < provide an order structure for placement hints
void addGridPosition(const Node &nd, const QPoint &p)
bool operator==(const PlacementHint &rhs) const
operator == test whether two placement hints are equal
Node preferredOrigin() const
preferredOrigin getter for placement origin if any.
PlacementHint(const GridPlacement &gridPlc)
PlacementHint constructor for grid placement.
PlacementHint(PlacementModeType mod=Standard, const Node &orign=Node())
PlacementHint standard constructor.
PlacementModeType mode() const
mode getter for placement mode type
PlacementModeType
The PlacementModeType enum either most compact arrangement (Standard) or to the left or right of give...
const QHash< Node, QPoint > & gridPosition() const
ItemType
The ItemType enum provides the enum type to classify graphic items into Modules, Gates or Nets....
#define log_warning(channel,...)
Q_DECLARE_METATYPE(hal::Node)
uint qHash(const LaneIndex &ri)
QHash::const_iterator constEnd() const const
QHash::const_iterator constFind(const Key &key) const const
QHash::iterator insert(const Key &key, const T &value)
const Key key(const T &value) const const
T & operator[](const Key &key)
void swap(QHash< K, V > &other)