Horizon
|
LSET is a set of PCB_LAYER_IDs. More...
#include <layer_ids.h>
Public Member Functions | |
LSET () | |
Create an empty (cleared) set. | |
LSET (const BASE_SET &aOther) | |
LSET (PCB_LAYER_ID aLayer) | |
Take a PCB_LAYER_ID and sets that bit. | |
LSET (const PCB_LAYER_ID *aArray, unsigned aCount) | |
Create an array or LSEQ. | |
LSET (unsigned aIdCount, int aFirst,...) | |
Take one or more PCB_LAYER_IDs in the argument list to construct the set. | |
bool | Contains (PCB_LAYER_ID aLayer) |
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 | Technicals (LSET aSubToOmit=LSET()) const |
Return a sequence of technical layers. | |
LSEQ | Users () const |
*_User layers. | |
LSEQ | TechAndUserUIOrder () const |
Returns the technical and user layers in the order shown in layer widget. | |
LSEQ | UIOrder () const |
LSEQ | Seq (const PCB_LAYER_ID *aWishListSequence, unsigned aCount) 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 | SeqStackupBottom2Top () const |
Return the sequence that is typical for a bottom-to-top stack-up. | |
std::string | FmtHex () const |
Return a hex string showing contents of this LSEQ. | |
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. | |
std::string | FmtBin () const |
Return a binary string showing contents of this LSEQ. | |
PCB_LAYER_ID | ExtractLayer () const |
Find the first set PCB_LAYER_ID. | |
Static Public Member Functions | |
static const wxChar * | Name (PCB_LAYER_ID aLayerId) |
Return the fixed name association with aLayerId. | |
static LSET | InternalCuMask () |
Return a complete set of internal copper layers which is all Cu layers except F_Cu and B_Cu. | |
static LSET | FrontAssembly () |
Return a complete set of all top assembly layers which is all F_SilkS and F_Mask. | |
static LSET | BackAssembly () |
Return a complete set of all bottom assembly layers which is all B_SilkS and B_Mask. | |
static LSET | AllCuMask (int aCuLayerCount=MAX_CU_LAYERS) |
Return a mask holding the requested number of Cu PCB_LAYER_IDs. | |
static LSET | ExternalCuMask () |
Return a mask holding the Front and Bottom layers. | |
static LSET | AllNonCuMask () |
Return a mask holding all layer minus CU layers. | |
static LSET | AllLayersMask () |
static LSET | FrontTechMask () |
Return a mask holding all technical layers (no CU layer) on front side. | |
static LSET | FrontBoardTechMask () |
Return a mask holding technical layers used in a board fabrication (no CU layer) on front side. | |
static LSET | BackTechMask () |
Return a mask holding all technical layers (no CU layer) on back side. | |
static LSET | BackBoardTechMask () |
Return a mask holding technical layers used in a board fabrication (no CU layer) on Back side. | |
static LSET | AllTechMask () |
Return a mask holding all technical layers (no CU layer) on both side. | |
static LSET | AllBoardTechMask () |
Return a mask holding board technical layers (no CU layer) on both side. | |
static LSET | FrontMask () |
Return a mask holding all technical layers and the external CU layer on front side. | |
static LSET | BackMask () |
Return a mask holding all technical layers and the external CU layer on back side. | |
static LSET | UserMask () |
static LSET | PhysicalLayersMask () |
Return a mask holding all layers which are physically realized. | |
static LSET | UserDefinedLayers () |
Return a mask with all of the allowable user defined layers. | |
static LSET | ForbiddenFootprintLayers () |
Layers which are not allowed within footprint definitions. | |
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.
|
inline |
LSET::LSET | ( | unsigned | aIdCount, |
int | aFirst, | ||
... | |||
) |
Take one or more PCB_LAYER_IDs in the argument list to construct the set.
Typically only used in static construction.
aIdCount | is the number of PCB_LAYER_IDs which follow. |
aFirst | is the first included in aIdCount and must always be present, and can be followed by any number of additional PCB_LAYER_IDs so long as aIdCount accurately reflects the count. |
Parameter is 'int' to avoid va_start undefined behavior.
|
inline |
See if the layer set contains a PCB layer.
aLayer | is the layer to check |
LSEQ LSET::CuStack | ( | ) | const |
Return a sequence of copper layers in starting from the front/top and extending to the back/bottom.
This specific sequence is depended upon in numerous places.
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.
|
static |
Layers which are not allowed within footprint definitions.
Currently internal copper layers and Margin.
int LSET::ParseHex | ( | const char * | aStart, |
int | aCount | ||
) |
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.
|
static |
Return a mask holding all layers which are physically realized.
Equivalent to the copper layers + the board tech mask.
LSEQ LSET::Seq | ( | ) | const |
LSEQ LSET::Seq | ( | const PCB_LAYER_ID * | aWishListSequence, |
unsigned | aCount | ||
) | const |
LSEQ LSET::SeqStackupBottom2Top | ( | ) | 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.
Return a sequence of technical layers.
A sequence provides a certain order.
aSubToOmit | is the subset of the technical layers to omit, defaults to none. |