KiCad PCB EDA Suite
GAL_SET Class Reference

Helper for storing and iterating over GAL_LAYER_IDs. More...

#include <layer_ids.h>

Inheritance diagram for GAL_SET:

Public Member Functions

 GAL_SET ()
 
 GAL_SET (const GAL_SET &aOther)
 
 GAL_SET (const GAL_LAYER_ID *aArray, unsigned aCount)
 
GAL_SETset ()
 
GAL_SETset (int aPos, bool aVal=true)
 
GAL_SETset (GAL_LAYER_ID aPos, bool aVal=true)
 
bool Contains (GAL_LAYER_ID aPos)
 
std::vector< GAL_LAYER_IDSeq () const
 

Static Public Member Functions

static GAL_SET DefaultVisible ()
 

Static Private Attributes

static constexpr int start = static_cast<int>( GAL_LAYER_ID_START )
 

Detailed Description

Helper for storing and iterating over GAL_LAYER_IDs.

Definition at line 290 of file layer_ids.h.

Constructor & Destructor Documentation

◆ GAL_SET() [1/3]

GAL_SET::GAL_SET ( )
inline

Definition at line 296 of file layer_ids.h.

296  : std::bitset<GAL_LAYER_ID_COUNT>()
297  {
298  }

◆ GAL_SET() [2/3]

GAL_SET::GAL_SET ( const GAL_SET aOther)
inline

Definition at line 300 of file layer_ids.h.

300  : std::bitset<GAL_LAYER_ID_COUNT>( aOther )
301  {
302  }

◆ GAL_SET() [3/3]

GAL_SET::GAL_SET ( const GAL_LAYER_ID aArray,
unsigned  aCount 
)

Definition at line 921 of file lset.cpp.

921  : GAL_SET()
922 {
923  for( unsigned i = 0; i < aCount; ++i )
924  set( aArray[i] );
925 }
GAL_SET()
Definition: layer_ids.h:296
GAL_SET & set()
Definition: layer_ids.h:306

References set().

Member Function Documentation

◆ Contains()

bool GAL_SET::Contains ( GAL_LAYER_ID  aPos)
inline

◆ DefaultVisible()

GAL_SET GAL_SET::DefaultVisible ( )
static

Definition at line 942 of file lset.cpp.

943 {
944  static const GAL_LAYER_ID visible[] = {
945  LAYER_VIAS,
951  // LAYER_MOD_TEXT_INVISIBLE, // Invisible text hidden by default
952  LAYER_ANCHOR,
953  LAYER_PAD_FR,
954  LAYER_PAD_BK,
956  LAYER_GRID,
959  LAYER_MOD_FR,
960  LAYER_MOD_BK,
963  LAYER_TRACKS,
971  // LAYER_DRC_EXCLUSION, // DRC exclusions hidden by default
976  LAYER_CURSOR,
979  LAYER_PADS,
980  LAYER_ZONES,
981  };
982 
983  static const GAL_SET saved( visible, arrayDim( visible ) );
984  return saved;
985 }
currently selected items overlay
Definition: layer_ids.h:226
smd pads, front layer
Definition: layer_ids.h:209
to draw micro vias
Definition: layer_ids.h:201
Auxiliary items (guides, rule, etc)
Definition: layer_ids.h:229
layer for drc markers with SEVERITY_ERROR
Definition: layer_ids.h:223
Meta control for all pads opacity/visibility (color ignored)
Definition: layer_ids.h:237
PCB cursor.
Definition: layer_ids.h:228
show footprints values (when texts are visible)
Definition: layer_ids.h:217
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
Definition: layer_ids.h:196
smd pads, back layer
Definition: layer_ids.h:210
anchor of items having an anchor point (texts, footprints)
Definition: layer_ids.h:208
show footprints on back
Definition: layer_ids.h:216
to draw via holes (pad holes do not use this layer)
Definition: layer_ids.h:222
Control for copper zone opacity/visibility (color ignored)
Definition: layer_ids.h:238
to draw usual through hole vias
Definition: layer_ids.h:203
handle color for not plated holes (holes, not pads)
Definition: layer_ids.h:204
Meta control for all vias opacity/visibility.
Definition: layer_ids.h:200
show footprints on front
Definition: layer_ids.h:215
Helper for storing and iterating over GAL_LAYER_IDs.
Definition: layer_ids.h:290
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
Definition: arraydim.h:31
to handle and draw images bitmaps
Definition: layer_ids.h:230
drawingsheet frame and titleblock
Definition: layer_ids.h:224
show a marker on pads with no nets
Definition: layer_ids.h:214
show footprints references (when texts are visible)
Definition: layer_ids.h:218
multilayer pads, usually with holes
Definition: layer_ids.h:220
to draw blind/buried vias
Definition: layer_ids.h:202
general purpose overlay
Definition: layer_ids.h:225
layer for drc markers with SEVERITY_WARNING
Definition: layer_ids.h:242
PCB background color.
Definition: layer_ids.h:227
to draw pad holes (plated)
Definition: layer_ids.h:221

References arrayDim(), LAYER_ANCHOR, LAYER_AUX_ITEMS, LAYER_CURSOR, LAYER_DRAW_BITMAPS, LAYER_DRAWINGSHEET, LAYER_DRC_ERROR, LAYER_DRC_WARNING, LAYER_GP_OVERLAY, LAYER_GRID, LAYER_GRID_AXES, LAYER_MOD_BK, LAYER_MOD_FR, LAYER_MOD_REFERENCES, LAYER_MOD_TEXT, LAYER_MOD_VALUES, LAYER_NO_CONNECTS, LAYER_NON_PLATEDHOLES, LAYER_PAD_BK, LAYER_PAD_FR, LAYER_PAD_HOLEWALLS, LAYER_PAD_PLATEDHOLES, LAYER_PADS, LAYER_PADS_TH, LAYER_PCB_BACKGROUND, LAYER_RATSNEST, LAYER_SELECT_OVERLAY, LAYER_TRACKS, LAYER_VIA_BBLIND, LAYER_VIA_HOLES, LAYER_VIA_HOLEWALLS, LAYER_VIA_MICROVIA, LAYER_VIA_THROUGH, LAYER_VIAS, and LAYER_ZONES.

Referenced by LAYER_PRESET::LAYER_PRESET(), PCB_PARSER::parseSetup(), and PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS().

◆ Seq()

std::vector< GAL_LAYER_ID > GAL_SET::Seq ( ) const

Definition at line 928 of file lset.cpp.

929 {
930  std::vector<GAL_LAYER_ID> ret;
931 
932  for( size_t i = 0; i < size(); ++i )
933  {
934  if( test( i ) )
935  ret.push_back( static_cast<GAL_LAYER_ID>( i + GAL_LAYER_ID_START ) );
936  }
937 
938  return ret;
939 }

References GAL_LAYER_ID_START.

◆ set() [1/3]

◆ set() [2/3]

GAL_SET& GAL_SET::set ( int  aPos,
bool  aVal = true 
)
inline

Definition at line 312 of file layer_ids.h.

313  {
314  GAL_BASE_SET::set( aPos, aVal );
315  return *this;
316  }

◆ set() [3/3]

GAL_SET& GAL_SET::set ( GAL_LAYER_ID  aPos,
bool  aVal = true 
)
inline

Definition at line 318 of file layer_ids.h.

319  {
320  GAL_BASE_SET::set( static_cast<std::size_t>( aPos ) - start, aVal );
321  return *this;
322  }
static constexpr int start
Definition: layer_ids.h:293

References start.

Member Data Documentation

◆ start

constexpr int GAL_SET::start = static_cast<int>( GAL_LAYER_ID_START )
staticprivate

Definition at line 293 of file layer_ids.h.

Referenced by Contains(), and set().


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