KiCad PCB EDA Suite
Loading...
Searching...
No Matches
MOCK_RULE_RESOLVER Class Reference
Inheritance diagram for MOCK_RULE_RESOLVER:
PNS::RULE_RESOLVER

Classes

struct  ITEM_KEY
 

Public Member Functions

 MOCK_RULE_RESOLVER ()
 
virtual ~MOCK_RULE_RESOLVER ()
 
virtual int Clearance (const PNS::ITEM *aA, const PNS::ITEM *aB, bool aUseClearanceEpsilon=true) override
 
virtual PNS::NET_HANDLE DpCoupledNet (PNS::NET_HANDLE aNet) override
 
virtual int DpNetPolarity (PNS::NET_HANDLE aNet) override
 
virtual bool DpNetPair (const PNS::ITEM *aItem, PNS::NET_HANDLE &aNetP, PNS::NET_HANDLE &aNetN) override
 
virtual int NetCode (PNS::NET_HANDLE aNet) override
 
virtual wxString NetName (PNS::NET_HANDLE aNet) override
 
virtual bool QueryConstraint (PNS::CONSTRAINT_TYPE aType, const PNS::ITEM *aItemA, const PNS::ITEM *aItemB, int aLayer, PNS::CONSTRAINT *aConstraint) override
 
int ClearanceEpsilon () const override
 
bool IsInNetTie (const PNS::ITEM *aA) override
 
bool IsNetTieExclusion (const PNS::ITEM *aItem, const VECTOR2I &aCollisionPos, const PNS::ITEM *aCollidingItem) override
 
bool IsDrilledHole (const PNS::ITEM *aItem) override
 
bool IsNonPlatedSlot (const PNS::ITEM *aItem) override
 
bool IsKeepout (const PNS::ITEM *aObstacle, const PNS::ITEM *aItem, bool *aEnforce) override
 
void AddMockRule (PNS::CONSTRAINT_TYPE aType, const PNS::ITEM *aItemA, const PNS::ITEM *aItemB, PNS::CONSTRAINT &aConstraint)
 
virtual void ClearCacheForItems (std::vector< const ITEM * > &aItems)
 
virtual void ClearCaches ()
 
virtual void ClearTemporaryCaches ()
 

Public Attributes

int m_defaultClearance = 200000
 
int m_defaultHole2Hole = 220000
 
int m_defaultHole2Copper = 210000
 

Private Attributes

std::map< ITEM_KEY, PNS::CONSTRAINTm_ruleMap
 
int m_clearanceEpsilon
 

Detailed Description

Definition at line 90 of file test_pns_basics.cpp.

Constructor & Destructor Documentation

◆ MOCK_RULE_RESOLVER()

MOCK_RULE_RESOLVER::MOCK_RULE_RESOLVER ( )
inline

Definition at line 93 of file test_pns_basics.cpp.

◆ ~MOCK_RULE_RESOLVER()

virtual MOCK_RULE_RESOLVER::~MOCK_RULE_RESOLVER ( )
inlinevirtual

Definition at line 97 of file test_pns_basics.cpp.

Member Function Documentation

◆ AddMockRule()

void MOCK_RULE_RESOLVER::AddMockRule ( PNS::CONSTRAINT_TYPE  aType,
const PNS::ITEM aItemA,
const PNS::ITEM aItemB,
PNS::CONSTRAINT aConstraint 
)
inline

◆ Clearance()

◆ ClearanceEpsilon()

int MOCK_RULE_RESOLVER::ClearanceEpsilon ( ) const
inlineoverridevirtual

Reimplemented from PNS::RULE_RESOLVER.

Definition at line 214 of file test_pns_basics.cpp.

References m_clearanceEpsilon.

◆ ClearCacheForItems()

virtual void PNS::RULE_RESOLVER::ClearCacheForItems ( std::vector< const ITEM * > &  aItems)
inlinevirtualinherited

Reimplemented in PNS_PCBNEW_RULE_RESOLVER.

Definition at line 166 of file pns_node.h.

Referenced by PNS::NODE::releaseGarbage(), PNS::ROUTER::updateView(), and PNS::NODE::~NODE().

◆ ClearCaches()

virtual void PNS::RULE_RESOLVER::ClearCaches ( )
inlinevirtualinherited

Reimplemented in PNS_PCBNEW_RULE_RESOLVER.

Definition at line 167 of file pns_node.h.

Referenced by PNS::ROUTER::StartDragging(), and PNS::ROUTER::StartRouting().

◆ ClearTemporaryCaches()

virtual void PNS::RULE_RESOLVER::ClearTemporaryCaches ( )
inlinevirtualinherited

Reimplemented in PNS_PCBNEW_RULE_RESOLVER.

Definition at line 168 of file pns_node.h.

Referenced by PNS::ROUTER::Move().

◆ DpCoupledNet()

virtual PNS::NET_HANDLE MOCK_RULE_RESOLVER::DpCoupledNet ( PNS::NET_HANDLE  aNet)
inlineoverridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 157 of file test_pns_basics.cpp.

◆ DpNetPair()

virtual bool MOCK_RULE_RESOLVER::DpNetPair ( const PNS::ITEM aItem,
PNS::NET_HANDLE aNetP,
PNS::NET_HANDLE aNetN 
)
inlineoverridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 160 of file test_pns_basics.cpp.

◆ DpNetPolarity()

virtual int MOCK_RULE_RESOLVER::DpNetPolarity ( PNS::NET_HANDLE  aNet)
inlineoverridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 158 of file test_pns_basics.cpp.

◆ IsDrilledHole()

bool MOCK_RULE_RESOLVER::IsDrilledHole ( const PNS::ITEM aItem)
inlineoverridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 253 of file test_pns_basics.cpp.

◆ IsInNetTie()

bool MOCK_RULE_RESOLVER::IsInNetTie ( const PNS::ITEM aA)
inlineoverridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 245 of file test_pns_basics.cpp.

◆ IsKeepout()

bool MOCK_RULE_RESOLVER::IsKeepout ( const PNS::ITEM aObstacle,
const PNS::ITEM aItem,
bool *  aEnforce 
)
inlineoverridevirtual
Returns
true if aObstacle is a keepout. Set aEnforce if said keepout's rules exclude aItem.

Implements PNS::RULE_RESOLVER.

Definition at line 257 of file test_pns_basics.cpp.

◆ IsNetTieExclusion()

bool MOCK_RULE_RESOLVER::IsNetTieExclusion ( const PNS::ITEM aItem,
const VECTOR2I aCollisionPos,
const PNS::ITEM aCollidingItem 
)
inlineoverridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 247 of file test_pns_basics.cpp.

◆ IsNonPlatedSlot()

bool MOCK_RULE_RESOLVER::IsNonPlatedSlot ( const PNS::ITEM aItem)
inlineoverridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 255 of file test_pns_basics.cpp.

◆ NetCode()

virtual int MOCK_RULE_RESOLVER::NetCode ( PNS::NET_HANDLE  aNet)
inlineoverridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 166 of file test_pns_basics.cpp.

◆ NetName()

virtual wxString MOCK_RULE_RESOLVER::NetName ( PNS::NET_HANDLE  aNet)
inlineoverridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 171 of file test_pns_basics.cpp.

◆ QueryConstraint()

Member Data Documentation

◆ m_clearanceEpsilon

int MOCK_RULE_RESOLVER::m_clearanceEpsilon
private

Definition at line 280 of file test_pns_basics.cpp.

Referenced by ClearanceEpsilon().

◆ m_defaultClearance

int MOCK_RULE_RESOLVER::m_defaultClearance = 200000

Definition at line 274 of file test_pns_basics.cpp.

Referenced by QueryConstraint().

◆ m_defaultHole2Copper

int MOCK_RULE_RESOLVER::m_defaultHole2Copper = 210000

Definition at line 276 of file test_pns_basics.cpp.

Referenced by QueryConstraint().

◆ m_defaultHole2Hole

int MOCK_RULE_RESOLVER::m_defaultHole2Hole = 220000

Definition at line 275 of file test_pns_basics.cpp.

Referenced by QueryConstraint().

◆ m_ruleMap

std::map<ITEM_KEY, PNS::CONSTRAINT> MOCK_RULE_RESOLVER::m_ruleMap
private

Definition at line 279 of file test_pns_basics.cpp.

Referenced by AddMockRule(), and QueryConstraint().


The documentation for this class was generated from the following file: