KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LAYER Struct Reference

Container to hold information pertinent to a layer of a BOARD. More...

#include <board.h>

Public Member Functions

 LAYER ()
 
void clear ()
 

Static Public Member Functions

static const char * ShowType (LAYER_T aType)
 Convert a LAYER_T enum to a string representation of the layer type.
 
static LAYER_T ParseType (const char *aType)
 Convert a string to a LAYER_T.
 

Public Attributes

wxString m_name
 The canonical name of the layer.
 
wxString m_userName
 The user defined name of the layer.
 
LAYER_T m_type
 The type of the layer.
 
bool m_visible
 
int m_number
 The layer ID.
 
int m_opposite
 Similar layer on opposite side of the board, if any.
 

Detailed Description

Container to hold information pertinent to a layer of a BOARD.

Definition at line 168 of file board.h.

Constructor & Destructor Documentation

◆ LAYER()

LAYER::LAYER ( )
inline

Definition at line 170 of file board.h.

References clear().

Member Function Documentation

◆ clear()

void LAYER::clear ( )
inline

Definition at line 175 of file board.h.

References LT_SIGNAL, m_name, m_number, m_opposite, m_type, m_userName, and m_visible.

Referenced by LAYER(), and PCB_IO_KICAD_SEXPR_PARSER::parseLayer().

◆ ParseType()

LAYER_T LAYER::ParseType ( const char *  aType)
static

Convert a string to a LAYER_T.

Parameters
aTypeThe layer name to convert.
Returns
The binary representation of the layer type, or LAYER_T(-1) if the string is invalid.

Definition at line 660 of file board.cpp.

References LT_AUX, LT_BACK, LT_FRONT, LT_JUMPER, LT_MIXED, LT_POWER, LT_SIGNAL, and LT_UNDEFINED.

Referenced by PCB_IO_KICAD_LEGACY::loadSETUP(), and PCB_IO_KICAD_SEXPR_PARSER::parseLayer().

◆ ShowType()

const char * LAYER::ShowType ( LAYER_T  aType)
static

Convert a LAYER_T enum to a string representation of the layer type.

Parameters
aTypeThe LAYER_T to convert
Returns
The string representation of the layer type.

Definition at line 644 of file board.cpp.

References LT_AUX, LT_BACK, LT_FRONT, LT_JUMPER, LT_MIXED, LT_POWER, and LT_SIGNAL.

Referenced by PCB_IO_KICAD_SEXPR::formatBoardLayers(), and PANEL_SETUP_LAYERS::showLayerTypes().

Member Data Documentation

◆ m_name

wxString LAYER::m_name

The canonical name of the layer.

See also
LSET::Name

Definition at line 196 of file board.h.

Referenced by clear(), PCB_IO_KICAD_SEXPR_PARSER::parseLayer(), and PCB_IO_KICAD_SEXPR_PARSER::parseLayers().

◆ m_number

int LAYER::m_number

The layer ID.

See also
PCB_LAYER_ID

Definition at line 200 of file board.h.

Referenced by clear(), PCB_IO_KICAD_SEXPR_PARSER::parseLayer(), and PCB_IO_KICAD_SEXPR_PARSER::parseLayers().

◆ m_opposite

int LAYER::m_opposite

Similar layer on opposite side of the board, if any.

Definition at line 201 of file board.h.

Referenced by clear().

◆ m_type

LAYER_T LAYER::m_type

The type of the layer.

See also
LAYER_T

Definition at line 198 of file board.h.

Referenced by clear(), PCB_IO_KICAD_SEXPR_PARSER::parseLayer(), and PCB_IO_KICAD_SEXPR_PARSER::parseLayers().

◆ m_userName

wxString LAYER::m_userName

The user defined name of the layer.

Definition at line 197 of file board.h.

Referenced by clear(), and PCB_IO_KICAD_SEXPR_PARSER::parseLayer().

◆ m_visible

bool LAYER::m_visible

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