KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LSET Class Reference

LSET is a set of PCB_LAYER_IDs. More...

#include <lset.h>

Inheritance diagram for LSET:
BASE_SET

Classes

class  all_set_layers_iterator
 
class  copper_layers_iterator
 
class  non_copper_layers_iterator
 

Public Member Functions

 LSET ()
 Create an empty (cleared) set.
 
 LSET (const BASE_SET &aOther)
 
 LSET (std::initializer_list< PCB_LAYER_ID > aList)
 
 LSET (const std::vector< PCB_LAYER_ID > &aList)
 
 LSET (const LSEQ &aSeq)
 
 LSET (const LAYER_RANGE &aRange)
 
 LSET (unsigned long __val)=delete
 
bool Contains (PCB_LAYER_ID aLayer) const
 See if the layer set contains a PCB layer.
 
LSEQ CuStack () const
 Return a sequence of copper layers in starting from the front/top and extending to the back/bottom.
 
LSEQ TechAndUserUIOrder () const
 Return the technical and user layers in the order shown in layer widget.
 
LSEQ UIOrder () const
 Return the copper, technical and user layers in the order shown in layer widget.
 
LSEQ Seq (const LSEQ &aSequence) const
 Return an LSEQ from the union of this LSET and a desired sequence.
 
LSEQ Seq () const
 Return a LSEQ from this LSET in ascending PCB_LAYER_ID order.
 
LSEQ SeqStackupTop2Bottom (PCB_LAYER_ID aSelectedLayer=UNDEFINED_LAYER) const
 Generate a sequence of layers that represent a top to bottom stack of this set of layers.
 
LSEQ SeqStackupForPlotting () const
 Return the sequence that is typical for a bottom-to-top stack-up.
 
void RunOnLayers (const std::function< void(PCB_LAYER_ID)> &aFunction) const
 Execute a function on each layer of the LSET.
 
PCB_LAYER_ID ExtractLayer () const
 Find the first set PCB_LAYER_ID.
 
LSETFlipStandardLayers (int aCopperLayersCount=0)
 Flip the layers in this set.
 
LSETClearCopperLayers ()
 Clear the copper layers in this set.
 
LSETClearNonCopperLayers ()
 Clear the non-copper layers in this set.
 
LSETClearUserDefinedLayers ()
 Clear the user defined layers in this set.
 
all_set_layers_iterator begin () const
 
all_set_layers_iterator end () const
 
copper_layers_iterator copper_layers_begin () const
 
copper_layers_iterator copper_layers_end () const
 
non_copper_layers_iterator non_copper_layers_begin () const
 
non_copper_layers_iterator non_copper_layers_end () const
 
iterator begin ()
 
iterator end ()
 
BASE_SETset (size_t pos)
 
BASE_SETset (size_t pos, bool value)
 
BASE_SETset ()
 
BASE_SETreset (size_t pos)
 
BASE_SETreset ()
 
BASE_SETflip (size_t pos)
 
BASE_SETflip ()
 
BASE_SET operator~ () const
 
BASE_SEToperator&= (const BASE_SET &other)
 
BASE_SEToperator|= (const BASE_SET &other)
 
BASE_SEToperator^= (const BASE_SET &other)
 
int compare (const BASE_SET &other) const
 
bool operator< (const BASE_SET &other) const
 
std::string FmtBin () const
 Return a binary string showing contents of this set.
 
std::string FmtHex () const
 Return a hex string showing contents of this set.
 
int ParseHex (const std::string &str)
 Convert the output of FmtHex() and replaces this set's values with those given in the input string.
 
int ParseHex (const char *aStart, int aCount)
 Convert the output of FmtHex() and replaces this set's values with those given in the input string.
 
set_bits_iterator set_bits_begin () const
 
set_bits_iterator set_bits_end () const
 
set_bits_reverse_iterator set_bits_rbegin () const
 
set_bits_reverse_iterator set_bits_rend () const
 

Static Public Member Functions

static wxString Name (PCB_LAYER_ID aLayerId)
 Return the fixed name association with aLayerId.
 
static int NameToLayer (wxString &aName)
 Return the layer number from a layer name.
 
static bool IsBetween (PCB_LAYER_ID aStart, PCB_LAYER_ID aEnd, PCB_LAYER_ID aLayer)
 Return true if aLayer is between aStart and aEnd, inclusive.
 
static const LSETInternalCuMask ()
 Return a complete set of internal copper layers which is all Cu layers except F_Cu and B_Cu.
 
static const LSETFrontAssembly ()
 Return a complete set of all top assembly layers which is all F_SilkS and F_Mask.
 
static const LSETBackAssembly ()
 Return a complete set of all bottom assembly layers which is all B_SilkS and B_Mask.
 
static LSET AllCuMask (int aCuLayerCount)
 Return a mask holding the requested number of Cu PCB_LAYER_IDs.
 
static LSET AllCuMask ()
 return AllCuMask( MAX_CU_LAYERS );
 
static const LSETExternalCuMask ()
 Return a mask holding the Front and Bottom layers.
 
static LSET AllNonCuMask ()
 Return a mask holding all layer minus CU layers.
 
static const LSETAllLayersMask ()
 
static const LSETFrontTechMask ()
 Return a mask holding all technical layers (no CU layer) on front side.
 
static const LSETFrontBoardTechMask ()
 Return a mask holding technical layers used in a board fabrication (no CU layer) on front side.
 
static const LSETBackTechMask ()
 Return a mask holding all technical layers (no CU layer) on back side.
 
static const LSETBackBoardTechMask ()
 Return a mask holding technical layers used in a board fabrication (no CU layer) on Back side.
 
static const LSETAllTechMask ()
 Return a mask holding all technical layers (no CU layer) on both side.
 
static const LSETAllBoardTechMask ()
 Return a mask holding board technical layers (no CU layer) on both side.
 
static const LSETFrontMask ()
 Return a mask holding all technical layers and the external CU layer on front side.
 
static const LSETBackMask ()
 Return a mask holding all technical layers and the external CU layer on back side.
 
static const LSETSideSpecificMask ()
 
static const LSETUserMask ()
 
static const LSETPhysicalLayersMask ()
 Return a mask holding all layers which are physically realized.
 
static LSET UserDefinedLayersMask (int aUserDefinedLayerCount=MAX_USER_DEFINED_LAYERS)
 Return a mask with the requested number of user defined layers.
 
static int LayerCount (PCB_LAYER_ID aStart, PCB_LAYER_ID aEnd, int aCopperLayerCount)
 Return the number of layers between aStart and aEnd, inclusive.
 

Detailed Description

LSET is a set of PCB_LAYER_IDs.

It can be converted to numerous purpose LSEQs using the various member functions, most of which are based on Seq(). The advantage of converting to LSEQ using purposeful code, is it removes any dependency on order/sequence inherent in this set.

Definition at line 36 of file lset.h.

Constructor & Destructor Documentation

◆ LSET() [1/7]

◆ LSET() [2/7]

LSET::LSET ( const BASE_SET & aOther)
inline

Definition at line 45 of file lset.h.

References BASE_SET::BASE_SET().

◆ LSET() [3/7]

LSET::LSET ( std::initializer_list< PCB_LAYER_ID > aList)

Definition at line 44 of file lset.cpp.

References LSET(), and BASE_SET::set().

◆ LSET() [4/7]

LSET::LSET ( const std::vector< PCB_LAYER_ID > & aList)

Definition at line 54 of file lset.cpp.

References LSET(), and BASE_SET::set().

◆ LSET() [5/7]

LSET::LSET ( const LSEQ & aSeq)

Definition at line 65 of file lset.cpp.

References LSET(), and BASE_SET::set().

◆ LSET() [6/7]

LSET::LSET ( const LAYER_RANGE & aRange)

Definition at line 76 of file lset.cpp.

References BASE_SET::set().

◆ LSET() [7/7]

LSET::LSET ( unsigned long __val)
delete

Member Function Documentation

◆ AllBoardTechMask()

const LSET & LSET::AllBoardTechMask ( )
static

Return a mask holding board technical layers (no CU layer) on both side.

Definition at line 666 of file lset.cpp.

References BackBoardTechMask(), FrontBoardTechMask(), and LSET().

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getKiCadLayerSet(), PhysicalLayersMask(), ALTIUM_PCB::remapUnsureLayers(), and CADSTAR_PCB_ARCHIVE_LOADER::remapUnsureLayers().

◆ AllCuMask() [1/2]

LSET LSET::AllCuMask ( )
static

return AllCuMask( MAX_CU_LAYERS );

Definition at line 591 of file lset.cpp.

References allCuMask(), LSET(), and MAX_CU_LAYERS.

Referenced by DIALOG_PAD_PROPERTIES::afterPadstackModeChanged(), DIALOG_TRACK_VIA_PROPERTIES::afterPadstackModeChanged(), AllCuMask(), DIALOG_PLOT::applyPlotSettings(), CN_CONNECTIVITY_ALGO::Build(), DSN::SPECCTRA_DB::buildLayerMaps(), TRACKS_CLEANER::cleanup(), compute_pad_access_code(), ODB_NET_LIST::ComputePadAccessSide(), PCBNEW_JOBS_HANDLER::convertLayerArg(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DRAWING_TOOL::DrawVia(), ZONE_FILLER::Fill(), fmt_mask(), footprintVsBoardStackup(), PCB_IO_KICAD_SEXPR::formatLayers(), DSN::SPECCTRA_DB::FromBOARD(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::getCustomLayersFromControls(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadLayerSet(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), PCB_VIA::GetLayerSet(), ROUTER_TOOL::handleLayerSwitch(), PCB_IO_KICAD_SEXPR_PARSER::init(), BOARD_INSPECTION_TOOL::InspectClearance(), HYPERLYNX_PAD_STACK::IsEmpty(), isMaskAperture(), BOARD_ITEM::layerMaskDescribe(), PCB_CONTROL::LayerNext(), PCB_CONTROL::LayerPrev(), PCB_IO_KICAD_LEGACY::leg_mask2new(), CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryCoppers(), DSN::SPECCTRA_DB::makeIMAGE(), DSN::SPECCTRA_DB::makePADSTACK(), DIALOG_PRINT_PCBNEW::onPopUpLayers(), DIALOG_PLOT::OnRightClickLayers(), DIALOG_PAD_PROPERTIES::OnUpdateUI(), PANEL_DISPLAY_OPTIONS::PANEL_DISPLAY_OPTIONS(), GPCB_FPL_CACHE::parseFOOTPRINT(), PCB_IO_KICAD_SEXPR_PARSER::parseFootprintStackup(), DRC_RULES_PARSER::parseLayer(), PCB_IO_KICAD_SEXPR_PARSER::parsePAD(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_VIA(), PhysicalLayersMask(), BRDITEMS_PLOTTER::PlotPad(), BRDITEMS_PLOTTER::PlotShape(), PlotStandardLayer(), BOARD_COMMIT::propagateDamage(), PAD::PTHMask(), PCB_LAYER_BOX_SELECTOR::Resync(), DRC_CACHE_GENERATOR::Run(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), SELECT_LAYER_DIALOG::SELECT_LAYER_DIALOG(), PCB_SELECTION_TOOL::selectAllConnectedTracks(), PAD::SetAttribute(), PANEL_SETUP_LAYERS::setCopperLayerCheckBoxes(), BOARD_DESIGN_SETTINGS::SetCopperLayerCount(), PANEL_SETUP_LAYERS::showLayerTypes(), SideSpecificMask(), PANEL_SETUP_LAYERS::SyncCopperLayers(), DRC_TEST_PROVIDER_MISC::testDisabledLayers(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadClearances(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances(), DIALOG_SWAP_LAYERS::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::transferDataToPad(), DIALOG_SWAP_LAYERS::TransferDataToWindow(), PANEL_SETUP_BOARD_STACKUP::updateCopperLayerCount(), FOOTPRINT_EDIT_FRAME::updateEnabledLayers(), PCB_CONTROL::UpdateMessagePanel(), RATSNEST_VIEW_ITEM::ViewDraw(), PCB_VIA::ViewGetLayers(), GBR_TO_PCB_EXPORTER::writePcbHeader(), and HYPERLYNX_EXPORTER::writeSinglePadStack().

◆ AllCuMask() [2/2]

LSET LSET::AllCuMask ( int aCuLayerCount)
static

Return a mask holding the requested number of Cu PCB_LAYER_IDs.

Definition at line 582 of file lset.cpp.

References AllCuMask(), allCuMask(), LSET(), and MAX_CU_LAYERS.

Referenced by PCAD2KICAD::PCAD_PAD::AddToFootprint(), PCB_CONTROL::ApplyDesignBlockLayout(), MULTICHANNEL_TOOL::AutogenerateRuleAreas(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), EXPORTER_STEP::buildZones3DShape(), FOOTPRINT::CheckShortingPads(), HYPERLYNX_EXPORTER::collectNetObjects(), EXPORTER_PCB_VRML::ComputeLayer3D_Zpos(), PCB_PLOTTER::copperLayerShouldBeSkipped(), ZONE_CREATE_HELPER::createNewZone(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), footprintVsBoardStackup(), PCB_IO_KICAD_SEXPR::formatLayers(), GENDRILL_WRITER_BASE::GenDrillReportFile(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), BOARD::GetPad(), PAD::GetSolderMaskExpansion(), PAD::GetSolderPasteMargin(), FOOTPRINT::GetUniquePadNumbers(), BOARD_INSPECTION_TOOL::highlightNet(), ROUTER_TOOL::InlineDrag(), PAD::IsAperturePad(), PAD::IsOnCopperLayer(), ZONE::IsOnCopperLayer(), DSN::isRoundKeepout(), PCBNEW_JOBS_HANDLER::JobExportGerbers(), CADSTAR_PCB_ARCHIVE_LOADER::Load(), KIGFX::PCB_RENDER_SETTINGS::LoadColors(), FABMASTER::loadZone(), DIALOG_PAD_PROPERTIES::OnUpdateUINonCopperWarning(), PCB_IO_EAGLE::packageHole(), PCB_IO_EAGLE::packagePad(), PCB_PLOT_PARAMS_PARSER::Parse(), PCB_IO_KICAD_SEXPR_PARSER::parseLayersForCuItemWithSoldermask(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), PlotStandardLayer(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), PCB_IO_EAGLE::setKeepoutSettingsToZone(), ZONE_CREATE_HELPER::setUniquePriority(), PCBNEW_PRINTOUT::setupViewLayers(), PANEL_SETUP_TIME_DOMAIN_PARAMETERS::SyncCopperLayers(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataToWindow(), PCB_PROPERTIES_PANEL::updateLists(), DIALOG_PAD_PROPERTIES::updatePadLayersList(), and PAD::ViewGetLayers().

◆ AllLayersMask()

const LSET & LSET::AllLayersMask ( )
static

Definition at line 624 of file lset.cpp.

References LSET().

Referenced by PCB_GRID_HELPER::BestSnapAnchor(), BOARD_CONNECTED_ITEM_DESC::BOARD_CONNECTED_ITEM_DESC(), BOARD_ITEM_DESC::BOARD_ITEM_DESC(), BOARD_ITEM::BoardLayerSet(), BOOST_AUTO_TEST_CASE(), PCBNEW_JOBS_HANDLER::convertLayerArg(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), DRC_RTREE::DRC_RTREE(), PCB_SELECTION_TOOL::FilterCollectorForFootprints(), FOOTPRINT_DESC::FOOTPRINT_DESC(), GERBVIEW_FRAME::GERBVIEW_FRAME(), PCB_LAYER_BOX_SELECTOR::getEnabledLayers(), BOARD::GetVisibleLayers(), GERBVIEW_FRAME::GetVisibleLayers(), APPEARANCE_CONTROLS::getVisibleLayers(), PCBNEW_JOBS_HANDLER::JobExportFpSvg(), PCBNEW_JOBS_HANDLER::JobExportGerbers(), LoadBoard(), CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup(), PCB_EDIT_FRAME::OnBoardLoaded(), DIALOG_DRC::OnDRCItemSelected(), PCB_POINT_EDITOR::OnSelectionChange(), DIALOG_FOOTPRINT_CHECKER::OnSelectItem(), DRC_RULES_PARSER::parseDRC_RULE(), PCB_SHAPE_DESC::PCB_SHAPE_DESC(), PCB_TUNING_PATTERN_DESC::PCB_TUNING_PATTERN_DESC(), EDIT_TOOL::pickReferencePoint(), PAD_TOOL::PlacePad(), PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS(), PCB_PICKER_TOOL::reset(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::Run(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), PCB_SELECTION_TOOL::Selectable(), DRAWING_TOOL::SetAnchor(), APPEARANCE_CONTROLS::setVisibleLayers(), DRC_TEST_PROVIDER_MISC::testAssertions(), DRC_TEST_PROVIDER_MISC::testDisabledLayers(), PANEL_SETUP_LAYERS::testLayerNames(), DRC_TEST_PROVIDER_MISC::testTextVars(), TRACK_VIA_DESC::TRACK_VIA_DESC(), PCB_EDIT_FRAME::UpdateUserInterface(), PCB_VIA::ViewGetLOD(), WriteDRCReport(), and ZONE_DESC::ZONE_DESC().

◆ AllNonCuMask()

◆ AllTechMask()

◆ BackAssembly()

const LSET & LSET::BackAssembly ( )
static

Return a complete set of all bottom assembly layers which is all B_SilkS and B_Mask.

Definition at line 553 of file lset.cpp.

References B_CrtYd, B_Fab, B_Mask, B_SilkS, and LSET().

◆ BackBoardTechMask()

const LSET & LSET::BackBoardTechMask ( )
static

Return a mask holding technical layers used in a board fabrication (no CU layer) on Back side.

Definition at line 638 of file lset.cpp.

References B_Adhes, B_Mask, B_Paste, B_SilkS, and LSET().

Referenced by AllBoardTechMask(), PAD::FlashLayer(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), and DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem().

◆ BackMask()

const LSET & LSET::BackMask ( )
static

◆ BackTechMask()

const LSET & LSET::BackTechMask ( )
static

Return a mask holding all technical layers (no CU layer) on back side.

Definition at line 631 of file lset.cpp.

References B_Adhes, B_CrtYd, B_Fab, B_Mask, B_Paste, B_SilkS, and LSET().

Referenced by AllTechMask(), BackMask(), SideSpecificMask(), and PCB_VIA::ViewGetLOD().

◆ begin() [1/2]

iterator BASE_SET::begin ( )
inlineinherited

Definition at line 106 of file base_set.h.

Referenced by compare(), and operator<().

◆ begin() [2/2]

all_set_layers_iterator LSET::begin ( ) const
inline

Definition at line 323 of file lset.h.

◆ ClearCopperLayers()

LSET & LSET::ClearCopperLayers ( )

Clear the copper layers in this set.

Definition at line 924 of file lset.cpp.

References LSET(), and BASE_SET::reset().

Referenced by FlipStandardLayers().

◆ ClearNonCopperLayers()

LSET & LSET::ClearNonCopperLayers ( )

Clear the non-copper layers in this set.

Definition at line 933 of file lset.cpp.

References LSET(), and BASE_SET::reset().

Referenced by BOARD_DESIGN_SETTINGS::SetEnabledLayers().

◆ ClearUserDefinedLayers()

LSET & LSET::ClearUserDefinedLayers ( )

Clear the user defined layers in this set.

Definition at line 942 of file lset.cpp.

References LSET(), BASE_SET::reset(), and User_1.

◆ compare()

int BASE_SET::compare ( const BASE_SET & other) const
inlineinherited

◆ Contains()

◆ copper_layers_begin()

◆ copper_layers_end()

◆ CuStack()

◆ end() [1/2]

iterator BASE_SET::end ( )
inlineinherited

Definition at line 107 of file base_set.h.

Referenced by compare(), and operator<().

◆ end() [2/2]

all_set_layers_iterator LSET::end ( ) const
inline

Definition at line 324 of file lset.h.

Referenced by IsBetween(), and LayerCount().

◆ ExternalCuMask()

const LSET & LSET::ExternalCuMask ( )
static

Return a mask holding the Front and Bottom layers.

Definition at line 617 of file lset.cpp.

References B_Cu, F_Cu, and LSET().

Referenced by EXPORTER_STEP::Export(), DRC_RULES_PARSER::parseLayer(), BRDITEMS_PLOTTER::PlotPad(), PANEL_SETUP_BOARD_STACKUP::showOnlyActiveLayers(), and BOARD_STACKUP::StackupAllowedBrdLayers().

◆ ExtractLayer()

PCB_LAYER_ID LSET::ExtractLayer ( ) const

Find the first set PCB_LAYER_ID.

Returns
UNDEFINED_LAYER if more than one is set or UNSELECTED_LAYER if none is set.

Definition at line 525 of file lset.cpp.

References UNDEFINED_LAYER, and UNSELECTED_LAYER.

Referenced by KIGFX::PCB_PAINTER::Draw(), and DRC_TEST_PROVIDER_DISALLOW::Run().

◆ flip() [1/2]

BASE_SET & BASE_SET::flip ( )
inlineinherited

Definition at line 170 of file base_set.h.

References BASE_SET().

◆ flip() [2/2]

BASE_SET & BASE_SET::flip ( size_t pos)
inlineinherited

Definition at line 160 of file base_set.h.

References BASE_SET().

Referenced by DRC_TEST_PROVIDER_MISC::testDisabledLayers().

◆ FlipStandardLayers()

LSET & LSET::FlipStandardLayers ( int aCopperLayersCount = 0)

Flip the layers in this set.

BACK and FRONT copper layers, mask, paste, solder layers are swapped internal layers are flipped only if the copper layers count is known.

Parameters
aMask= the LSET to flip
aCopperLayersCount= the number of copper layers. if 0 (in fact if < 4 ) internal layers will be not flipped because the layer count is not known

Definition at line 468 of file lset.cpp.

References B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, ClearCopperLayers(), F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, InternalCuMask(), LSET(), BASE_SET::reset(), BASE_SET::set(), and BASE_SET::set().

Referenced by BOOST_AUTO_TEST_CASE().

◆ FmtBin()

std::string BASE_SET::FmtBin ( ) const
inlineinherited

Return a binary string showing contents of this set.

Definition at line 276 of file base_set.h.

Referenced by viaSort().

◆ FmtHex()

std::string BASE_SET::FmtHex ( ) const
inlineinherited

Return a hex string showing contents of this set.

Definition at line 302 of file base_set.h.

References arrayDim().

Referenced by BOOST_AUTO_TEST_CASE(), PCB_PLOT_PARAMS::Format(), and PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS().

◆ FrontAssembly()

const LSET & LSET::FrontAssembly ( )
static

Return a complete set of all top assembly layers which is all F_SilkS and F_Mask.

Definition at line 546 of file lset.cpp.

References F_CrtYd, F_Fab, F_Mask, F_SilkS, and LSET().

◆ FrontBoardTechMask()

const LSET & LSET::FrontBoardTechMask ( )
static

Return a mask holding technical layers used in a board fabrication (no CU layer) on front side.

Definition at line 652 of file lset.cpp.

References F_Adhes, F_Mask, F_Paste, F_SilkS, and LSET().

Referenced by AllBoardTechMask(), PAD::FlashLayer(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), and DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem().

◆ FrontMask()

const LSET & LSET::FrontMask ( )
static

◆ FrontTechMask()

const LSET & LSET::FrontTechMask ( )
static

Return a mask holding all technical layers (no CU layer) on front side.

Definition at line 645 of file lset.cpp.

References F_Adhes, F_CrtYd, F_Fab, F_Mask, F_Paste, F_SilkS, and LSET().

Referenced by AllTechMask(), FrontMask(), SideSpecificMask(), and PCB_VIA::ViewGetLOD().

◆ InternalCuMask()

◆ IsBetween()

bool LSET::IsBetween ( PCB_LAYER_ID aStart,
PCB_LAYER_ID aEnd,
PCB_LAYER_ID aLayer )
static

Return true if aLayer is between aStart and aEnd, inclusive.

This takes into account the direction of the layers and the fact that B_Cu comes before In*_Cu.

Definition at line 169 of file lset.cpp.

References B_Cu, and end().

◆ LayerCount()

int LSET::LayerCount ( PCB_LAYER_ID aStart,
PCB_LAYER_ID aEnd,
int aCopperLayerCount )
static

Return the number of layers between aStart and aEnd, inclusive.

Definition at line 86 of file lset.cpp.

References B_Cu, end(), F_Cu, and IsCopperLayer().

◆ Name()

wxString LSET::Name ( PCB_LAYER_ID aLayerId)
static

Return the fixed name association with aLayerId.

Note
These names must not be translated or changed. They are used as tokens in the board file format because the ordinal value of the PCB_LAYER_ID enum was not stable over time.
See also
LayerName() for what should be used to display the default name of a layer in the GUI.

Definition at line 188 of file lset.cpp.

References B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, Margin, and Rescue.

Referenced by PANEL_SETUP_LAYERS::addUserDefinedLayer(), BOARD_CONNECTED_ITEM_DESC::BOARD_CONNECTED_ITEM_DESC(), BOARD_ITEM_DESC::BOARD_ITEM_DESC(), BOOST_AUTO_TEST_CASE(), PCBNEW_JOBS_HANDLER::convertLayerArg(), GBR_TO_PCB_EXPORTER::export_non_copper_arc(), GBR_TO_PCB_EXPORTER::export_non_copper_item(), GBR_TO_PCB_EXPORTER::export_segarc_copper_item(), GBR_TO_PCB_EXPORTER::export_via(), FOOTPRINT_DESC::FOOTPRINT_DESC(), FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::formatBoardLayers(), BOARD_STACKUP::FormatBoardStackup(), PCB_IO_KICAD_SEXPR::formatLayer(), PCB_IO_KICAD_SEXPR::formatLayers(), PCB_IO_KICAD_SEXPR_PARSER::init(), DIALOG_MAP_GERBER_LAYERS_TO_PCB::initDialog(), LoadBoard(), CADSTAR_PCB_ARCHIVE_LOADER::logBoardStackupMessage(), CADSTAR_PCB_ARCHIVE_LOADER::logBoardStackupWarning(), FOOTPRINT_EDITOR_SETTINGS::MigrateFromLegacy(), PCBNEW_SETTINGS::MigrateFromLegacy(), FOOTPRINT_EDITOR_SETTINGS::migrateSchema4To5(), PCB_EDIT_FRAME::OnBoardLoaded(), DIALOG_MAP_GERBER_LAYERS_TO_PCB::OnGetSetup(), DIALOG_MAP_GERBER_LAYERS_TO_PCB::OnSelectLayer(), PCB_SHAPE_DESC::PCB_SHAPE_DESC(), PCB_TUNING_PATTERN_DESC::PCB_TUNING_PATTERN_DESC(), APPEARANCE_CONTROLS::rebuildLayers(), SELECT_LAYER_DIALOG::SELECT_LAYER_DIALOG(), TIME_DOMAIN_PARAMETERS::TIME_DOMAIN_PARAMETERS(), JOB_PARAM_LSEQ::ToJson(), TRACK_VIA_DESC::TRACK_VIA_DESC(), PANEL_DISPLAY_OPTIONS::TransferDataFromWindow(), FOOTPRINT_EDIT_FRAME::updateEnabledLayers(), PCB_PROPERTIES_PANEL::updateLists(), PCB_EDIT_FRAME::UpdateUserInterface(), GBR_TO_PCB_EXPORTER::writeCopperLineItem(), WriteDRCReport(), GBR_TO_PCB_EXPORTER::writePcbFilledCircle(), GBR_TO_PCB_EXPORTER::writePcbHeader(), GBR_TO_PCB_EXPORTER::writePcbPolygon(), GBR_TO_PCB_EXPORTER::writePcbZoneItem(), and ZONE_DESC::ZONE_DESC().

◆ NameToLayer()

◆ non_copper_layers_begin()

◆ non_copper_layers_end()

◆ operator&=()

BASE_SET & BASE_SET::operator&= ( const BASE_SET & other)
inlineinherited

Definition at line 187 of file base_set.h.

References BASE_SET().

◆ operator<()

bool BASE_SET::operator< ( const BASE_SET & other) const
inlineinherited

Definition at line 267 of file base_set.h.

References BASE_SET(), begin(), end(), end, and alg::lexicographical_compare_three_way().

◆ operator^=()

BASE_SET & BASE_SET::operator^= ( const BASE_SET & other)
inlineinherited

Definition at line 237 of file base_set.h.

References BASE_SET().

◆ operator|=()

BASE_SET & BASE_SET::operator|= ( const BASE_SET & other)
inlineinherited

Definition at line 212 of file base_set.h.

References BASE_SET().

◆ operator~()

BASE_SET BASE_SET::operator~ ( ) const
inlineinherited

Definition at line 179 of file base_set.h.

References BASE_SET(), and result.

◆ ParseHex() [1/2]

int BASE_SET::ParseHex ( const char * aStart,
int aCount )
inlineinherited

Convert the output of FmtHex() and replaces this set's values with those given in the input string.

Parsing stops at the first non hex ASCII byte, except that marker bytes output from FmtHex() are not terminators.

Returns
number of bytes consumed.

Definition at line 362 of file base_set.h.

References BASE_SET(), and set().

◆ ParseHex() [2/2]

int BASE_SET::ParseHex ( const std::string & str)
inlineinherited

Convert the output of FmtHex() and replaces this set's values with those given in the input string.

Parsing stops at the first non hex ASCII byte, except that marker bytes output from FmtHex() are not terminators.

Returns
the number of bytes consumed.

Definition at line 348 of file base_set.h.

References ParseHex().

Referenced by PCB_PLOT_PARAMS_PARSER::Parse(), and ParseHex().

◆ PhysicalLayersMask()

const LSET & LSET::PhysicalLayersMask ( )
static

◆ reset() [1/2]

BASE_SET & BASE_SET::reset ( )
inlineinherited

◆ reset() [2/2]

◆ RunOnLayers()

◆ Seq() [1/2]

LSEQ LSET::Seq ( ) const

Return a LSEQ from this LSET in ascending PCB_LAYER_ID order.

Each LSEQ element will be in the same sequence as in PCB_LAYER_ID and only present in the resultant LSEQ if present in this set. Therefore the sequence is subject to change, use it only when enumeration and not order is important.

Definition at line 310 of file lset.cpp.

Referenced by SeqStackupForPlotting(), SeqStackupTop2Bottom(), and TechAndUserUIOrder().

◆ Seq() [2/2]

LSEQ LSET::Seq ( const LSEQ & aSequence) const

Return an LSEQ from the union of this LSET and a desired sequence.

The LSEQ element will be in the same sequence as aWishListSequence if they are present.

Parameters
aWishListSequenceestablishes the order of the returned LSEQ, and the LSEQ will only contain PCB_LAYER_IDs which are present in this set.

Definition at line 296 of file lset.cpp.

Referenced by STEP_PCB_MODEL::AddPadShape(), PCB_IO_IPC2581::addPadStack(), PCB_IO_IPC2581::addPadStack(), BOOST_AUTO_TEST_CASE(), PANEL_SETUP_RULES::checkPlausibility(), BOARD_ADAPTER::createLayers(), GENCAD_EXPORTER::createPadsShapesSection(), APPEARANCE_CONTROLS::doApplyLayerPreset(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::format(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), PAD::GetPrincipalLayer(), ZONE_SEARCH_HANDLER::getResultCell(), MODEL_ZONES_OVERVIEW::GetValueByRow(), BOARD_INSPECTION_TOOL::InspectClearance(), CADSTAR_PCB_ARCHIVE_LOADER::loadDocumentationSymbols(), CADSTAR_PCB_ARCHIVE_LOADER::loadFigures(), CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryCoppers(), CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryFigures(), DIALOG_DRC::OnDRCItemSelected(), APPEARANCE_CONTROLS::OnLayerContextMenu(), DIALOG_FOOTPRINT_CHECKER::OnSelectItem(), BOARD_ITEM::ptr_cmp::operator()(), FOOTPRINT::cmp_pads::operator()(), FOOTPRINT::cmp_zones::operator()(), KI_TEST::kitest_cmp_drawings::operator()(), kiapi::board::PackLayerSet(), PlotLayerOutlines(), PlotStandardLayer(), PCB_SELECTION_TOOL::pruneObscuredSelectionCandidates(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), PAD::SetAttribute(), BOARD_ITEM::SetLayerSet(), DRC_TEST_PROVIDER_MISC::testDisabledLayers(), PCB_EDIT_FRAME::UpdateUserInterface(), PAD::ViewGetLayers(), and HYPERLYNX_EXPORTER::writeSinglePadStack().

◆ SeqStackupForPlotting()

LSEQ LSET::SeqStackupForPlotting ( ) const

Return the sequence that is typical for a bottom-to-top stack-up.

For instance, to plot multiple layers in a single image, the top layers output last.

Definition at line 387 of file lset.cpp.

References B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, copper_layers_begin(), copper_layers_end(), Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Fab, F_Mask, F_Paste, F_SilkS, Margin, non_copper_layers_begin(), non_copper_layers_end(), Seq(), and User_1.

Referenced by DIALOG_PLOT::DIALOG_PLOT(), PCBNEW_JOBS_HANDLER::JobExportFpSvg(), PCBNEW_JOBS_HANDLER::JobExportGerbers(), PCB_PLOT_PARAMS_PARSER::Parse(), PlotLayerOutlines(), and PlotStandardLayer().

◆ SeqStackupTop2Bottom()

LSEQ LSET::SeqStackupTop2Bottom ( PCB_LAYER_ID aSelectedLayer = UNDEFINED_LAYER) const

Generate a sequence of layers that represent a top to bottom stack of this set of layers.

Parameters
aSelectedLayeris the layer to put at the top of stack when defined.
Returns
the top to bottom layer sequence.

Definition at line 326 of file lset.cpp.

References B_Adhes, B_CrtYd, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, copper_layers_begin(), copper_layers_end(), Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Fab, F_Mask, F_Paste, F_SilkS, Margin, non_copper_layers_begin(), non_copper_layers_end(), Seq(), UNDEFINED_LAYER, and User_1.

Referenced by BOOST_AUTO_TEST_CASE(), and PCB_SELECTION_TOOL::pruneObscuredSelectionCandidates().

◆ set() [1/3]

BASE_SET & BASE_SET::set ( )
inlineinherited

Definition at line 136 of file base_set.h.

References BASE_SET().

Referenced by LSET::FlipStandardLayers(), LSET::LSET(), LSET::LSET(), LSET::LSET(), and LSET::LSET().

◆ set() [2/3]

BASE_SET & BASE_SET::set ( size_t pos)
inlineinherited

Definition at line 116 of file base_set.h.

References BASE_SET().

Referenced by LSET::all_set_layers_iterator::all_set_layers_iterator(), allCuMask(), allNonCuMask(), DIALOG_PLOT::applyPlotSettings(), BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), AR_AUTOPLACER::buildFpAreas(), BOARD::ComputeBoundingBox(), BASE_SET::const_iterator::const_iterator(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItemOnLayer(), LSET::copper_layers_iterator::copper_layers_iterator(), ZONE_CREATE_HELPER::createNewZone(), CONVERT_TOOL::CreatePolys(), PCB_IO_EAGLE::defaultKicadLayer(), FOOTPRINT::Deserialize(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), PCBEXPR_LAYER_VALUE::EqualTo(), existsOnLayerFunc(), PCB_SELECTION_TOOL::FilterCollectorForFootprints(), PAD::Flip(), ZONE::Flip(), LSET::FlipStandardLayers(), PCB_PLOT_PARAMS::Format(), AR_AUTOPLACER::genModuleOnRoutingMatrix(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::getCustomLayersFromControls(), PCB_VIA::GetLayerSet(), PANEL_SETUP_LAYERS::GetUILayerMask(), BOARD_ADAPTER::GetVisibleLayers(), APPEARANCE_CONTROLS::getVisibleLayers(), API_HANDLER_PCB::handleCheckPadstackPresenceOnLayers(), ROUTER_TOOL::handleLayerSwitch(), API_HANDLER_PCB::handleSetVisibleLayers(), ALTIUM_PCB::HelperSetZoneLayers(), intersectsAreaFunc(), BASE_SET::iterator::iterator(), PARAM_LAYER_PRESET::jsonToPresets(), PCB_IO_KICAD_LEGACY::leg_mask2new(), PCB_IO_EAGLE::LoadBoard(), FABMASTER::loadLayers(), LSET::non_copper_layers_iterator::non_copper_layers_iterator(), DIALOG_DRC::OnDRCItemSelected(), APPEARANCE_CONTROLS::onLayerVisibilityToggled(), DIALOG_FOOTPRINT_CHECKER::OnSelectItem(), LENGTH_DELAY_CALCULATION::optimiseViaLayers(), PANEL_DISPLAY_OPTIONS::PANEL_DISPLAY_OPTIONS(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_KICAD_SEXPR_PARSER::parseBOARD_unchecked(), PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked(), PCB_IO_KICAD_SEXPR_PARSER::parseFootprintStackup(), ParseHex(), DRC_RULES_PARSER::parseLayer(), PCB_IO_KICAD_SEXPR_PARSER::parseLayers(), PADSTACK::RelevantShapeLayers(), GERBVIEW_FRAME::RemapLayers(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), PCB_SELECTION_CONDITIONS::sameLayerFunc(), PCB_SELECTION_TOOL::Selectable(), PAD::SetAttribute(), DIALOG_PRINT_GERBVIEW::setLayerSetFromList(), DIALOG_PRINT_PCBNEW::setLayerSetFromList(), APPEARANCE_CONTROLS::SetLayerVisible(), GLOBAL_EDIT_TOOL::swapBoardItem(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::transferDataToPad(), kiapi::board::UnpackLayerSet(), FOOTPRINT_EDIT_FRAME::updateEnabledLayers(), LSET::UserDefinedLayersMask(), and RATSNEST_VIEW_ITEM::ViewDraw().

◆ set() [3/3]

BASE_SET & BASE_SET::set ( size_t pos,
bool value )
inlineinherited

Definition at line 126 of file base_set.h.

References BASE_SET().

◆ set_bits_begin()

set_bits_iterator BASE_SET::set_bits_begin ( ) const
inlineinherited

Definition at line 501 of file base_set.h.

Referenced by BOOST_AUTO_TEST_CASE().

◆ set_bits_end()

set_bits_iterator BASE_SET::set_bits_end ( ) const
inlineinherited

Definition at line 502 of file base_set.h.

Referenced by BOOST_AUTO_TEST_CASE().

◆ set_bits_rbegin()

set_bits_reverse_iterator BASE_SET::set_bits_rbegin ( ) const
inlineinherited

Definition at line 504 of file base_set.h.

Referenced by BOOST_AUTO_TEST_CASE().

◆ set_bits_rend()

set_bits_reverse_iterator BASE_SET::set_bits_rend ( ) const
inlineinherited

Definition at line 508 of file base_set.h.

Referenced by BOOST_AUTO_TEST_CASE().

◆ SideSpecificMask()

const LSET & LSET::SideSpecificMask ( )
static

Definition at line 719 of file lset.cpp.

References AllCuMask(), BackTechMask(), FrontTechMask(), and LSET().

Referenced by FOOTPRINT::GetSide(), and BOARD_ITEM::IsSideSpecific().

◆ TechAndUserUIOrder()

LSEQ LSET::TechAndUserUIOrder ( ) const

Return the technical and user layers in the order shown in layer widget.

Definition at line 259 of file lset.cpp.

References B_Adhes, B_CrtYd, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Fab, F_Mask, F_Paste, F_SilkS, Margin, non_copper_layers_begin(), non_copper_layers_end(), Seq(), and User_1.

Referenced by PCB_IO_KICAD_SEXPR::formatBoardLayers(), and UIOrder().

◆ UIOrder()

◆ UserDefinedLayersMask()

◆ UserMask()


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