KiCad PCB EDA Suite
GENERAL_COLLECTORS_GUIDE Class Reference

Class GENERAL_COLLECTORS_GUIDE is 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)
 Constructor GENERAL_COLLECTORS_GUIDE grabs stuff from global preferences and uses reasonable defaults. More...
 
bool IsLayerLocked (PCB_LAYER_ID aLayerId) const override
 Function IsLayerLocked. More...
 
void SetLayerLocked (PCB_LAYER_ID aLayerId, bool isLocked)
 
bool IsLayerVisible (PCB_LAYER_ID aLayerId) const override
 Function IsLayerVisible. More...
 
void SetLayerVisible (PCB_LAYER_ID aLayerId, bool isVisible)
 
void SetLayerVisibleBits (LSET aLayerBits)
 
bool IgnoreLockedLayers () const override
 Function IgnoreLockedLayers. More...
 
void SetIgnoreLockedLayers (bool ignore)
 
bool IgnoreNonVisibleLayers () const override
 Function IgnoredNonVisibleLayers. More...
 
void SetIgnoreNonVisibleLayers (bool ignore)
 
PCB_LAYER_ID GetPreferredLayer () const override
 Function GetPreferredLayer. More...
 
void SetPreferredLayer (PCB_LAYER_ID aLayer)
 
bool IgnorePreferredLayer () const override
 Function IgnorePreferredLayer provides wildcard behavior regarding the preferred layer. More...
 
void SetIgnorePreferredLayer (bool ignore)
 
bool IgnoreLockedItems () const override
 Function IgnoreLockedItems. More...
 
void SetIgnoreLockedItems (bool ignore)
 
bool IncludeSecondary () const override
 Function IncludeSecondary determines if the secondary criteria, or 2nd choice items should be included. More...
 
void SetIncludeSecondary (bool include)
 
bool IgnoreMTextsMarkedNoShow () const override
 Function IgnoreMTextsMarkedNoShow. More...
 
void SetIgnoreMTextsMarkedNoShow (bool ignore)
 
bool IgnoreMTextsOnBack () const override
 Function IgnoreMTextsOnCu. More...
 
void SetIgnoreMTextsOnBack (bool ignore)
 
bool IgnoreMTextsOnFront () const override
 Function IgnoreMTextsOnFront. More...
 
void SetIgnoreMTextsOnFront (bool ignore)
 
bool IgnoreModulesOnBack () const override
 Function IgnoreModulesOnBack. More...
 
void SetIgnoreModulesOnBack (bool ignore)
 
bool IgnoreModulesOnFront () const override
 Function IgnoreModulesOnFront. More...
 
void SetIgnoreModulesOnFront (bool ignore)
 
bool IgnorePadsOnBack () const override
 Function IgnorePadsOnBack. More...
 
void SetIgnorePadsOnBack (bool ignore)
 
bool IgnorePadsOnFront () const override
 Function IgnorePadsOnFront. More...
 
void SetIgnorePadsOnFront (bool ignore)
 
bool IgnoreModulesVals () const override
 Function IgnoreModulesVals. More...
 
void SetIgnoreModulesVals (bool ignore)
 
bool IgnoreModulesRefs () const override
 Function IgnoreModulesRefs. More...
 
void SetIgnoreModulesRefs (bool ignore)
 
virtual bool IgnorePads () const
 Function IgnorePads. More...
 

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

Class GENERAL_COLLECTORS_GUIDE is 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 378 of file collectors.h.

Constructor & Destructor Documentation

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

Constructor GENERAL_COLLECTORS_GUIDE grabs 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 415 of file collectors.h.

416  {
417  m_PreferredLayer = aPreferredLayer;
418  m_IgnorePreferredLayer = false;
419  m_LayerVisible = aVisibleLayerMask;
420  m_IgnoreLockedLayers = true;
422  m_IgnoreLockedItems = false;
423 
424 #if defined(USE_MATCH_LAYER)
425  m_IncludeSecondary = false;
426 #else
427  m_IncludeSecondary = true;
428 #endif
429 
430  m_IgnoreMTextsMarkedNoShow = true; // g_ModuleTextNOVColor;
431  m_IgnoreMTextsOnBack = true;
432  m_IgnoreMTextsOnFront = false;
433  m_IgnoreModulesOnBack = true; // !Show_Modules_Cmp;
434  m_IgnoreModulesOnFront = false;
435 
436  m_IgnorePadsOnFront = false;
437  m_IgnorePadsOnBack = false;
438 
439  m_IgnoreModulesVals = false;
440  m_IgnoreModulesRefs = false;
441  }
PCB_LAYER_ID m_PreferredLayer
Definition: collectors.h:384
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:390

Member Function Documentation

PCB_LAYER_ID GENERAL_COLLECTORS_GUIDE::GetPreferredLayer ( ) const
inlineoverridevirtual

Function GetPreferredLayer.

Returns
int - the preferred layer for HitTest()ing.

Implements COLLECTORS_GUIDE.

Definition at line 492 of file collectors.h.

References m_PreferredLayer.

492 { return m_PreferredLayer; }
PCB_LAYER_ID m_PreferredLayer
Definition: collectors.h:384
bool GENERAL_COLLECTORS_GUIDE::IgnoreLockedItems ( ) const
inlineoverridevirtual

Function IgnoreLockedItems.

Returns
bool - true if should ignore locked items, else false.

Implements COLLECTORS_GUIDE.

Definition at line 509 of file collectors.h.

References m_IgnoreLockedItems.

509 { return m_IgnoreLockedItems; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreLockedLayers ( ) const
inlineoverridevirtual

Function IgnoreLockedLayers.

Returns
bool - true if should ignore locked layers, else false.

Implements COLLECTORS_GUIDE.

Definition at line 476 of file collectors.h.

References m_IgnoreLockedLayers.

476 { return m_IgnoreLockedLayers; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesOnBack ( ) const
inlineoverridevirtual

Function IgnoreModulesOnBack.

Returns
bool - true if should ignore MODULEs on the back side

Implements COLLECTORS_GUIDE.

Definition at line 548 of file collectors.h.

References m_IgnoreModulesOnBack.

548 { return m_IgnoreModulesOnBack; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesOnFront ( ) const
inlineoverridevirtual

Function IgnoreModulesOnFront.

Returns
bool - true if should ignore MODULEs on component layer.

Implements COLLECTORS_GUIDE.

Definition at line 555 of file collectors.h.

References m_IgnoreModulesOnFront.

555 { return m_IgnoreModulesOnFront; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesRefs ( ) const
inlineoverridevirtual

Function IgnoreModulesRefs.

Returns
bool - true if should ignore modules references.

Implements COLLECTORS_GUIDE.

Definition at line 583 of file collectors.h.

References m_IgnoreModulesRefs.

583 { return m_IgnoreModulesRefs; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreModulesVals ( ) const
inlineoverridevirtual

Function IgnoreModulesVals.

Returns
bool - true if should ignore modules values.

Implements COLLECTORS_GUIDE.

Definition at line 576 of file collectors.h.

References m_IgnoreModulesVals.

576 { return m_IgnoreModulesVals; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreMTextsMarkedNoShow ( ) const
inlineoverridevirtual

Function IgnoreMTextsMarkedNoShow.

Returns
bool - true if MTexts marked as "no show" should be ignored.

Implements COLLECTORS_GUIDE.

Definition at line 527 of file collectors.h.

References m_IgnoreMTextsMarkedNoShow.

527 { return m_IgnoreMTextsMarkedNoShow; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreMTextsOnBack ( ) const
inlineoverridevirtual

Function IgnoreMTextsOnCu.

Returns
bool - true if should ignore MTexts on back layers

Implements COLLECTORS_GUIDE.

Definition at line 534 of file collectors.h.

References m_IgnoreMTextsOnBack.

534 { return m_IgnoreMTextsOnBack; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreMTextsOnFront ( ) const
inlineoverridevirtual

Function IgnoreMTextsOnFront.

Returns
bool - true if should ignore MTexts on front layers

Implements COLLECTORS_GUIDE.

Definition at line 541 of file collectors.h.

References m_IgnoreMTextsOnFront.

541 { return m_IgnoreMTextsOnFront; }
bool GENERAL_COLLECTORS_GUIDE::IgnoreNonVisibleLayers ( ) const
inlineoverridevirtual

Function IgnoredNonVisibleLayers.

Returns
bool - true if should ignore non-visible layers, else false.

Implements COLLECTORS_GUIDE.

Definition at line 484 of file collectors.h.

References m_IgnoreNonVisibleLayers.

484 { return m_IgnoreNonVisibleLayers; }
virtual bool COLLECTORS_GUIDE::IgnorePads ( ) const
inlinevirtualinherited

Function IgnorePads.

Returns
bool - true if should ignore PADSs on Front side and Back side.

Definition at line 173 of file collectors.h.

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

Referenced by GENERAL_COLLECTOR::Inspect().

174  {
175  return IgnorePadsOnFront() && IgnorePadsOnBack();
176  }
virtual bool IgnorePadsOnFront() const =0
Function IgnorePadsOnFront.
virtual bool IgnorePadsOnBack() const =0
Function IgnorePadsOnBack.
bool GENERAL_COLLECTORS_GUIDE::IgnorePadsOnBack ( ) const
inlineoverridevirtual

Function IgnorePadsOnBack.

Returns
bool - true if should ignore Pads on Back Side.

Implements COLLECTORS_GUIDE.

Definition at line 562 of file collectors.h.

References m_IgnorePadsOnBack.

562 { return m_IgnorePadsOnBack; }
bool GENERAL_COLLECTORS_GUIDE::IgnorePadsOnFront ( ) const
inlineoverridevirtual

Function IgnorePadsOnFront.

Returns
bool - true if should ignore PADSs on Front Side.

Implements COLLECTORS_GUIDE.

Definition at line 569 of file collectors.h.

References m_IgnorePadsOnFront.

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

Function IgnorePreferredLayer provides wildcard behavior regarding the preferred layer.

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

Implements COLLECTORS_GUIDE.

Definition at line 501 of file collectors.h.

References m_IgnorePreferredLayer.

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

Function IncludeSecondary determines 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 519 of file collectors.h.

References m_IncludeSecondary.

519 { return m_IncludeSecondary; }
bool GENERAL_COLLECTORS_GUIDE::IsLayerLocked ( PCB_LAYER_ID  aLayerId) const
inlineoverridevirtual

Function IsLayerLocked.

Returns
bool - true if the given layer is locked, else false.

Implements COLLECTORS_GUIDE.

Definition at line 448 of file collectors.h.

449  {
450  return m_LayerLocked[aLayerId];
451  }
LSET m_LayerLocked
bit-mapped layer locked bits
Definition: collectors.h:387
bool GENERAL_COLLECTORS_GUIDE::IsLayerVisible ( PCB_LAYER_ID  aLayerId) const
inlineoverridevirtual

Function IsLayerVisible.

Returns
bool - true if the given layer is visible, else false.

Implements COLLECTORS_GUIDE.

Definition at line 462 of file collectors.h.

463  {
464  return m_LayerVisible[aLayerId];
465  }
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:390
void GENERAL_COLLECTORS_GUIDE::SetIgnoreLockedItems ( bool  ignore)
inline

Definition at line 510 of file collectors.h.

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

Definition at line 477 of file collectors.h.

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

Definition at line 549 of file collectors.h.

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

Definition at line 556 of file collectors.h.

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

Definition at line 584 of file collectors.h.

Referenced by MODULE_EDITOR_TOOLS::EnumeratePads().

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

Definition at line 577 of file collectors.h.

Referenced by MODULE_EDITOR_TOOLS::EnumeratePads().

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

Definition at line 535 of file collectors.h.

Referenced by MODULE_EDITOR_TOOLS::EnumeratePads().

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

Definition at line 542 of file collectors.h.

Referenced by MODULE_EDITOR_TOOLS::EnumeratePads().

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

Definition at line 485 of file collectors.h.

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

Definition at line 563 of file collectors.h.

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

Definition at line 570 of file collectors.h.

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

Definition at line 502 of file collectors.h.

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

Definition at line 520 of file collectors.h.

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

Definition at line 453 of file collectors.h.

454  {
455  m_LayerLocked.set( aLayerId, isLocked );
456  }
LSET m_LayerLocked
bit-mapped layer locked bits
Definition: collectors.h:387
void GENERAL_COLLECTORS_GUIDE::SetLayerVisible ( PCB_LAYER_ID  aLayerId,
bool  isVisible 
)
inline

Definition at line 466 of file collectors.h.

467  {
468  m_LayerVisible.set( aLayerId, isVisible );
469  }
LSET m_LayerVisible
bit-mapped layer visible bits
Definition: collectors.h:390
void GENERAL_COLLECTORS_GUIDE::SetLayerVisibleBits ( LSET  aLayerBits)
inline

Definition at line 470 of file collectors.h.

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

Definition at line 493 of file collectors.h.

493 { m_PreferredLayer = aLayer; }
PCB_LAYER_ID m_PreferredLayer
Definition: collectors.h:384

Member Data Documentation

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreLockedItems
private

Definition at line 393 of file collectors.h.

Referenced by IgnoreLockedItems().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreLockedLayers
private

Definition at line 388 of file collectors.h.

Referenced by IgnoreLockedLayers().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesOnBack
private

Definition at line 399 of file collectors.h.

Referenced by IgnoreModulesOnBack().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesOnFront
private

Definition at line 400 of file collectors.h.

Referenced by IgnoreModulesOnFront().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesRefs
private

Definition at line 404 of file collectors.h.

Referenced by IgnoreModulesRefs().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreModulesVals
private

Definition at line 403 of file collectors.h.

Referenced by IgnoreModulesVals().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreMTextsMarkedNoShow
private

Definition at line 396 of file collectors.h.

Referenced by IgnoreMTextsMarkedNoShow().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreMTextsOnBack
private

Definition at line 397 of file collectors.h.

Referenced by IgnoreMTextsOnBack().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreMTextsOnFront
private

Definition at line 398 of file collectors.h.

Referenced by IgnoreMTextsOnFront().

bool GENERAL_COLLECTORS_GUIDE::m_IgnoreNonVisibleLayers
private

Definition at line 391 of file collectors.h.

Referenced by IgnoreNonVisibleLayers().

bool GENERAL_COLLECTORS_GUIDE::m_IgnorePadsOnBack
private

Definition at line 402 of file collectors.h.

Referenced by IgnorePadsOnBack().

bool GENERAL_COLLECTORS_GUIDE::m_IgnorePadsOnFront
private

Definition at line 401 of file collectors.h.

Referenced by IgnorePadsOnFront().

bool GENERAL_COLLECTORS_GUIDE::m_IgnorePreferredLayer
private

Definition at line 385 of file collectors.h.

Referenced by IgnorePreferredLayer().

bool GENERAL_COLLECTORS_GUIDE::m_IncludeSecondary
private

Definition at line 394 of file collectors.h.

Referenced by IncludeSecondary().

LSET GENERAL_COLLECTORS_GUIDE::m_LayerLocked
private

bit-mapped layer locked bits

Definition at line 387 of file collectors.h.

LSET GENERAL_COLLECTORS_GUIDE::m_LayerVisible
private

bit-mapped layer visible bits

Definition at line 390 of file collectors.h.

PCB_LAYER_ID GENERAL_COLLECTORS_GUIDE::m_PreferredLayer
private

Definition at line 384 of file collectors.h.

Referenced by GetPreferredLayer().


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