KiCad PCB EDA Suite
PNS::ALGO_BASE Class Reference

ALGO_BASE. More...

#include <pns_algo_base.h>

Inheritance diagram for PNS::ALGO_BASE:
PNS::DRAG_ALGO PNS::PLACEMENT_ALGO PNS::SHOVE PNS::WALKAROUND PNS::COMPONENT_DRAGGER PNS::DRAGGER PNS::DIFF_PAIR_PLACER PNS::LINE_PLACER PNS::MEANDER_PLACER_BASE PNS::DP_MEANDER_PLACER PNS::MEANDER_PLACER PNS::MEANDER_SKEW_PLACER

Public Member Functions

 ALGO_BASE (ROUTER *aRouter)
 
virtual ~ALGO_BASE ()
 
ROUTERRouter () const
 

Returns the instance of our router

More...
 
ROUTING_SETTINGSSettings () const
 

Returns current router settings

More...
 
virtual LOGGERLogger ()
 

Returns the logger object, allowing to dump geometry to a file.

More...
 
void SetLogger (LOGGER *aLogger)
 
void SetDebugDecorator (DEBUG_DECORATOR *aDecorator)
 Function SetDebugDecorator. More...
 
DEBUG_DECORATORDbg () const
 

Protected Attributes

DEBUG_DECORATORm_debugDecorator
 
ROUTERm_router
 
LOGGERm_logger
 

Detailed Description

ALGO_BASE.

Base class for all P&S algorithms (shoving, walkaround, line placement, dragging, etc.) Holds a bunch of objects commonly used by all algorithms (P&S settings, parent router instance, logging)

Definition at line 39 of file pns_algo_base.h.

Constructor & Destructor Documentation

◆ ALGO_BASE()

PNS::ALGO_BASE::ALGO_BASE ( ROUTER aRouter)
inline

Definition at line 42 of file pns_algo_base.h.

42  :
43  m_debugDecorator( nullptr ),
44  m_router( aRouter ),
45  m_logger( nullptr )
46  {}
LOGGER * m_logger
Definition: pns_algo_base.h:85
ROUTER * m_router
Definition: pns_algo_base.h:84
DEBUG_DECORATOR * m_debugDecorator
Definition: pns_algo_base.h:83

◆ ~ALGO_BASE()

virtual PNS::ALGO_BASE::~ALGO_BASE ( )
inlinevirtual

Definition at line 48 of file pns_algo_base.h.

48 {}

Member Function Documentation

◆ Dbg()

◆ Logger()

LOGGER * PNS::ALGO_BASE::Logger ( )
virtual

Returns the logger object, allowing to dump geometry to a file.

Reimplemented in PNS::SHOVE.

Definition at line 34 of file pns_algo_base.cpp.

35 {
36  return NULL;
37 }
#define NULL

References NULL.

Referenced by PNS::DRAGGER::dragWalkaround(), PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkOnly(), and PNS::DRAGGER::Start().

◆ Router()

◆ SetDebugDecorator()

void PNS::ALGO_BASE::SetDebugDecorator ( DEBUG_DECORATOR aDecorator)
inline

Function SetDebugDecorator.

Assign a debug decorator allowing this algo to draw extra graphics for visual debugging

Definition at line 72 of file pns_algo_base.h.

73  {
74  m_debugDecorator = aDecorator;
75  }
DEBUG_DECORATOR * m_debugDecorator
Definition: pns_algo_base.h:83

References m_debugDecorator.

Referenced by PNS::DRAGGER::dragWalkaround(), PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkOnly(), and PNS::SHOVE::SHOVE().

◆ SetLogger()

void PNS::ALGO_BASE::SetLogger ( LOGGER aLogger)
inline

Definition at line 62 of file pns_algo_base.h.

63  {
64  m_logger = aLogger;
65  }
LOGGER * m_logger
Definition: pns_algo_base.h:85

References m_logger.

Referenced by PNS::DRAGGER::dragWalkaround(), PNS::LINE_PLACER::rhShoveOnly(), and PNS::LINE_PLACER::rhWalkOnly().

◆ Settings()

Member Data Documentation

◆ m_debugDecorator

DEBUG_DECORATOR* PNS::ALGO_BASE::m_debugDecorator
protected

Definition at line 83 of file pns_algo_base.h.

Referenced by Dbg(), and SetDebugDecorator().

◆ m_logger

LOGGER* PNS::ALGO_BASE::m_logger
protected

Definition at line 85 of file pns_algo_base.h.

Referenced by SetLogger(), and PNS::WALKAROUND::singleStep().

◆ m_router

ROUTER* PNS::ALGO_BASE::m_router
protected

Definition at line 84 of file pns_algo_base.h.

Referenced by Router(), and Settings().


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