KiCad PCB EDA Suite
GENERAL_COLLECTORS_GUIDE Class Reference

A general implementation of a COLLECTORS_GUIDE. More...

#include <collectors.h>

Inheritance diagram for GENERAL_COLLECTORS_GUIDE:
COLLECTORS_GUIDE

Public Member Functions

 GENERAL_COLLECTORS_GUIDE (LSET aVisibleLayerMask, PCB_LAYER_ID aPreferredLayer)
 Grab stuff from global preferences and uses reasonable defaults. More...
 
bool IsLayerLocked (PCB_LAYER_ID aLayerId) const override
 
void SetLayerLocked (PCB_LAYER_ID aLayerId, bool isLocked)
 
bool IsLayerVisible (PCB_LAYER_ID aLayerId) const override
 
void SetLayerVisible (PCB_LAYER_ID aLayerId, bool isVisible)
 
void SetLayerVisibleBits (LSET aLayerBits)
 
bool IgnoreLockedLayers () const override
 
void SetIgnoreLockedLayers (bool ignore)
 
bool IgnoreNonVisibleLayers () const override
 
void SetIgnoreNonVisibleLayers (bool ignore)
 
PCB_LAYER_ID GetPreferredLayer () const override
 
void SetPreferredLayer (PCB_LAYER_ID aLayer)
 
bool IgnorePreferredLayer () const override
 Provide wildcard behavior regarding the preferred layer. More...
 
void SetIgnorePreferredLayer (bool ignore)
 
bool IgnoreLockedItems () const override
 
void SetIgnoreLockedItems (bool ignore)
 
bool IncludeSecondary () const override
 Determine if the secondary criteria, or 2nd choice items should be included. More...
 
void SetIncludeSecondary (bool include)
 
bool IgnoreMTextsMarkedNoShow () const override
 
void SetIgnoreMTextsMarkedNoShow (bool ignore)
 
bool IgnoreMTextsOnBack () const override
 
void SetIgnoreMTextsOnBack (bool ignore)
 
bool IgnoreMTextsOnFront () const override
 
void SetIgnoreMTextsOnFront (bool ignore)
 
bool IgnoreModulesOnBack () const override
 
void SetIgnoreModulesOnBack (bool ignore)
 
bool IgnoreModulesOnFront () const override
 
void SetIgnoreModulesOnFront (bool ignore)
 
bool IgnorePadsOnBack () const override
 
void SetIgnorePadsOnBack (bool ignore)
 
bool IgnorePadsOnFront () const override
 
void SetIgnorePadsOnFront (bool ignore)
 
bool IgnoreModulesVals () const override
 
void SetIgnoreModulesVals (bool ignore)
 
bool IgnoreModulesRefs () const override
 
void SetIgnoreModulesRefs (bool ignore)
 
virtual bool IgnorePads () const
 

Private Attributes

PCB_LAYER_ID m_PreferredLayer
 
bool m_IgnorePreferredLayer
 
LSET m_LayerLocked
 bit-mapped layer locked bits More...
 
bool m_IgnoreLockedLayers
 
LSET m_LayerVisible
 bit-mapped layer visible bits More...
 
bool m_IgnoreNonVisibleLayers
 
bool m_IgnoreLockedItems
 
bool m_IncludeSecondary
 
bool m_IgnoreMTextsMarkedNoShow
 
bool m_IgnoreMTextsOnBack
 
bool m_IgnoreMTextsOnFront
 
bool m_IgnoreModulesOnBack
 
bool m_IgnoreModulesOnFront
 
bool m_IgnorePadsOnFront
 
bool m_IgnorePadsOnBack
 
bool m_IgnoreModulesVals
 
bool m_IgnoreModulesRefs
 

Detailed Description

A general implementation of a COLLECTORS_GUIDE.

One of its constructors is entitled to grab information from the program's global preferences.

Definition at line 351 of file collectors.h.

Constructor & Destructor Documentation

GENERAL_COLLECTORS_GUIDE::GENERAL_COLLECTORS_GUIDE ( LSET  aVisibleLayerMask,
PCB_LAYER_ID  aPreferredLayer 
)
inline

Grab stuff from global preferences and uses reasonable defaults.

Add more constructors as needed.

Parameters
aVisibleLayerMask= current visible layers (bit mask)
aPreferredLayer= the layer to search first

Definition at line 389 of file collectors.h.

390  {
391  m_PreferredLayer = aPreferredLayer;
392  m_IgnorePreferredLayer = false;
393  m_LayerVisible = aVisibleLayerMask;
394  m_IgnoreLockedLayers = true;
396  m_IgnoreLockedItems = false;
397 
398 #if defined(USE_MATCH_LAYER)
399  m_IncludeSecondary = false;
400 #else
401  m_IncludeSecondary = true;
402 #endif
403 
404  m_IgnoreMTextsMarkedNoShow = true; // g_ModuleTextNOVColor;
405  m_IgnoreMTextsOnBack = true;
406  m_IgnoreMTextsOnFront = false;
407  m_IgnoreModulesOnBack = true; // !Show_Modules_Cmp;
408  m_IgnoreModulesOnFront = false;
409 
410  m_IgnorePadsOnFront = false;
411  m_IgnorePadsOnBack = false;
412 
413  m_IgnoreModulesVals = false;
414  m_IgnoreModulesRefs = false;
415  }
PCB_LAYER_ID m_PreferredLayer
Definition: collectors.h:357
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:363

Member Function Documentation

PCB_LAYER_ID GENERAL_COLLECTORS_GUIDE::GetPreferredLayer ( ) const
inlineoverridevirtual
Returns
int - the preferred layer for HitTest()ing.

Implements COLLECTORS_GUIDE.

Definition at line 458 of file collectors.h.

References m_PreferredLayer.

458 { return m_PreferredLayer; }
PCB_LAYER_ID m_PreferredLayer
Definition: collectors.h:357
bool GENERAL_COLLECTORS_GUIDE::IgnoreLockedItems ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore locked items, else false.

Implements COLLECTORS_GUIDE.

Definition at line 472 of file collectors.h.

References m_IgnoreLockedItems.

472 { return m_IgnoreLockedItems; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreLockedLayers ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore locked layers, else false.

Implements COLLECTORS_GUIDE.

Definition at line 446 of file collectors.h.

References m_IgnoreLockedLayers.

446 { return m_IgnoreLockedLayers; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesOnBack ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore MODULEs on the back side

Implements COLLECTORS_GUIDE.

Definition at line 504 of file collectors.h.

References m_IgnoreModulesOnBack.

504 { return m_IgnoreModulesOnBack; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesOnFront ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore MODULEs on component layer.

Implements COLLECTORS_GUIDE.

Definition at line 510 of file collectors.h.

References m_IgnoreModulesOnFront.

510 { return m_IgnoreModulesOnFront; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesRefs ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore modules references.

Implements COLLECTORS_GUIDE.

Definition at line 534 of file collectors.h.

References m_IgnoreModulesRefs.

534 { return m_IgnoreModulesRefs; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesVals ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore modules values.

Implements COLLECTORS_GUIDE.

Definition at line 528 of file collectors.h.

References m_IgnoreModulesVals.

528 { return m_IgnoreModulesVals; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreMTextsMarkedNoShow ( ) const
inlineoverridevirtual
Returns
bool - true if MTexts marked as "no show" should be ignored.

Implements COLLECTORS_GUIDE.

Definition at line 486 of file collectors.h.

References m_IgnoreMTextsMarkedNoShow.

486 { return m_IgnoreMTextsMarkedNoShow; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreMTextsOnBack ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore MTexts on back layers

Implements COLLECTORS_GUIDE.

Definition at line 492 of file collectors.h.

References m_IgnoreMTextsOnBack.

492 { return m_IgnoreMTextsOnBack; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreMTextsOnFront ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore MTexts on front layers

Implements COLLECTORS_GUIDE.

Definition at line 498 of file collectors.h.

References m_IgnoreMTextsOnFront.

498 { return m_IgnoreMTextsOnFront; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreNonVisibleLayers ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore non-visible layers, else false.

Implements COLLECTORS_GUIDE.

Definition at line 452 of file collectors.h.

References m_IgnoreNonVisibleLayers.

452 { return m_IgnoreNonVisibleLayers; }
virtual bool COLLECTORS_GUIDE::IgnorePads ( ) const
inlinevirtualinherited
Returns
bool - true if should ignore PADSs on Front side and Back side.

Definition at line 151 of file collectors.h.

References COLLECTORS_GUIDE::IgnorePadsOnBack(), and COLLECTORS_GUIDE::IgnorePadsOnFront().

Referenced by GENERAL_COLLECTOR::Inspect().

152  {
153  return IgnorePadsOnFront() && IgnorePadsOnBack();
154  }
virtual bool IgnorePadsOnFront() const =0
virtual bool IgnorePadsOnBack() const =0
bool GENERAL_COLLECTORS_GUIDE::IgnorePadsOnBack ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore Pads on Back Side.

Implements COLLECTORS_GUIDE.

Definition at line 516 of file collectors.h.

References m_IgnorePadsOnBack.

516 { return m_IgnorePadsOnBack; }
bool GENERAL_COLLECTORS_GUIDE::IgnorePadsOnFront ( ) const
inlineoverridevirtual
Returns
bool - true if should ignore PADSs on Front Side.

Implements COLLECTORS_GUIDE.

Definition at line 522 of file collectors.h.

References m_IgnorePadsOnFront.

522 { return m_IgnorePadsOnFront; }
bool GENERAL_COLLECTORS_GUIDE::IgnorePreferredLayer ( ) const
inlineoverridevirtual

Provide wildcard behavior regarding the preferred layer.

Returns
bool - true if should ignore preferred layer, else false.

Implements COLLECTORS_GUIDE.

Definition at line 466 of file collectors.h.

References m_IgnorePreferredLayer.

466 { return m_IgnorePreferredLayer; }
bool GENERAL_COLLECTORS_GUIDE::IncludeSecondary ( ) const
inlineoverridevirtual

Determine if the secondary criteria, or 2nd choice items should be included.

Returns
bool - true if should include, else false.

Implements COLLECTORS_GUIDE.

Definition at line 480 of file collectors.h.

References m_IncludeSecondary.

480 { return m_IncludeSecondary; }
bool GENERAL_COLLECTORS_GUIDE::IsLayerLocked ( PCB_LAYER_ID  aLayerId) const
inlineoverridevirtual
Returns
bool - true if the given layer is locked, else false.

Implements COLLECTORS_GUIDE.

Definition at line 420 of file collectors.h.

421  {
422  return m_LayerLocked[aLayerId];
423  }
LSET m_LayerLocked
bit-mapped layer locked bits
Definition: collectors.h:360
bool GENERAL_COLLECTORS_GUIDE::IsLayerVisible ( PCB_LAYER_ID  aLayerId) const
inlineoverridevirtual
Returns
bool - true if the given layer is visible, else false.

Implements COLLECTORS_GUIDE.

Definition at line 433 of file collectors.h.

434  {
435  return m_LayerVisible[aLayerId];
436  }
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:363
void GENERAL_COLLECTORS_GUIDE::SetIgnoreLockedItems ( bool  ignore)
inline

Definition at line 473 of file collectors.h.

473 { m_IgnoreLockedItems = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreLockedLayers ( bool  ignore)
inline

Definition at line 447 of file collectors.h.

447 { m_IgnoreLockedLayers = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesOnBack ( bool  ignore)
inline

Definition at line 505 of file collectors.h.

505 { m_IgnoreModulesOnBack = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesOnFront ( bool  ignore)
inline

Definition at line 511 of file collectors.h.

511 { m_IgnoreModulesOnFront = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesRefs ( bool  ignore)
inline

Definition at line 535 of file collectors.h.

Referenced by MODULE_EDITOR_TOOLS::EnumeratePads().

535 { m_IgnoreModulesRefs = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreModulesVals ( bool  ignore)
inline

Definition at line 529 of file collectors.h.

Referenced by MODULE_EDITOR_TOOLS::EnumeratePads().

529 { m_IgnoreModulesVals = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreMTextsMarkedNoShow ( bool  ignore)
inline
void GENERAL_COLLECTORS_GUIDE::SetIgnoreMTextsOnBack ( bool  ignore)
inline

Definition at line 493 of file collectors.h.

Referenced by MODULE_EDITOR_TOOLS::EnumeratePads().

493 { m_IgnoreMTextsOnBack = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreMTextsOnFront ( bool  ignore)
inline

Definition at line 499 of file collectors.h.

Referenced by MODULE_EDITOR_TOOLS::EnumeratePads().

499 { m_IgnoreMTextsOnFront = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnoreNonVisibleLayers ( bool  ignore)
inline

Definition at line 453 of file collectors.h.

453 { m_IgnoreLockedLayers = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnorePadsOnBack ( bool  ignore)
inline

Definition at line 517 of file collectors.h.

517 { m_IgnorePadsOnBack = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnorePadsOnFront ( bool  ignore)
inline

Definition at line 523 of file collectors.h.

523 { m_IgnorePadsOnFront = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIgnorePreferredLayer ( bool  ignore)
inline

Definition at line 467 of file collectors.h.

467 { m_IgnorePreferredLayer = ignore; }
void GENERAL_COLLECTORS_GUIDE::SetIncludeSecondary ( bool  include)
inline

Definition at line 481 of file collectors.h.

481 { m_IncludeSecondary = include; }
void GENERAL_COLLECTORS_GUIDE::SetLayerLocked ( PCB_LAYER_ID  aLayerId,
bool  isLocked 
)
inline

Definition at line 425 of file collectors.h.

426  {
427  m_LayerLocked.set( aLayerId, isLocked );
428  }
LSET m_LayerLocked
bit-mapped layer locked bits
Definition: collectors.h:360
void GENERAL_COLLECTORS_GUIDE::SetLayerVisible ( PCB_LAYER_ID  aLayerId,
bool  isVisible 
)
inline

Definition at line 437 of file collectors.h.

438  {
439  m_LayerVisible.set( aLayerId, isVisible );
440  }
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:363
void GENERAL_COLLECTORS_GUIDE::SetLayerVisibleBits ( LSET  aLayerBits)
inline

Definition at line 441 of file collectors.h.

441 { m_LayerVisible = aLayerBits; }
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:363
void GENERAL_COLLECTORS_GUIDE::SetPreferredLayer ( PCB_LAYER_ID  aLayer)
inline

Definition at line 459 of file collectors.h.

459 { m_PreferredLayer = aLayer; }
PCB_LAYER_ID m_PreferredLayer
Definition: collectors.h:357

Member Data Documentation

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreLockedItems
private

Definition at line 366 of file collectors.h.

Referenced by IgnoreLockedItems().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreLockedLayers
private

Definition at line 361 of file collectors.h.

Referenced by IgnoreLockedLayers().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesOnBack
private

Definition at line 372 of file collectors.h.

Referenced by IgnoreModulesOnBack().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesOnFront
private

Definition at line 373 of file collectors.h.

Referenced by IgnoreModulesOnFront().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesRefs
private

Definition at line 377 of file collectors.h.

Referenced by IgnoreModulesRefs().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesVals
private

Definition at line 376 of file collectors.h.

Referenced by IgnoreModulesVals().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreMTextsMarkedNoShow
private

Definition at line 369 of file collectors.h.

Referenced by IgnoreMTextsMarkedNoShow().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreMTextsOnBack
private

Definition at line 370 of file collectors.h.

Referenced by IgnoreMTextsOnBack().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreMTextsOnFront
private

Definition at line 371 of file collectors.h.

Referenced by IgnoreMTextsOnFront().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreNonVisibleLayers
private

Definition at line 364 of file collectors.h.

Referenced by IgnoreNonVisibleLayers().

bool GENERAL_COLLECTORS_GUIDE::m_IgnorePadsOnBack
private

Definition at line 375 of file collectors.h.

Referenced by IgnorePadsOnBack().

bool GENERAL_COLLECTORS_GUIDE::m_IgnorePadsOnFront
private

Definition at line 374 of file collectors.h.

Referenced by IgnorePadsOnFront().

bool GENERAL_COLLECTORS_GUIDE::m_IgnorePreferredLayer
private

Definition at line 358 of file collectors.h.

Referenced by IgnorePreferredLayer().

bool GENERAL_COLLECTORS_GUIDE::m_IncludeSecondary
private

Definition at line 367 of file collectors.h.

Referenced by IncludeSecondary().

LSET GENERAL_COLLECTORS_GUIDE::m_LayerLocked
private

bit-mapped layer locked bits

Definition at line 360 of file collectors.h.

LSET GENERAL_COLLECTORS_GUIDE::m_LayerVisible
private

bit-mapped layer visible bits

Definition at line 363 of file collectors.h.

PCB_LAYER_ID GENERAL_COLLECTORS_GUIDE::m_PreferredLayer
private

Definition at line 357 of file collectors.h.

Referenced by GetPreferredLayer().


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