|
Horizon
|
#include <pns_node.h>
Classes | |
| struct | DEFAULT_OBSTACLE_VISITOR |
Public Types | |
| typedef OPT< OBSTACLE > | OPT_OBSTACLE |
| typedef std::vector< ITEM * > | ITEM_VECTOR |
| typedef std::vector< OBSTACLE > | OBSTACLES |
Public Member Functions | |
| int | GetClearance (const ITEM *aA, const ITEM *aB) const |
| |
| int | GetMaxClearance () const |
| |
| void | SetMaxClearance (int aClearance) |
| |
| void | SetRuleResolver (RULE_RESOLVER *aFunc) |
| |
| RULE_RESOLVER * | GetRuleResolver () |
| int | JointCount () const |
| |
| int | Depth () const |
| |
| int | QueryColliding (const ITEM *aItem, OBSTACLES &aObstacles, int aKindMask=ITEM::ANY_T, int aLimitCount=-1, bool aDifferentNetsOnly=true, int aForceClearance=-1) |
| Function QueryColliding() More... | |
| int | QueryColliding (const ITEM *aItem, OBSTACLE_VISITOR &aVisitor) |
| OPT_OBSTACLE | NearestObstacle (const LINE *aItem, int aKindMask=ITEM::ANY_T, const std::set< ITEM * > *aRestrictedSet=NULL) |
| Function NearestObstacle() More... | |
| OPT_OBSTACLE | CheckColliding (const ITEM *aItem, int aKindMask=ITEM::ANY_T) |
| Function CheckColliding() More... | |
| OPT_OBSTACLE | CheckColliding (const ITEM_SET &aSet, int aKindMask=ITEM::ANY_T) |
| Function CheckColliding() More... | |
| bool | CheckColliding (const ITEM *aItemA, const ITEM *aItemB, int aKindMask=ITEM::ANY_T, int aForceClearance=-1) |
| Function CheckColliding() More... | |
| const ITEM_SET | HitTest (const VECTOR2I &aPoint) const |
| Function HitTest() More... | |
| bool | Add (std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false) |
| Function Add() More... | |
| void | Add (std::unique_ptr< SOLID > aSolid) |
| void | Add (std::unique_ptr< VIA > aVia) |
| void | Add (LINE &aLine, bool aAllowRedundant=false) |
| void | Remove (SOLID *aSolid) |
| Function Remove() More... | |
| void | Remove (VIA *aVia) |
| void | Remove (SEGMENT *aSegment) |
| void | Remove (ITEM *aItem) |
| void | Remove (LINE &aLine) |
| Function Remove() More... | |
| void | Replace (ITEM *aOldItem, std::unique_ptr< ITEM > aNewItem) |
| Function Replace() More... | |
| void | Replace (LINE &aOldLine, LINE &aNewLine) |
| NODE * | Branch () |
| Function Branch() More... | |
| const LINE | AssembleLine (SEGMENT *aSeg, int *aOriginSegmentIndex=NULL, bool aStopAtLockedJoints=false) |
| Function AssembleLine() More... | |
| void | Dump (bool aLong=false) |
| |
| void | GetUpdatedItems (ITEM_VECTOR &aRemoved, ITEM_VECTOR &aAdded) |
| Function GetUpdatedItems() More... | |
| void | Commit (NODE *aNode) |
| Function Commit() More... | |
| JOINT * | FindJoint (const VECTOR2I &aPos, int aLayer, int aNet) |
| Function FindJoint() More... | |
| void | LockJoint (const VECTOR2I &aPos, const ITEM *aItem, bool aLock) |
| JOINT * | FindJoint (const VECTOR2I &aPos, const ITEM *aItem) |
| Function FindJoint() More... | |
| int | FindLinesBetweenJoints (JOINT &aA, JOINT &aB, std::vector< LINE > &aLines) |
| |
| void | FindLineEnds (const LINE &aLine, JOINT &aA, JOINT &aB) |
| |
| void | KillChildren () |
| |
| void | AllItemsInNet (int aNet, std::set< ITEM * > &aItems) |
| void | ClearRanks (int aMarkerMask=MK_HEAD|MK_VIOLATION) |
| int | FindByMarker (int aMarker, ITEM_SET &aItems) |
| int | RemoveByMarker (int aMarker) |
| ITEM * | FindItemByParent (const class PNS_HORIZON_PARENT_ITEM *aParent, int net) |
| bool | HasChildren () const |
| bool | Overrides (ITEM *aItem) const |
More... | |
Class NODE.
Keeps the router "world" - i.e. all the tracks, vias, solids in a hierarchical and indexed way. Features:
| bool PNS::NODE::Add | ( | std::unique_ptr< SEGMENT > | aSegment, |
| bool | aAllowRedundant = false |
||
| ) |
Function Add()
Adds an item to the current node.
| aSegment | item to add |
| aAllowRedundant | if true, duplicate items are allowed (e.g. a segment or via |
| const LINE PNS::NODE::AssembleLine | ( | SEGMENT * | aSeg, |
| int * | aOriginSegmentIndex = NULL, |
||
| bool | aStopAtLockedJoints = false |
||
| ) |
Function AssembleLine()
Follows the joint map to assemble a line connecting two non-trivial joints starting from segment aSeg.
| aSeg | the initial segment |
| aOriginSegmentIndex | index of aSeg in the resulting line |
| NODE * PNS::NODE::Branch | ( | ) |
Function Branch()
Creates a lightweight copy (called branch) of self that tracks the changes (added/removed items) wrs to the root. Note that if there are any branches in use, their parents must NOT be deleted.
| NODE::OPT_OBSTACLE PNS::NODE::CheckColliding | ( | const ITEM * | aItem, |
| int | aKindMask = ITEM::ANY_T |
||
| ) |
Function CheckColliding()
Checks if the item collides with anything else in the world, and if found, returns the obstacle.
| aItem | the item to find collisions with |
| aKindMask | mask of obstacle types to take into account |
| bool PNS::NODE::CheckColliding | ( | const ITEM * | aItemA, |
| const ITEM * | aItemB, | ||
| int | aKindMask = ITEM::ANY_T, |
||
| int | aForceClearance = -1 |
||
| ) |
Function CheckColliding()
Checks if 2 items collide. and if found, returns the obstacle.
| aItemA | first item to find collisions with |
| aItemB | second item to find collisions with |
| aKindMask | mask of obstacle types to take into account |
| NODE::OPT_OBSTACLE PNS::NODE::CheckColliding | ( | const ITEM_SET & | aSet, |
| int | aKindMask = ITEM::ANY_T |
||
| ) |
Function CheckColliding()
Checks if any item in the set collides with anything else in the world, and if found, returns the obstacle.
| aSet | set of items to find collisions with |
| aKindMask | mask of obstacle types to take into account |
| void PNS::NODE::Commit | ( | NODE * | aNode | ) |
Function Commit()
Applies the changes from a given branch (aNode) to the root branch. Called on a non-root branch will fail. Calling commit also kills all children nodes of the root branch.
| aNode | node to commit changes from |
Function FindJoint()
Searches for a joint at a given position, linked to given item.
Function FindJoint()
Searches for a joint at a given position, layer and belonging to given net.
| void PNS::NODE::GetUpdatedItems | ( | ITEM_VECTOR & | aRemoved, |
| ITEM_VECTOR & | aAdded | ||
| ) |
Function GetUpdatedItems()
Returns the lists of items removed and added in this branch, with respect to the root branch.
| aRemoved | removed items |
| aAdded | added items |
Function HitTest()
Finds all items that contain the point aPoint.
| aPoint | the point |
| NODE::OPT_OBSTACLE PNS::NODE::NearestObstacle | ( | const LINE * | aItem, |
| int | aKindMask = ITEM::ANY_T, |
||
| const std::set< ITEM * > * | aRestrictedSet = NULL |
||
| ) |
Function NearestObstacle()
Follows the line in search of an obstacle that is nearest to the starting to the line's starting point.
| aItem | the item to find collisions with |
| aKindMask | mask of obstacle types to take into account |
|
inline |
checks if this branch contains an updated version of the m_item from the root branch.
| int PNS::NODE::QueryColliding | ( | const ITEM * | aItem, |
| NODE::OBSTACLES & | aObstacles, | ||
| int | aKindMask = ITEM::ANY_T, |
||
| int | aLimitCount = -1, |
||
| bool | aDifferentNetsOnly = true, |
||
| int | aForceClearance = -1 |
||
| ) |
Function QueryColliding()
Finds items collliding (closer than clearance) with the item aItem.
| aItem | item to check collisions against |
| aObstacles | set of colliding objects found |
| aKindMask | mask of obstacle types to take into account |
| aLimitCount | stop looking for collisions after finding this number of colliding items |
| void PNS::NODE::Remove | ( | LINE & | aLine | ) |
Function Remove()
Just as the name says, removes a line from this branch.
| aLine | item to remove |
| void PNS::NODE::Remove | ( | SOLID * | aSolid | ) |
Function Remove()
Just as the name says, removes an item from this branch.
Function Replace()
Just as the name says, replaces an item with another one.
| aOldItem | item to be removed |
| aNewItem | item add instead |