KiCad PCB EDA Suite
PNS::OBSTACLE_VISITOR Class Referenceabstract

#include <pns_node.h>

Inheritance diagram for PNS::OBSTACLE_VISITOR:
PNS::HIT_VISITOR PNS::NODE::DEFAULT_OBSTACLE_VISITOR

Public Member Functions

 OBSTACLE_VISITOR (const ITEM *aItem)
 
virtual ~OBSTACLE_VISITOR ()
 
void SetWorld (const NODE *aNode, const NODE *aOverride=NULL)
 
virtual bool operator() (ITEM *aCandidate)=0
 

Protected Member Functions

bool visit (ITEM *aCandidate)
 

Protected Attributes

const ITEMm_item
 the item we are looking for collisions with More...
 
const NODEm_node
 node we are searching in (either root or a branch) More...
 
const NODEm_override
 node that overrides root entries More...
 
int m_extraClearance
 additional clearance More...
 

Detailed Description

Definition at line 112 of file pns_node.h.

Constructor & Destructor Documentation

◆ OBSTACLE_VISITOR()

PNS::OBSTACLE_VISITOR::OBSTACLE_VISITOR ( const ITEM aItem)

Definition at line 169 of file pns_node.cpp.

169  :
170  m_item( aItem ),
171  m_node( NULL ),
172  m_override( NULL ),
173  m_extraClearance( 0 )
174 {
175 }
const NODE * m_node
node we are searching in (either root or a branch)
Definition: pns_node.h:131
int m_extraClearance
additional clearance
Definition: pns_node.h:133
#define NULL
const ITEM * m_item
the item we are looking for collisions with
Definition: pns_node.h:129
const NODE * m_override
node that overrides root entries
Definition: pns_node.h:132

◆ ~OBSTACLE_VISITOR()

virtual PNS::OBSTACLE_VISITOR::~OBSTACLE_VISITOR ( )
inlinevirtual

Definition at line 117 of file pns_node.h.

118  {
119  }

Member Function Documentation

◆ operator()()

virtual bool PNS::OBSTACLE_VISITOR::operator() ( ITEM aCandidate)
pure virtual

◆ SetWorld()

void PNS::OBSTACLE_VISITOR::SetWorld ( const NODE aNode,
const NODE aOverride = NULL 
)

Definition at line 178 of file pns_node.cpp.

179 {
180  m_node = aNode;
181  m_override = aOverride;
182 }
const NODE * m_node
node we are searching in (either root or a branch)
Definition: pns_node.h:131
const NODE * m_override
node that overrides root entries
Definition: pns_node.h:132

References m_node, and m_override.

Referenced by PNS::NODE::HitTest(), and PNS::NODE::QueryColliding().

◆ visit()

bool PNS::OBSTACLE_VISITOR::visit ( ITEM aCandidate)
protected

Definition at line 185 of file pns_node.cpp.

186 {
187  // check if there is a more recent branch with a newer (possibly modified) version of this
188  // item.
189  if( m_override && m_override->Overrides( aCandidate ) )
190  return true;
191 
192  return false;
193 }
bool Overrides(ITEM *aItem) const
Definition: pns_node.h:379
const NODE * m_override
node that overrides root entries
Definition: pns_node.h:132

References m_override, and PNS::NODE::Overrides().

Referenced by PNS::NODE::DEFAULT_OBSTACLE_VISITOR::operator()().

Member Data Documentation

◆ m_extraClearance

int PNS::OBSTACLE_VISITOR::m_extraClearance
protected

additional clearance

Definition at line 133 of file pns_node.h.

Referenced by PNS::NODE::DEFAULT_OBSTACLE_VISITOR::DEFAULT_OBSTACLE_VISITOR().

◆ m_item

const ITEM* PNS::OBSTACLE_VISITOR::m_item
protected

the item we are looking for collisions with

Definition at line 129 of file pns_node.h.

Referenced by PNS::NODE::DEFAULT_OBSTACLE_VISITOR::operator()().

◆ m_node

const NODE* PNS::OBSTACLE_VISITOR::m_node
protected

node we are searching in (either root or a branch)

Definition at line 131 of file pns_node.h.

Referenced by PNS::NODE::DEFAULT_OBSTACLE_VISITOR::operator()(), and SetWorld().

◆ m_override

const NODE* PNS::OBSTACLE_VISITOR::m_override
protected

node that overrides root entries

Definition at line 132 of file pns_node.h.

Referenced by SetWorld(), and visit().


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