KiCad PCB EDA Suite
Loading...
Searching...
No Matches
MOCK_PNS_KICAD_IFACE Class Reference
Inheritance diagram for MOCK_PNS_KICAD_IFACE:
PNS_KICAD_IFACE_BASE PNS::ROUTER_IFACE

Public Member Functions

 MOCK_PNS_KICAD_IFACE (PNS_TEST_FIXTURE *aFixture)
 
 ~MOCK_PNS_KICAD_IFACE () override
 
void HideItem (PNS::ITEM *aItem) override
 
void DisplayItem (const PNS::ITEM *aItem, int aClearance, bool aEdit=false, int aFlags=0) override
 
PNS::RULE_RESOLVERGetRuleResolver () override
 
void EraseView () override
 
void SetBoard (BOARD *aBoard)
 
void SyncWorld (PNS::NODE *aWorld) override
 
bool IsAnyLayerVisible (const PNS_LAYER_RANGE &aLayer) const override
 
bool IsFlashedOnLayer (const PNS::ITEM *aItem, int aLayer) const override
 
bool IsFlashedOnLayer (const PNS::ITEM *aItem, const PNS_LAYER_RANGE &aLayer) const override
 
bool IsItemVisible (const PNS::ITEM *aItem) const override
 
bool IsPNSCopperLayer (int aPNSLayer) const override
 
bool IsKicadCopperLayer (PCB_LAYER_ID aPcbnewLayer) const
 
void DisplayPathLine (const SHAPE_LINE_CHAIN &aLine, int aImportance) override
 
void DisplayRatline (const SHAPE_LINE_CHAIN &aRatline, PNS::NET_HANDLE aNet) override
 
void AddItem (PNS::ITEM *aItem) override
 
void UpdateItem (PNS::ITEM *aItem) override
 
void RemoveItem (PNS::ITEM *aItem) override
 
void Commit () override
 
bool ImportSizes (PNS::SIZES_SETTINGS &aSizes, PNS::ITEM *aStartItem, PNS::NET_HANDLE aNet, VECTOR2D aStartPosition) override
 
int StackupHeight (int aFirstLayer, int aSecondLayer) const override
 
int GetNetCode (PNS::NET_HANDLE aNet) const override
 
wxString GetNetName (PNS::NET_HANDLE aNet) const override
 
void UpdateNet (PNS::NET_HANDLE aNet) override
 
PNS::NET_HANDLE GetOrphanedNetHandle () override
 
void SetDebugDecorator (PNS::DEBUG_DECORATOR *aDec)
 
PCB_LAYER_ID GetBoardLayerFromPNSLayer (int aLayer) const override
 
int GetPNSLayerFromBoardLayer (PCB_LAYER_ID aLayer) const override
 
void SetStartLayerFromPCBNew (PCB_LAYER_ID aLayer)
 
void SetStartLayerFromPNS (int aLayer)
 
PNS_LAYER_RANGE SetLayersFromPCBNew (PCB_LAYER_ID aStartLayer, PCB_LAYER_ID aEndLayer)
 
virtual PNS::NODEGetWorld () const override
 
BOARDGetBoard () const
 
virtual EDA_UNITS GetUnits () const
 
PNS::DEBUG_DECORATORGetDebugDecorator () override
 

Protected Member Functions

std::vector< std::unique_ptr< PNS::SOLID > > syncPad (PAD *aPad)
 
std::unique_ptr< PNS::SEGMENTsyncTrack (PCB_TRACK *aTrack)
 
std::unique_ptr< PNS::ARCsyncArc (PCB_ARC *aArc)
 
std::unique_ptr< PNS::VIAsyncVia (PCB_VIA *aVia)
 
bool syncTextItem (PNS::NODE *aWorld, PCB_TEXT *aText, PCB_LAYER_ID aLayer)
 
bool syncGraphicalItem (PNS::NODE *aWorld, PCB_SHAPE *aItem)
 
bool syncZone (PNS::NODE *aWorld, ZONE *aZone, SHAPE_POLY_SET *aBoardOutline)
 
bool inheritTrackWidth (PNS::ITEM *aItem, int *aInheritedWidth)
 

Protected Attributes

PNS_PCBNEW_RULE_RESOLVERm_ruleResolver
 
PNS::DEBUG_DECORATORm_debugDecorator
 
PNS::NODEm_world
 
BOARDm_board
 
int m_startLayer
 

Private Attributes

PNS_TEST_FIXTUREm_testFixture
 

Detailed Description

Definition at line 285 of file test_pns_basics.cpp.

Constructor & Destructor Documentation

◆ MOCK_PNS_KICAD_IFACE()

MOCK_PNS_KICAD_IFACE::MOCK_PNS_KICAD_IFACE ( PNS_TEST_FIXTURE aFixture)
inline

Definition at line 288 of file test_pns_basics.cpp.

◆ ~MOCK_PNS_KICAD_IFACE()

MOCK_PNS_KICAD_IFACE::~MOCK_PNS_KICAD_IFACE ( )
inlineoverride

Definition at line 292 of file test_pns_basics.cpp.

Member Function Documentation

◆ AddItem()

void PNS_KICAD_IFACE_BASE::AddItem ( PNS::ITEM aItem)
overridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_KICAD_IFACE_GENERATOR.

Definition at line 2040 of file pns_kicad_iface.cpp.

◆ Commit()

void PNS_KICAD_IFACE_BASE::Commit ( )
inlineoverridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_KICAD_IFACE_GENERATOR.

Definition at line 74 of file pns_kicad_iface.h.

◆ DisplayItem()

void MOCK_PNS_KICAD_IFACE::DisplayItem ( const PNS::ITEM aItem,
int  aClearance,
bool  aEdit = false,
int  aFlags = 0 
)
inlineoverridevirtual

Reimplemented from PNS_KICAD_IFACE_BASE.

Definition at line 295 of file test_pns_basics.cpp.

◆ DisplayPathLine()

void PNS_KICAD_IFACE_BASE::DisplayPathLine ( const SHAPE_LINE_CHAIN aLine,
int  aImportance 
)
inlineoverridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 69 of file pns_kicad_iface.h.

◆ DisplayRatline()

void PNS_KICAD_IFACE_BASE::DisplayRatline ( const SHAPE_LINE_CHAIN aRatline,
PNS::NET_HANDLE  aNet 
)
inlineoverridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 70 of file pns_kicad_iface.h.

◆ EraseView()

void PNS_KICAD_IFACE_BASE::EraseView ( )
inlineoverridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 57 of file pns_kicad_iface.h.

◆ GetBoard()

BOARD * PNS_KICAD_IFACE_BASE::GetBoard ( ) const
inlineinherited

Definition at line 96 of file pns_kicad_iface.h.

References PNS_KICAD_IFACE_BASE::m_board.

Referenced by ROUTER_TOOL::saveRouterDebugLog().

◆ GetBoardLayerFromPNSLayer()

◆ GetDebugDecorator()

PNS::DEBUG_DECORATOR * PNS_KICAD_IFACE_BASE::GetDebugDecorator ( )
overridevirtualinherited

Implements PNS::ROUTER_IFACE.

Definition at line 1087 of file pns_kicad_iface.cpp.

References PNS_KICAD_IFACE_BASE::m_debugDecorator.

◆ GetNetCode()

int PNS_KICAD_IFACE_BASE::GetNetCode ( PNS::NET_HANDLE  aNet) const
inlineoverridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_LOG_PLAYER_KICAD_IFACE.

Definition at line 79 of file pns_kicad_iface.h.

◆ GetNetName()

wxString PNS_KICAD_IFACE_BASE::GetNetName ( PNS::NET_HANDLE  aNet) const
inlineoverridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_LOG_PLAYER_KICAD_IFACE.

Definition at line 80 of file pns_kicad_iface.h.

◆ GetOrphanedNetHandle()

PNS::NET_HANDLE PNS_KICAD_IFACE_BASE::GetOrphanedNetHandle ( )
overridevirtualinherited

Implements PNS::ROUTER_IFACE.

Definition at line 2222 of file pns_kicad_iface.cpp.

References NETINFO_LIST::OrphanedItem().

◆ GetPNSLayerFromBoardLayer()

◆ GetRuleResolver()

PNS::RULE_RESOLVER * MOCK_PNS_KICAD_IFACE::GetRuleResolver ( )
overridevirtual

Reimplemented from PNS_KICAD_IFACE_BASE.

Definition at line 322 of file test_pns_basics.cpp.

References PNS_TEST_FIXTURE::m_ruleResolver, and m_testFixture.

◆ GetUnits()

virtual EDA_UNITS PNS_KICAD_IFACE_BASE::GetUnits ( ) const
inlinevirtualinherited

Reimplemented in PNS_KICAD_IFACE.

Definition at line 98 of file pns_kicad_iface.h.

Referenced by PNS_KICAD_IFACE_BASE::syncZone().

◆ GetWorld()

virtual PNS::NODE * PNS_KICAD_IFACE_BASE::GetWorld ( ) const
inlineoverridevirtualinherited

Implements PNS::ROUTER_IFACE.

Definition at line 94 of file pns_kicad_iface.h.

References PNS_KICAD_IFACE_BASE::m_world.

◆ HideItem()

void MOCK_PNS_KICAD_IFACE::HideItem ( PNS::ITEM aItem)
inlineoverridevirtual

Reimplemented from PNS_KICAD_IFACE_BASE.

Definition at line 294 of file test_pns_basics.cpp.

◆ ImportSizes()

bool PNS_KICAD_IFACE_BASE::ImportSizes ( PNS::SIZES_SETTINGS aSizes,
PNS::ITEM aStartItem,
PNS::NET_HANDLE  aNet,
VECTOR2D  aStartPosition 
)
overridevirtualinherited

Implements PNS::ROUTER_IFACE.

Definition at line 654 of file pns_kicad_iface.cpp.

References _, PNS::ITEM::Anchor(), PNS::CT_CLEARANCE, PNS::CT_DIFF_PAIR_GAP, PNS::CT_HOLE_TO_HOLE, PNS::CT_VIA_DIAMETER, PNS::CT_VIA_HOLE, PNS::CT_WIDTH, VECTOR2< T >::Distance(), PNS_PCBNEW_RULE_RESOLVER::DpCoupledNet(), BOARD_DESIGN_SETTINGS::GetCurrentDiffPairGap(), BOARD_DESIGN_SETTINGS::GetCurrentDiffPairViaGap(), BOARD_DESIGN_SETTINGS::GetCurrentDiffPairWidth(), BOARD_DESIGN_SETTINGS::GetCurrentTrackWidth(), BOARD_DESIGN_SETTINGS::GetCurrentViaDrill(), BOARD_DESIGN_SETTINGS::GetCurrentViaSize(), BOARD::GetDesignSettings(), PNS_KICAD_IFACE_BASE::inheritTrackWidth(), PNS::ITEM::Kind(), PNS::ITEM::Layer(), PNS_KICAD_IFACE_BASE::m_board, BOARD_DESIGN_SETTINGS::m_HoleToHoleMin, BOARD_DESIGN_SETTINGS::m_MinClearance, BOARD_DESIGN_SETTINGS::m_MinThroughDrill, PNS::CONSTRAINT::m_RuleName, PNS_KICAD_IFACE_BASE::m_ruleResolver, PNS_KICAD_IFACE_BASE::m_startLayer, BOARD_DESIGN_SETTINGS::m_TempOverrideTrackWidth, BOARD_DESIGN_SETTINGS::m_TrackMinWidth, BOARD_DESIGN_SETTINGS::m_UseConnectedTrackWidth, PNS::CONSTRAINT::m_Value, BOARD_DESIGN_SETTINGS::m_ViasMinSize, MINOPTMAX< T >::Min(), PNS::ITEM::Net(), MINOPTMAX< T >::Opt(), PNS_PCBNEW_RULE_RESOLVER::QueryConstraint(), PNS::ITEM::SEGMENT_T, PNS::SIZES_SETTINGS::SetBoardMinTrackWidth(), PNS::SIZES_SETTINGS::SetClearance(), PNS::SIZES_SETTINGS::SetClearanceSource(), PNS::SIZES_SETTINGS::SetDiffPairGap(), PNS::SIZES_SETTINGS::SetDiffPairGapSource(), PNS::SIZES_SETTINGS::SetDiffPairHoleToHole(), PNS::SIZES_SETTINGS::SetDiffPairViaGap(), PNS::SIZES_SETTINGS::SetDiffPairViaGapSameAsTraceGap(), PNS::SIZES_SETTINGS::SetDiffPairWidth(), PNS::SIZES_SETTINGS::SetDiffPairWidthSource(), PNS::SEGMENT::SetEnds(), PNS::SIZES_SETTINGS::SetHoleToHole(), PNS::ITEM::SetLayer(), PNS::SIZES_SETTINGS::SetMinClearance(), PNS::ITEM::SetNet(), PNS::SIZES_SETTINGS::SetTrackWidth(), PNS::SIZES_SETTINGS::SetTrackWidthIsExplicit(), PNS::SIZES_SETTINGS::SetViaDiameter(), PNS::SIZES_SETTINGS::SetViaDrill(), PNS::SIZES_SETTINGS::SetWidthSource(), UNDEFINED_LAYER, BOARD_DESIGN_SETTINGS::UseNetClassDiffPair(), BOARD_DESIGN_SETTINGS::UseNetClassTrack(), BOARD_DESIGN_SETTINGS::UseNetClassVia(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by ROUTER_TOOL::onTrackViaSizeChanged(), and ROUTER_TOOL::prepareInteractive().

◆ inheritTrackWidth()

bool PNS_KICAD_IFACE_BASE::inheritTrackWidth ( PNS::ITEM aItem,
int *  aInheritedWidth 
)
protectedinherited

◆ IsAnyLayerVisible()

bool PNS_KICAD_IFACE_BASE::IsAnyLayerVisible ( const PNS_LAYER_RANGE aLayer) const
inlineoverridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 60 of file pns_kicad_iface.h.

◆ IsFlashedOnLayer() [1/2]

bool PNS_KICAD_IFACE_BASE::IsFlashedOnLayer ( const PNS::ITEM aItem,
const PNS_LAYER_RANGE aLayer 
) const
overridevirtualinherited

◆ IsFlashedOnLayer() [2/2]

bool PNS_KICAD_IFACE_BASE::IsFlashedOnLayer ( const PNS::ITEM aItem,
int  aLayer 
) const
overridevirtualinherited

◆ IsItemVisible()

bool PNS_KICAD_IFACE_BASE::IsItemVisible ( const PNS::ITEM aItem) const
inlineoverridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 63 of file pns_kicad_iface.h.

◆ IsKicadCopperLayer()

bool PNS_KICAD_IFACE_BASE::IsKicadCopperLayer ( PCB_LAYER_ID  aPcbnewLayer) const
inherited

◆ IsPNSCopperLayer()

bool PNS_KICAD_IFACE_BASE::IsPNSCopperLayer ( int  aPNSLayer) const
overridevirtualinherited

◆ RemoveItem()

void PNS_KICAD_IFACE_BASE::RemoveItem ( PNS::ITEM aItem)
overridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_KICAD_IFACE_GENERATOR.

Definition at line 1932 of file pns_kicad_iface.cpp.

◆ SetBoard()

void PNS_KICAD_IFACE_BASE::SetBoard ( BOARD aBoard)
inherited

◆ SetDebugDecorator()

void PNS_KICAD_IFACE_BASE::SetDebugDecorator ( PNS::DEBUG_DECORATOR aDec)
inherited

Definition at line 1786 of file pns_kicad_iface.cpp.

References PNS_KICAD_IFACE_BASE::m_debugDecorator.

◆ SetLayersFromPCBNew()

PNS_LAYER_RANGE PNS_KICAD_IFACE_BASE::SetLayersFromPCBNew ( PCB_LAYER_ID  aStartLayer,
PCB_LAYER_ID  aEndLayer 
)
inherited

◆ SetStartLayerFromPCBNew()

void PNS_KICAD_IFACE_BASE::SetStartLayerFromPCBNew ( PCB_LAYER_ID  aLayer)
inherited

◆ SetStartLayerFromPNS()

void PNS_KICAD_IFACE_BASE::SetStartLayerFromPNS ( int  aLayer)
inlineinherited

Definition at line 90 of file pns_kicad_iface.h.

References PNS_KICAD_IFACE_BASE::m_startLayer.

◆ StackupHeight()

int PNS_KICAD_IFACE_BASE::StackupHeight ( int  aFirstLayer,
int  aSecondLayer 
) const
overridevirtualinherited

◆ syncArc()

◆ syncGraphicalItem()

◆ syncPad()

◆ syncTextItem()

◆ syncTrack()

◆ syncVia()

◆ SyncWorld()

◆ syncZone()

◆ UpdateItem()

void PNS_KICAD_IFACE_BASE::UpdateItem ( PNS::ITEM aItem)
overridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE, and PNS_KICAD_IFACE_GENERATOR.

Definition at line 1957 of file pns_kicad_iface.cpp.

◆ UpdateNet()

void PNS_KICAD_IFACE_BASE::UpdateNet ( PNS::NET_HANDLE  aNet)
inlineoverridevirtualinherited

Implements PNS::ROUTER_IFACE.

Reimplemented in PNS_KICAD_IFACE.

Definition at line 81 of file pns_kicad_iface.h.

Member Data Documentation

◆ m_board

◆ m_debugDecorator

◆ m_ruleResolver

◆ m_startLayer

◆ m_testFixture

PNS_TEST_FIXTURE* MOCK_PNS_KICAD_IFACE::m_testFixture
private

Definition at line 300 of file test_pns_basics.cpp.

Referenced by GetRuleResolver().

◆ m_world

PNS::NODE* PNS_KICAD_IFACE_BASE::m_world
protectedinherited

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