KiCad PCB EDA Suite
|
Read a Pcbnew s-expression formatted LINE_READER object and returns the appropriate BOARD_ITEM object. More...
#include <pcb_io_kicad_sexpr_parser.h>
Classes | |
struct | GENERATOR_INFO |
Convert net code using the mapping table if available, otherwise returns unchanged net code if < 0 or if it's out of range. More... | |
struct | GROUP_INFO |
Public Types | |
typedef std::unordered_map< std::string, PCB_LAYER_ID > | LAYER_ID_MAP |
typedef std::unordered_map< std::string, LSET > | LSET_MAP |
typedef std::unordered_map< wxString, KIID > | KIID_MAP |
Public Member Functions | |
PCB_IO_KICAD_SEXPR_PARSER (LINE_READER *aReader, BOARD *aAppendToMe, std::function< bool(wxString, int, wxString, wxString)> aQueryUserCallback, PROGRESS_REPORTER *aProgressReporter=nullptr, unsigned aLineCount=0) | |
BOARD_ITEM * | Parse () |
FOOTPRINT * | parseFOOTPRINT (wxArrayString *aInitialComments=nullptr) |
bool | IsTooRecent () |
Return whether a version number, if any was parsed, was too recent. | |
wxString | GetRequiredVersion () |
Return a string representing the version of KiCad required to open this file. | |
bool | IsValidBoardHeader () |
Partially parse the input and check if it matches expected header. | |
Private Types | |
using | TIMEOUT = std::chrono::milliseconds |
The clock used for the timestamp (guaranteed to be monotonic). | |
using | CLOCK = std::chrono::steady_clock |
The type of the time stamps. | |
using | TIME_PT = std::chrono::time_point< CLOCK > |
Private Member Functions | |
int | getNetCode (int aNetCode) |
void | pushValueIntoMap (int aIndex, int aValue) |
Add aValue value in netcode mapping (m_netCodes) at aIndex. | |
void | init () |
Clear and re-establish m_layerMap with the default layer names. | |
void | checkpoint () |
void | createOldLayerMapping (std::unordered_map< std::string, std::string > &aMap) |
Create a mapping from the (short-lived) bug where layer names were translated. | |
void | skipCurrent () |
Skip the current token level, i.e search for the RIGHT parenthesis which closes the current description. | |
void | parseHeader () |
void | parseGeneralSection () |
void | parsePAGE_INFO () |
void | parseTITLE_BLOCK () |
void | parseLayers () |
void | parseLayer (LAYER *aLayer) |
void | parseBoardStackup () |
void | parseSetup () |
void | parseDefaults (BOARD_DESIGN_SETTINGS &aSettings) |
void | parseDefaultTextDims (BOARD_DESIGN_SETTINGS &aSettings, int aLayer) |
void | parseNETINFO_ITEM () |
void | parseNETCLASS () |
void | parseTEARDROP_PARAMETERS (TEARDROP_PARAMETERS *tdParams) |
void | parseTextBoxContent (PCB_TEXTBOX *aTextBox) |
PCB_SHAPE * | parsePCB_SHAPE (BOARD_ITEM *aParent) |
PCB_TEXT * | parsePCB_TEXT (BOARD_ITEM *aParent, PCB_TEXT *aBaseText=nullptr) |
void | parsePCB_TEXT_effects (PCB_TEXT *aText, PCB_TEXT *aBaseText=nullptr) |
PCB_REFERENCE_IMAGE * | parsePCB_REFERENCE_IMAGE (BOARD_ITEM *aParent) |
PCB_TEXTBOX * | parsePCB_TEXTBOX (BOARD_ITEM *aParent) |
PCB_TABLECELL * | parsePCB_TABLECELL (BOARD_ITEM *aParent) |
PCB_TABLE * | parsePCB_TABLE (BOARD_ITEM *aParent) |
PCB_DIMENSION_BASE * | parseDIMENSION (BOARD_ITEM *aParent) |
FOOTPRINT * | parseFOOTPRINT_unchecked (wxArrayString *aInitialComments=nullptr) |
PAD * | parsePAD (FOOTPRINT *aParent=nullptr) |
bool | parsePAD_option (PAD *aPad) |
void | parsePadstack (PAD *aPad) |
PCB_ARC * | parseARC () |
PCB_TRACK * | parsePCB_TRACK () |
PCB_VIA * | parsePCB_VIA () |
void | parseViastack (PCB_VIA *aVia) |
ZONE * | parseZONE (BOARD_ITEM_CONTAINER *aParent) |
PCB_TARGET * | parsePCB_TARGET () |
BOARD * | parseBOARD () |
void | parseGROUP_members (GROUP_INFO &aGroupInfo) |
void | parseGROUP (BOARD_ITEM *aParent) |
void | parseGENERATOR (BOARD_ITEM *aParent) |
BOARD * | parseBOARD_unchecked () |
PCB_LAYER_ID | lookUpLayer (const LAYER_ID_MAP &aMap) |
Parse the current token for the layer definition of a BOARD_ITEM object. | |
LSET | lookUpLayerSet (const LSET_MAP &aMap) |
PCB_LAYER_ID | parseBoardItemLayer () |
Parse the layer definition of a BOARD_ITEM object. | |
LSET | parseBoardItemLayersAsMask () |
Parse the layers definition of a BOARD_ITEM object. | |
LSET | parseLayersForCuItemWithSoldermask () |
Parse the layers definition of a BOARD_ITEM object that has a single copper layer and optional soldermask layer. | |
VECTOR2I | parseXY () |
Parse a coordinate pair (xy X Y) in board units (mm). | |
void | parseXY (int *aX, int *aY) |
void | parseMargins (int &aLeft, int &aTop, int &aRight, int &aBottom) |
std::pair< wxString, wxString > | parseBoardProperty () |
void | parseOutlinePoints (SHAPE_LINE_CHAIN &aPoly) |
Parses possible outline points and stores them into aPoly . | |
void | parseEDA_TEXT (EDA_TEXT *aText) |
Parse the common settings for any object derived from EDA_TEXT. | |
void | parseRenderCache (EDA_TEXT *text) |
Parse the render cache for any object derived from EDA_TEXT. | |
void | parseTenting (PADSTACK &aPadstack) |
FP_3DMODEL * | parse3DModel () |
int | parseBoardUnits () |
Parse the current token as an ASCII numeric string with possible leading whitespace into a double precision floating point number. | |
int | parseBoardUnits (const char *aExpected) |
int | parseBoardUnits (PCB_KEYS_T::T aToken) |
int | parseInt () |
int | parseInt (const char *aExpected) |
long | parseHex () |
bool | parseBool () |
bool | parseMaybeAbsentBool (bool aDefaultValue) |
Parses a boolean flag inside a list that existed before boolean normalization. | |
KIID | CurStrToKIID () |
void | resolveGroups (BOARD_ITEM *aParent) |
Called after parsing a footprint definition or board to build the group membership lists. | |
void | removeReplaceEntryInFontTextMap (EDA_TEXT *aEntry, EDA_TEXT *aReplacer) |
Remove an entry from m_fontTextMap. | |
Private Attributes | |
BOARD * | m_board |
LAYER_ID_MAP | m_layerIndices |
map layer name to it's index | |
LSET_MAP | m_layerMasks |
map layer names to their masks | |
std::set< wxString > | m_undefinedLayers |
set of layers not defined in layers section | |
std::vector< int > | m_netCodes |
net codes mapping for boards being loaded | |
bool | m_tooRecent |
true if version parses as later than supported | |
int | m_requiredVersion |
set to the KiCad format version this board requires | |
wxString | m_generatorVersion |
Set to the generator version this board requires. | |
bool | m_appendToExisting |
reading into an existing board; reset UUIDs | |
KIID_MAP | m_resetKIIDMap |
bool | m_showLegacySegmentZoneWarning |
bool | m_showLegacy5ZoneWarning |
PROGRESS_REPORTER * | m_progressReporter |
optional; may be nullptr | |
TIME_PT | m_lastProgressTime |
for progress reporting | |
unsigned | m_lineCount |
for progress reporting | |
std::map< EDA_TEXT *, std::tuple< wxString, bool, bool > > | m_fontTextMap |
std::vector< GROUP_INFO > | m_groupInfos |
std::vector< GENERATOR_INFO > | m_generatorInfos |
std::function< bool(wxString aTitle, int aIcon, wxString aMsg, wxString aAction)> | m_queryUserCallback |
Read a Pcbnew s-expression formatted LINE_READER object and returns the appropriate BOARD_ITEM object.
Definition at line 76 of file pcb_io_kicad_sexpr_parser.h.
|
private |
The type of the time stamps.
Definition at line 406 of file pcb_io_kicad_sexpr_parser.h.
typedef std::unordered_map< wxString, KIID > PCB_IO_KICAD_SEXPR_PARSER::KIID_MAP |
Definition at line 82 of file pcb_io_kicad_sexpr_parser.h.
typedef std::unordered_map< std::string, PCB_LAYER_ID > PCB_IO_KICAD_SEXPR_PARSER::LAYER_ID_MAP |
Definition at line 80 of file pcb_io_kicad_sexpr_parser.h.
typedef std::unordered_map< std::string, LSET > PCB_IO_KICAD_SEXPR_PARSER::LSET_MAP |
Definition at line 81 of file pcb_io_kicad_sexpr_parser.h.
|
private |
Definition at line 409 of file pcb_io_kicad_sexpr_parser.h.
|
private |
The clock used for the timestamp (guaranteed to be monotonic).
Definition at line 403 of file pcb_io_kicad_sexpr_parser.h.
|
inline |
Definition at line 84 of file pcb_io_kicad_sexpr_parser.h.
References init().
|
private |
Definition at line 140 of file pcb_io_kicad_sexpr_parser.cpp.
References _, delta, PROGRESS_REPORTER::KeepRefreshing(), m_lastProgressTime, m_lineCount, m_progressReporter, PROGRESS_REPORTER::SetCurrentProgress(), and THROW_IO_ERROR.
Referenced by parseBOARD_unchecked().
|
private |
Create a mapping from the (short-lived) bug where layer names were translated.
aMap | string mapping from translated to English layer names. |
Definition at line 1860 of file pcb_io_kicad_sexpr_parser.cpp.
Referenced by parseLayers().
|
private |
Definition at line 7411 of file pcb_io_kicad_sexpr_parser.cpp.
References m_appendToExisting, and m_resetKIIDMap.
Referenced by parseARC(), parseDIMENSION(), parseFOOTPRINT_unchecked(), parseGENERATOR(), parseGROUP(), parsePAD(), parsePCB_REFERENCE_IMAGE(), parsePCB_SHAPE(), parsePCB_TARGET(), parsePCB_TEXT_effects(), parsePCB_TRACK(), parsePCB_VIA(), parseTextBoxContent(), and parseZONE().
|
inlineprivate |
Definition at line 156 of file pcb_io_kicad_sexpr_parser.h.
References m_netCodes.
Referenced by parseARC(), parsePAD(), parsePCB_SHAPE(), parsePCB_TRACK(), parsePCB_VIA(), and parseZONE().
wxString PCB_IO_KICAD_SEXPR_PARSER::GetRequiredVersion | ( | ) |
Return a string representing the version of KiCad required to open this file.
Not particularly meaningful if IsTooRecent() returns false.
Definition at line 272 of file pcb_io_kicad_sexpr_parser.cpp.
References _, m_requiredVersion, and THROW_PARSE_ERROR.
Referenced by PCB_IO_KICAD_SEXPR::DoLoad(), CLIPBOARD_IO::LoadBoard(), PCB_IO_KICAD_SEXPR::Parse(), parseBOARD(), and parseFOOTPRINT().
|
private |
Clear and re-establish m_layerMap with the default layer names.
m_layerMap will have some of its entries overwritten whenever a (new) board is encountered.
Definition at line 94 of file pcb_io_kicad_sexpr_parser.cpp.
References LSET::AllCuMask(), B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, In15_Cu, LSET::InternalCuMask(), m_layerIndices, m_layerMasks, m_requiredVersion, m_resetKIIDMap, m_showLegacy5ZoneWarning, m_showLegacySegmentZoneWarning, m_tooRecent, LSET::Name(), PCB_LAYER_ID_COUNT, StrPrintf(), and TO_UTF8.
Referenced by PCB_IO_KICAD_SEXPR_PARSER().
|
inline |
Return whether a version number, if any was parsed, was too recent.
Definition at line 113 of file pcb_io_kicad_sexpr_parser.h.
References m_tooRecent.
Referenced by PCB_IO_KICAD_SEXPR::DoLoad(), CLIPBOARD_IO::LoadBoard(), and PCB_IO_KICAD_SEXPR::Parse().
bool PCB_IO_KICAD_SEXPR_PARSER::IsValidBoardHeader | ( | ) |
Partially parse the input and check if it matches expected header.
Definition at line 808 of file pcb_io_kicad_sexpr_parser.cpp.
References m_groupInfos.
Referenced by PCB_IO_KICAD_SEXPR::CanReadBoard().
|
private |
Parse the current token for the layer definition of a BOARD_ITEM object.
aMap | is the LAYER_{NUM|MSK}_MAP to use for the lookup. |
IO_ERROR | if the layer is not valid. |
PARSE_ERROR | if the layer syntax is incorrect. |
Definition at line 2062 of file pcb_io_kicad_sexpr_parser.cpp.
References m_undefinedLayers, and Rescue.
Referenced by parseBoardItemLayer(), parsePAD(), parsePadstack(), parsePCB_VIA(), and parseViastack().
Definition at line 2051 of file pcb_io_kicad_sexpr_parser.cpp.
References Rescue.
Referenced by parseBoardItemLayersAsMask().
BOARD_ITEM * PCB_IO_KICAD_SEXPR_PARSER::Parse | ( | ) |
Definition at line 828 of file pcb_io_kicad_sexpr_parser.cpp.
References _, EDA_ITEM::GetEmbeddedFiles(), KIFONT::FONT::GetFont(), m_board, m_fontTextMap, m_groupInfos, parseBOARD(), parseFOOTPRINT(), resolveGroups(), BOARD_ITEM::SetLocked(), text, THROW_PARSE_ERROR, and EMBEDDED_FILES::UpdateFontFiles().
Referenced by BOOST_FIXTURE_TEST_CASE(), PCB_IO_KICAD_SEXPR::DoLoad(), FP_CACHE::Load(), CLIPBOARD_IO::LoadBoard(), KIGIT_PCB_MERGE::Merge(), PCB_IO_KICAD_SEXPR::Parse(), parse(), readBoard(), and KI_TEST::ReadBoardItemFromStream().
|
private |
Definition at line 699 of file pcb_io_kicad_sexpr_parser.cpp.
References FP_3DMODEL::m_Filename, FP_3DMODEL::m_Offset, FP_3DMODEL::m_Opacity, FP_3DMODEL::m_Rotation, FP_3DMODEL::m_Scale, FP_3DMODEL::m_Show, parseDouble(), parseMaybeAbsentBool(), VECTOR3< T >::x, VECTOR3< T >::y, and VECTOR3< T >::z.
Referenced by parseFOOTPRINT_unchecked().
|
private |
Definition at line 6138 of file pcb_io_kicad_sexpr_parser.cpp.
References _, CurStrToKIID(), getNetCode(), m_board, parseBoardItemLayer(), parseBoardUnits(), parseHex(), parseInt(), parseLayersForCuItemWithSoldermask(), parseMaybeAbsentBool(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseBOARD_unchecked().
|
private |
Definition at line 889 of file pcb_io_kicad_sexpr_parser.cpp.
References GetRequiredVersion(), m_tooRecent, and parseBOARD_unchecked().
Referenced by Parse().
|
private |
Definition at line 905 of file pcb_io_kicad_sexpr_parser.cpp.
References _, BOARD::Add(), B_Cu, BOARD_FILE_HOST_VERSION, checkpoint(), Cmts_User, BOARD::Drawings(), F_Cu, BOARD::FinalizeBulkAdd(), BOARD::FixupEmbeddedData(), BOARD::Footprints(), BOARD::GetEmbeddedFiles(), BOARD::GetEnabledLayers(), BOARD::GetLayerName(), ZONE::GetLayerSet(), m_board, m_generatorVersion, BOARD::m_LegacyNetclassesLoaded, m_queryUserCallback, m_requiredVersion, m_undefinedLayers, parseARC(), parseBoardProperty(), parseBool(), parseDIMENSION(), EMBEDDED_FILES_PARSER::ParseEmbedded(), parseFOOTPRINT(), parseGeneralSection(), parseGENERATOR(), parseGROUP(), parseHeader(), parseLayers(), parseNETCLASS(), parseNETINFO_ITEM(), parsePAGE_INFO(), parsePCB_REFERENCE_IMAGE(), parsePCB_SHAPE(), parsePCB_TABLE(), parsePCB_TARGET(), parsePCB_TEXT(), parsePCB_TEXTBOX(), parsePCB_TRACK(), parsePCB_VIA(), parseSetup(), parseTITLE_BLOCK(), parseZONE(), PCB_VIA_T, Pgm(), Rescue, BASE_SET::reset(), BASE_SET::set(), EMBEDDED_FILES::SetAreFontsEmbedded(), BOARD::SetEnabledLayers(), BOARD::SetGenerator(), ZONE::SetLayerSet(), BOARD::SetProperties(), SEXPR_BOARD_FILE_VERSION, THROW_IO_ERROR, THROW_PARSE_ERROR, BOARD::Tracks(), via, IO_ERROR::What(), and BOARD::Zones().
Referenced by parseBOARD().
|
private |
Parse the layer definition of a BOARD_ITEM object.
IO_ERROR | if the layer is not valid. |
PARSE_ERROR | if the layer syntax is incorrect. |
Definition at line 2081 of file pcb_io_kicad_sexpr_parser.cpp.
References lookUpLayer(), m_layerIndices, and UNDEFINED_LAYER.
Referenced by parseARC(), parseDIMENSION(), parseFOOTPRINT_unchecked(), parseGENERATOR(), parsePCB_REFERENCE_IMAGE(), parsePCB_SHAPE(), parsePCB_TABLE(), parsePCB_TARGET(), parsePCB_TEXT_effects(), parsePCB_TRACK(), parseTextBoxContent(), and parseZONE().
|
private |
Parse the layers definition of a BOARD_ITEM object.
IO_ERROR | if any of the layers is not valid. |
PARSE_ERROR | if the layers syntax is incorrect. |
Definition at line 2096 of file pcb_io_kicad_sexpr_parser.cpp.
References lookUpLayerSet(), and m_layerMasks.
Referenced by parseLayersForCuItemWithSoldermask(), parsePAD(), parsePCB_SHAPE(), and parseZONE().
|
private |
Definition at line 422 of file pcb_io_kicad_sexpr_parser.cpp.
Referenced by parseBOARD_unchecked().
|
private |
Definition at line 1639 of file pcb_io_kicad_sexpr_parser.cpp.
References BOARD_STACKUP::Add(), BOARD_STACKUP_ITEM::AddDielectricPrms(), B_Mask, B_Paste, B_SilkS, BS_EDGE_CONNECTOR_BEVELLED, BS_EDGE_CONNECTOR_IN_USE, BS_EDGE_CONNECTOR_NONE, BS_ITEM_TYPE_COPPER, BS_ITEM_TYPE_DIELECTRIC, BS_ITEM_TYPE_SILKSCREEN, BS_ITEM_TYPE_SOLDERMASK, BS_ITEM_TYPE_SOLDERPASTE, BS_ITEM_TYPE_UNDEFINED, color, DEFAULT_SOLDERMASK_OPACITY, F_Mask, F_Paste, F_SilkS, BOARD::GetDesignSettings(), BOARD::GetLayerID(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), BOARD_STACKUP_ITEM::GetType(), m_board, BOARD_STACKUP::m_CastellatedPads, BOARD_STACKUP::m_EdgeConnectorConstraints, BOARD_STACKUP::m_EdgePlating, BOARD_STACKUP::m_FinishType, BOARD_STACKUP::m_HasDielectricConstrains, BOARD_DESIGN_SETTINGS::m_HasStackup, m_requiredVersion, name, parseBoardUnits(), parseDouble(), BOARD_STACKUP_ITEM::SetBrdLayerId(), BOARD_STACKUP_ITEM::SetColor(), BOARD_STACKUP_ITEM::SetDielectricLayerId(), BOARD_STACKUP_ITEM::SetEpsilonR(), BOARD_STACKUP_ITEM::SetLossTangent(), BOARD_STACKUP_ITEM::SetMaterial(), BOARD_STACKUP_ITEM::SetThickness(), BOARD_STACKUP_ITEM::SetThicknessLocked(), BOARD_STACKUP_ITEM::SetTypeName(), skipCurrent(), and UNDEFINED_LAYER.
Referenced by parseSetup().
|
private |
Parse the current token as an ASCII numeric string with possible leading whitespace into a double precision floating point number.
IO_ERROR | if an error occurs attempting to convert the current token. |
Definition at line 195 of file pcb_io_kicad_sexpr_parser.cpp.
References INT_LIMIT, EDA_IU_SCALE::IU_PER_MM, KiROUND(), parseDouble(), and pcbIUScale.
Referenced by parseARC(), parseBoardStackup(), parseBoardUnits(), parseDefaults(), parseDefaultTextDims(), parseDIMENSION(), parseEDA_TEXT(), parseFOOTPRINT_unchecked(), parseGeneralSection(), parseGENERATOR(), parseMargins(), parseNETCLASS(), parseOutlinePoints(), parsePAD(), parsePadstack(), parsePCB_REFERENCE_IMAGE(), parsePCB_SHAPE(), parsePCB_TABLE(), parsePCB_TARGET(), parsePCB_TEXT_effects(), parsePCB_TRACK(), parsePCB_VIA(), parseSetup(), parseTEARDROP_PARAMETERS(), parseTextBoxContent(), parseViastack(), parseXY(), and parseZONE().
|
private |
Definition at line 212 of file pcb_io_kicad_sexpr_parser.cpp.
References INT_LIMIT, EDA_IU_SCALE::IU_PER_MM, KiROUND(), parseDouble(), and pcbIUScale.
|
inlineprivate |
Definition at line 349 of file pcb_io_kicad_sexpr_parser.h.
References parseBoardUnits().
|
private |
Definition at line 223 of file pcb_io_kicad_sexpr_parser.cpp.
Referenced by parseBOARD_unchecked(), parseFOOTPRINT_unchecked(), parseGROUP(), parsePCB_REFERENCE_IMAGE(), parsePCB_TABLE(), parsePCB_TEXT_effects(), parseSetup(), parseTextBoxContent(), and parseZONE().
|
private |
Definition at line 2524 of file pcb_io_kicad_sexpr_parser.cpp.
References LAYER_CLASS_COPPER, LAYER_CLASS_COURTYARD, LAYER_CLASS_EDGES, LAYER_CLASS_FAB, LAYER_CLASS_OTHERS, LAYER_CLASS_SILK, m_board, BOARD_DESIGN_SETTINGS::m_CopperEdgeClearance, BOARD_DESIGN_SETTINGS::m_DimensionPrecision, BOARD_DESIGN_SETTINGS::m_DimensionUnitsMode, BOARD::m_LegacyCopperEdgeClearanceLoaded, BOARD_DESIGN_SETTINGS::m_LineThickness, parseBoardUnits(), parseDefaultTextDims(), and parseInt().
Referenced by parseSetup().
|
private |
Definition at line 2608 of file pcb_io_kicad_sexpr_parser.cpp.
References BOARD_DESIGN_SETTINGS::m_TextItalic, BOARD_DESIGN_SETTINGS::m_TextSize, BOARD_DESIGN_SETTINGS::m_TextThickness, BOARD_DESIGN_SETTINGS::m_TextUpright, parseBoardUnits(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseDefaults().
|
private |
Definition at line 3864 of file pcb_io_kicad_sexpr_parser.cpp.
References CurStrToKIID(), EDA_UNIT_UTILS::FetchUnitsFromString(), locked, m_board, ortho, parseBoardItemLayer(), parseBoardUnits(), parseInt(), parseMaybeAbsentBool(), parsePCB_TEXT(), parseXY(), PCB_DIM_ALIGNED_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_DIM_ALIGNED::SetExtensionHeight(), PCB_DIM_ALIGNED::SetHeight(), PCB_DIM_RADIAL::SetLeaderLength(), PCB_DIM_LEADER::SetTextBorder(), PCB_DIM_ALIGNED::UpdateHeight(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseBOARD_unchecked(), and parseFOOTPRINT_unchecked().
|
private |
Parse the common settings for any object derived from EDA_TEXT.
PARSE_ERROR | if the text syntax is not valid. |
Definition at line 500 of file pcb_io_kicad_sexpr_parser.cpp.
References ConvertToNewOverbarNotation(), EDA_TEXT::GetText(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, EDA_TEXT::IsBold(), EDA_TEXT::IsItalic(), EDA_IU_SCALE::IU_PER_MM, m_fontTextMap, m_requiredVersion, parseBoardUnits(), parseDouble(), parseMaybeAbsentBool(), pcbIUScale, EDA_TEXT::SetBoldFlag(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetItalicFlag(), EDA_TEXT::SetLineSpacing(), EDA_TEXT::SetMirrored(), EDA_TEXT::SetText(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetTextThickness(), EDA_TEXT::SetVertJustify(), EDA_TEXT::SetVisible(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parsePCB_TEXT_effects(), and parseTextBoxContent().
FOOTPRINT * PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT | ( | wxArrayString * | aInitialComments = nullptr | ) |
aInitialComments | may be a pointer to a heap allocated initial comment block or NULL. If not NULL, then caller has given ownership of a wxArrayString to this function and care must be taken to delete it even on exception. |
Definition at line 4332 of file pcb_io_kicad_sexpr_parser.cpp.
References GetRequiredVersion(), m_tooRecent, and parseFOOTPRINT_unchecked().
Referenced by Parse(), and parseBOARD_unchecked().
|
private |
Definition at line 4348 of file pcb_io_kicad_sexpr_parser.cpp.
References _, B_Cu, B_Fab, CurStrToKIID(), DEGREES_T, DESCRIPTION_FIELD, Edge_Cuts, F_Cu, F_Fab, FP_ALLOW_MISSING_COURTYARD, FP_ALLOW_SOLDERMASK_BRIDGES, FP_BOARD_ONLY, FP_DNP, FP_EXCLUDE_FROM_BOM, FP_EXCLUDE_FROM_POS_FILES, FP_SMD, FP_THROUGH_HOLE, From_UTF8(), BOARD::GetComponentClassManager(), BOARD::GetDesignSettings(), COMPONENT_CLASS_MANAGER::GetEffectiveComponentClass(), COMPONENT_CLASS_MANAGER::GetNoneComponentClass(), image, LEGACY_NET_TIES, m_board, m_fontTextMap, m_generatorVersion, m_layerIndices, m_requiredVersion, m_tooRecent, Margin, name, pad, LIB_ID::Parse(), parse3DModel(), parseBoardItemLayer(), parseBoardUnits(), parseBool(), parseDIMENSION(), parseDouble(), EMBEDDED_FILES_PARSER::ParseEmbedded(), parseGROUP(), parseHex(), parseInt(), parseMaybeAbsentBool(), parsePAD(), parsePCB_REFERENCE_IMAGE(), parsePCB_SHAPE(), parsePCB_TABLE(), parsePCB_TEXT(), parsePCB_TEXT_effects(), parsePCB_TEXTBOX(), parseZONE(), REFERENCE_FIELD, removeReplaceEntryInFontTextMap(), BASE_SET::set(), BOARD_ITEM::SetLayer(), EDA_TEXT::SetText(), EDA_TEXT::SetVisible(), SEXPR_BOARD_FILE_VERSION, PCB_TEXT::StyleFromSettings(), text, THROW_IO_ERROR, VALUE_FIELD, IO_ERROR::What(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseFOOTPRINT().
|
private |
Definition at line 1381 of file pcb_io_kicad_sexpr_parser.cpp.
References BOARD::GetDesignSettings(), m_board, parseBoardUnits(), parseMaybeAbsentBool(), BOARD_DESIGN_SETTINGS::SetBoardThickness(), and BOARD::SetLegacyTeardrops().
Referenced by parseBOARD_unchecked().
|
private |
Definition at line 5999 of file pcb_io_kicad_sexpr_parser.cpp.
References CurStrToKIID(), F_Cu, PCB_IO_KICAD_SEXPR_PARSER::GENERATOR_INFO::genType, EDA_IU_SCALE::IU_PER_MM, PCB_IO_KICAD_SEXPR_PARSER::GENERATOR_INFO::layer, PCB_IO_KICAD_SEXPR_PARSER::GROUP_INFO::locked, m_generatorInfos, PCB_IO_KICAD_SEXPR_PARSER::GROUP_INFO::name, PCB_IO_KICAD_SEXPR_PARSER::GROUP_INFO::parent, parseBoardItemLayer(), parseBoardUnits(), parseDouble(), parseGROUP_members(), parseOutlinePoints(), pcbIUScale, PCB_IO_KICAD_SEXPR_PARSER::GENERATOR_INFO::properties, PCB_IO_KICAD_SEXPR_PARSER::GROUP_INFO::uuid, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseBOARD_unchecked().
|
private |
Definition at line 5943 of file pcb_io_kicad_sexpr_parser.cpp.
References CurStrToKIID(), PCB_IO_KICAD_SEXPR_PARSER::GROUP_INFO::locked, m_groupInfos, PCB_IO_KICAD_SEXPR_PARSER::GROUP_INFO::name, PCB_IO_KICAD_SEXPR_PARSER::GROUP_INFO::parent, parseBool(), parseGROUP_members(), and PCB_IO_KICAD_SEXPR_PARSER::GROUP_INFO::uuid.
Referenced by parseBOARD_unchecked(), and parseFOOTPRINT_unchecked().
|
private |
Definition at line 5928 of file pcb_io_kicad_sexpr_parser.cpp.
References PCB_IO_KICAD_SEXPR_PARSER::GROUP_INFO::memberUuids.
Referenced by parseGENERATOR(), and parseGROUP().
|
private |
Definition at line 1355 of file pcb_io_kicad_sexpr_parser.cpp.
References m_board, m_requiredVersion, m_tooRecent, parseInt(), BOARD::SetFileFormatVersionAtLoad(), and SEXPR_BOARD_FILE_VERSION.
Referenced by parseBOARD_unchecked().
|
inlineprivate |
Definition at line 365 of file pcb_io_kicad_sexpr_parser.h.
Referenced by parseARC(), parseFOOTPRINT_unchecked(), parsePCB_SHAPE(), parsePCB_TRACK(), parsePCB_VIA(), and parseSetup().
|
inlineprivate |
Definition at line 354 of file pcb_io_kicad_sexpr_parser.h.
Referenced by parseARC(), parseDefaults(), parseDIMENSION(), parseFOOTPRINT_unchecked(), parseHeader(), parseInt(), parseLayer(), parseNETINFO_ITEM(), parsePAD(), parsePadstack(), parsePCB_SHAPE(), parsePCB_TABLE(), parsePCB_TRACK(), parsePCB_VIA(), parseTEARDROP_PARAMETERS(), parseTextBoxContent(), parseTITLE_BLOCK(), and parseZONE().
|
inlineprivate |
Definition at line 359 of file pcb_io_kicad_sexpr_parser.h.
References parseInt().
|
private |
Definition at line 1582 of file pcb_io_kicad_sexpr_parser.cpp.
References LAYER::clear(), From_UTF8(), LAYER::m_name, LAYER::m_number, LAYER::m_type, LAYER::m_userName, LAYER::m_visible, name, LSET::Name(), parseInt(), and LAYER::ParseType().
Referenced by parseLayers().
|
private |
Definition at line 1910 of file pcb_io_kicad_sexpr_parser.cpp.
References _, B_Cu, createOldLayerMapping(), F_Cu, LT_UNDEFINED, m_board, m_layerIndices, m_layerMasks, BOARD::m_LegacyVisibleLayers, LAYER::m_name, LAYER::m_number, m_requiredVersion, LAYER::m_type, LAYER::m_visible, name, LSET::NameToLayer(), parseLayer(), BASE_SET::set(), BOARD::SetCopperLayerCount(), BOARD::SetEnabledLayers(), BOARD::SetLayerDescr(), THROW_IO_ERROR, and THROW_PARSE_ERROR.
Referenced by parseBOARD_unchecked().
|
private |
Parse the layers definition of a BOARD_ITEM object that has a single copper layer and optional soldermask layer.
IO_ERROR | if any of the layers is not valid. |
PARSE_ERROR | if the layers syntax is incorrect. |
Definition at line 2112 of file pcb_io_kicad_sexpr_parser.cpp.
References LSET::AllCuMask(), B_Cu, B_Mask, F_Cu, F_Mask, LSET::InternalCuMask(), and parseBoardItemLayersAsMask().
Referenced by parseARC(), and parsePCB_TRACK().
|
private |
Definition at line 413 of file pcb_io_kicad_sexpr_parser.cpp.
References parseBoardUnits().
Referenced by parseTextBoxContent().
|
private |
Parses a boolean flag inside a list that existed before boolean normalization.
For example, this will handle both (legacy_teardrops) and (legacy_teardrops yes). Call this after parsing the T_legacy_teardrops, and aDefaultValue will be returned for the first case, or true will be returned for the second case.
aDefaultValue | will be returned if the end of the list is encountered as the next token |
Definition at line 241 of file pcb_io_kicad_sexpr_parser.cpp.
References DSN_RIGHT.
Referenced by parse3DModel(), parseARC(), parseDIMENSION(), parseEDA_TEXT(), parseFOOTPRINT_unchecked(), parseGeneralSection(), parsePAD(), parsePCB_SHAPE(), parsePCB_TEXT_effects(), parsePCB_TRACK(), parsePCB_VIA(), parseTEARDROP_PARAMETERS(), and parseTextBoxContent().
|
private |
Definition at line 2676 of file pcb_io_kicad_sexpr_parser.cpp.
References _, ConvertToNewOverbarNotation(), BOARD::GetDesignSettings(), m_board, BOARD_DESIGN_SETTINGS::m_NetSettings, m_requiredVersion, parseBoardUnits(), and THROW_IO_ERROR.
Referenced by parseBOARD_unchecked().
|
private |
Definition at line 2645 of file pcb_io_kicad_sexpr_parser.cpp.
References BOARD::Add(), ConvertToNewOverbarNotation(), BOARD::FindNet(), NETINFO_ITEM::GetNetCode(), m_board, m_requiredVersion, name, parseInt(), pushValueIntoMap(), and NETINFO_LIST::UNCONNECTED.
Referenced by parseBOARD_unchecked().
|
private |
Parses possible outline points and stores them into aPoly
.
This accepts points for DRAWSEGMENT polygons, EDGEMODULE polygons and ZONE_CONTAINER polygons. Points and arcs are added to the most recent outline
aPoly | polygon container to add points and arcs |
Definition at line 316 of file pcb_io_kicad_sexpr_parser.cpp.
References SHAPE_LINE_CHAIN::Append(), parseBoardUnits(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseGENERATOR(), parsePCB_SHAPE(), parseRenderCache(), parseTextBoxContent(), and parseZONE().
Definition at line 4950 of file pcb_io_kicad_sexpr_parser.cpp.
References _, PADSTACK::ALL_LAYERS, LSET::AllCuMask(), ANGLE_45, ANGLE_90, ConvertToNewOverbarNotation(), CurStrToKIID(), DEGREES_T, delta, BOARD::FindNet(), getNetCode(), NETINFO_ITEM::GetNetname(), IsCopperLayer(), lookUpLayer(), m_board, m_layerIndices, m_requiredVersion, EDA_IU_SCALE::mmToIU(), NETINFO_LIST::ORPHANED, pad, parseBoardItemLayersAsMask(), parseBoardUnits(), parseDouble(), parseInt(), parseMaybeAbsentBool(), parsePAD_option(), parsePadstack(), parsePCB_SHAPE(), parseTEARDROP_PARAMETERS(), pcbIUScale, RECT_CHAMFER_BOTTOM_LEFT, RECT_CHAMFER_BOTTOM_RIGHT, RECT_CHAMFER_TOP_LEFT, RECT_CHAMFER_TOP_RIGHT, RECT_NO_CHAMFER, LSET::Seq(), PCB_SHAPE::SetIsProxyItem(), VECTOR2< T >::x, VECTOR2< T >::y, ZLO_FORCE_FLASHED, and ZLO_FORCE_NO_ZONE_CONNECTION.
Referenced by parseFOOTPRINT_unchecked().
|
private |
Definition at line 5509 of file pcb_io_kicad_sexpr_parser.cpp.
References PADSTACK::ALL_LAYERS, PADSTACK::CONVEXHULL, PADSTACK::OUTLINE, PAD::SetAnchorPadShape(), and PAD::SetCustomShapeInZoneOpt().
Referenced by parsePAD().
|
private |
Definition at line 5581 of file pcb_io_kicad_sexpr_parser.cpp.
References _, PADSTACK::AddPrimitive(), PADSTACK::Clearance(), PADSTACK::CUSTOM, DEGREES_T, delta, PADSTACK::FRONT_INNER_BACK, PADSTACK::INNER_LAYERS, IsCopperLayer(), lookUpLayer(), m_layerIndices, PADSTACK::Mode(), PAD::Padstack(), parseBoardUnits(), parseDouble(), parseInt(), parsePCB_SHAPE(), parseTenting(), RECT_CHAMFER_BOTTOM_LEFT, RECT_CHAMFER_BOTTOM_RIGHT, RECT_CHAMFER_TOP_LEFT, RECT_CHAMFER_TOP_RIGHT, RECT_NO_CHAMFER, PADSTACK::SetAnchorShape(), PAD::SetChamferPositions(), PAD::SetChamferRectRatio(), PAD::SetDelta(), PCB_SHAPE::SetIsProxyItem(), PADSTACK::SetMode(), PAD::SetOffset(), PAD::SetRoundRectRadiusRatio(), PAD::SetShape(), PAD::SetSize(), PADSTACK::SetThermalSpokeAngle(), PADSTACK::ThermalGap(), PADSTACK::ThermalSpokeWidth(), THROW_IO_ERROR, UNDEFINED_LAYER, VECTOR2< T >::x, VECTOR2< T >::y, and PADSTACK::ZoneConnection().
Referenced by parsePAD().
|
private |
Definition at line 1418 of file pcb_io_kicad_sexpr_parser.cpp.
References _, PAGE_INFO::Custom, m_board, m_requiredVersion, MAX_PAGE_SIZE_PCBNEW_MM, MIN_PAGE_SIZE_MM, parseDouble(), PAGE_INFO::SetHeightMM(), BOARD::SetPageSettings(), PAGE_INFO::SetPortrait(), PAGE_INFO::SetType(), PAGE_INFO::SetWidthMM(), and THROW_PARSE_ERROR.
Referenced by parseBOARD_unchecked().
|
private |
Definition at line 3201 of file pcb_io_kicad_sexpr_parser.cpp.
References _, CurStrToKIID(), REFERENCE_IMAGE::GetImageScale(), locked, parseBoardItemLayer(), parseBoardUnits(), parseBool(), parseDouble(), REFERENCE_IMAGE::ReadImageFile(), REFERENCE_IMAGE::SetImageScale(), THROW_IO_ERROR, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseBOARD_unchecked(), and parseFOOTPRINT_unchecked().
|
private |
Definition at line 2780 of file pcb_io_kicad_sexpr_parser.cpp.
References _, ARC_HIGH_DEF, CurStrToKIID(), DEFAULT_LINE_WIDTH, DEGREES_T, Edge_Cuts, getNetCode(), BOARD_ITEM::GetParentFootprint(), STROKE_PARAMS::GetWidth(), EDA_IU_SCALE::IU_PER_MM, LEGACY_ARC_FORMATTING, locked, m_requiredVersion, EDA_IU_SCALE::mmToIU(), parseBoardItemLayer(), parseBoardItemLayersAsMask(), parseBoardUnits(), parseDouble(), parseHex(), parseInt(), parseMaybeAbsentBool(), parseOutlinePoints(), STROKE_PARAMS_PARSER::ParseStroke(), parseXY(), PCB_FOOTPRINT_T, pcbIUScale, STROKE_PARAMS::SetWidth(), EDA_ITEM::Type(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseBOARD_unchecked(), parseFOOTPRINT_unchecked(), parsePAD(), and parsePadstack().
|
private |
Definition at line 3696 of file pcb_io_kicad_sexpr_parser.cpp.
References DEGREES_T, BOARD_ITEM::GetParentFootprint(), EDA_IU_SCALE::IU_PER_MM, parseBoardItemLayer(), parseBoardUnits(), parseBool(), parseDouble(), parseInt(), parsePCB_TABLECELL(), STROKE_PARAMS_PARSER::ParseStroke(), and pcbIUScale.
Referenced by parseBOARD_unchecked(), and parseFOOTPRINT_unchecked().
|
private |
Definition at line 3519 of file pcb_io_kicad_sexpr_parser.cpp.
References parseTextBoxContent().
Referenced by parsePCB_TABLE().
|
private |
Definition at line 7333 of file pcb_io_kicad_sexpr_parser.cpp.
References CurStrToKIID(), parseBoardItemLayer(), parseBoardUnits(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseBOARD_unchecked().
|
private |
Definition at line 3299 of file pcb_io_kicad_sexpr_parser.cpp.
References _, DSN_NUMBER, parsePCB_TEXT_effects(), REFERENCE_FIELD, text, THROW_IO_ERROR, and VALUE_FIELD.
Referenced by parseBOARD_unchecked(), parseDIMENSION(), and parseFOOTPRINT_unchecked().
|
private |
Definition at line 3365 of file pcb_io_kicad_sexpr_parser.cpp.
References ANGLE_0, CurStrToKIID(), DEGREES_T, DSN_RIGHT, FOOTPRINT::GetOrientation(), BOARD_ITEM::GetParent(), FOOTPRINT::GetPosition(), EDA_TEXT::GetTextAngle(), EDA_ITEM::m_Uuid, PCB_TEXT::Move(), parseBoardItemLayer(), parseBoardUnits(), parseBool(), parseDouble(), parseEDA_TEXT(), parseMaybeAbsentBool(), parseRenderCache(), PCB_TEXT::Rotate(), BOARD_ITEM::SetIsKnockout(), EDA_TEXT::SetKeepUpright(), BOARD_ITEM::SetLayer(), BOARD_ITEM::SetLocked(), EDA_TEXT::SetTextAngle(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetVisible(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseFOOTPRINT_unchecked(), and parsePCB_TEXT().
|
private |
Definition at line 3506 of file pcb_io_kicad_sexpr_parser.cpp.
References parseTextBoxContent().
Referenced by parseBOARD_unchecked(), and parseFOOTPRINT_unchecked().
|
private |
Definition at line 6240 of file pcb_io_kicad_sexpr_parser.cpp.
References _, CurStrToKIID(), getNetCode(), m_board, parseBoardItemLayer(), parseBoardUnits(), parseHex(), parseInt(), parseLayersForCuItemWithSoldermask(), parseMaybeAbsentBool(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseBOARD_unchecked().
|
private |
Definition at line 6335 of file pcb_io_kicad_sexpr_parser.cpp.
References _, PADSTACK::ALL_LAYERS, LSET::AllCuMask(), CurStrToKIID(), getNetCode(), IsCopperLayer(), PADSTACK::KEEP_ALL, lookUpLayer(), m_board, m_layerIndices, parseBoardUnits(), parseHex(), parseInt(), parseMaybeAbsentBool(), parseTEARDROP_PARAMETERS(), parseTenting(), parseViastack(), LSET::Seq(), UNDEFINED_LAYER, via, VECTOR2< T >::x, VECTOR2< T >::y, ZLO_FORCE_FLASHED, and ZLO_FORCE_NO_ZONE_CONNECTION.
Referenced by parseBOARD_unchecked().
|
private |
Parse the render cache for any object derived from EDA_TEXT.
PARSE_ERROR | if the text syntax is not valid. |
Definition at line 649 of file pcb_io_kicad_sexpr_parser.cpp.
References SHAPE_POLY_SET::AddHole(), SHAPE_POLY_SET::AddOutline(), DEGREES_T, From_UTF8(), SHAPE_POLY_SET::OutlineCount(), parseDouble(), parseOutlinePoints(), SHAPE_LINE_CHAIN::SetClosed(), and text.
Referenced by parsePCB_TEXT_effects(), and parseTextBoxContent().
|
private |
Definition at line 2136 of file pcb_io_kicad_sexpr_parser.cpp.
References PADSTACK::ALL_LAYERS, BOARD_STACKUP::BuildDefaultStackupList(), alg::contains(), GAL_SET::DefaultVisible(), BOARD::GetCopperLayerCount(), BOARD_DESIGN_SETTINGS::GetDefaultZoneSettings(), BOARD::GetDesignSettings(), PCB_PLOT_PARAMS::GetLegacyPlotViaOnMaskLayer(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), LAYER_CLASS_COPPER, LAYER_CLASS_EDGES, LAYER_CLASS_SILK, BOARD_DESIGN_SETTINGS::m_AllowSoldermaskBridgesInFPs, m_appendToExisting, m_board, BOARD_DESIGN_SETTINGS::m_DiffPairDimensionsList, BOARD_DESIGN_SETTINGS::m_HasStackup, BOARD_DESIGN_SETTINGS::m_HoleToHoleMin, BOARD::m_LegacyDesignSettingsLoaded, BOARD::m_LegacyVisibleItems, BOARD_DESIGN_SETTINGS::m_LineThickness, BOARD_DESIGN_SETTINGS::m_MaxError, BOARD_DESIGN_SETTINGS::m_MicroViasMinDrill, BOARD_DESIGN_SETTINGS::m_MicroViasMinSize, BOARD_DESIGN_SETTINGS::m_MinClearance, BOARD_DESIGN_SETTINGS::m_MinThroughDrill, BOARD_DESIGN_SETTINGS::m_NetSettings, BOARD_DESIGN_SETTINGS::m_Pad_Master, BOARD_DESIGN_SETTINGS::m_SolderMaskExpansion, BOARD_DESIGN_SETTINGS::m_SolderMaskMinWidth, BOARD_DESIGN_SETTINGS::m_SolderPasteMargin, BOARD_DESIGN_SETTINGS::m_SolderPasteMarginRatio, BOARD_DESIGN_SETTINGS::m_TentViasBack, BOARD_DESIGN_SETTINGS::m_TentViasFront, BOARD_DESIGN_SETTINGS::m_TextSize, BOARD_DESIGN_SETTINGS::m_TextThickness, BOARD_DESIGN_SETTINGS::m_TrackMinWidth, BOARD_DESIGN_SETTINGS::m_TrackWidthList, BOARD_DESIGN_SETTINGS::m_ViasDimensionsList, BOARD_DESIGN_SETTINGS::m_ViasMinAnnularWidth, BOARD_DESIGN_SETTINGS::m_ViasMinSize, ZONE_SETTINGS::m_ZoneClearance, MIN_VISIBILITY_MASK, PCB_PLOT_PARAMS::Parse(), parseBoardStackup(), parseBoardUnits(), parseBool(), parseDefaults(), parseDouble(), parseHex(), BOARD_STACKUP::RemoveAll(), GAL_SET::set(), BOARD_DESIGN_SETTINGS::SetAuxOrigin(), BOARD_DESIGN_SETTINGS::SetGridOrigin(), BOARD::SetPlotOptions(), via, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseBOARD_unchecked().
|
private |
Definition at line 437 of file pcb_io_kicad_sexpr_parser.cpp.
References TEARDROP_PARAMETERS::m_AllowUseTwoTracks, TEARDROP_PARAMETERS::m_BestLengthRatio, TEARDROP_PARAMETERS::m_BestWidthRatio, TEARDROP_PARAMETERS::m_CurveSegCount, TEARDROP_PARAMETERS::m_Enabled, TEARDROP_PARAMETERS::m_TdMaxLen, TEARDROP_PARAMETERS::m_TdMaxWidth, TEARDROP_PARAMETERS::m_TdOnPadsInZones, TEARDROP_PARAMETERS::m_WidthtoSizeFilterRatio, parseBoardUnits(), parseDouble(), parseInt(), and parseMaybeAbsentBool().
Referenced by parsePAD(), and parsePCB_VIA().
|
private |
Definition at line 6493 of file pcb_io_kicad_sexpr_parser.cpp.
References PADSTACK::BackOuterLayers(), PADSTACK::FrontOuterLayers(), and PADSTACK::MASK_LAYER_PROPS::has_solder_mask.
Referenced by parsePadstack(), and parsePCB_VIA().
|
private |
Definition at line 3532 of file pcb_io_kicad_sexpr_parser.cpp.
References CurStrToKIID(), DEGREES_T, DSN_NUMBER, PCB_TEXTBOX::GetLegacyTextMargin(), BOARD_ITEM::GetParentFootprint(), EDA_SHAPE::GetPolyShape(), STROKE_PARAMS::GetWidth(), EDA_IU_SCALE::IU_PER_MM, left, m_requiredVersion, EDA_ITEM::m_Uuid, PCB_TEXTBOX::Move(), SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::Outline(), parseBoardItemLayer(), parseBoardUnits(), parseBool(), parseDouble(), parseEDA_TEXT(), parseInt(), parseMargins(), parseMaybeAbsentBool(), parseOutlinePoints(), parseRenderCache(), STROKE_PARAMS_PARSER::ParseStroke(), pcbIUScale, SHAPE_POLY_SET::RemoveAllContours(), right, PCB_TEXTBOX::Rotate(), PCB_TEXTBOX::SetBorderEnabled(), EDA_SHAPE::SetEnd(), PCB_SHAPE::SetLayer(), BOARD_ITEM::SetLocked(), PCB_TEXTBOX::SetMarginBottom(), PCB_TEXTBOX::SetMarginLeft(), PCB_TEXTBOX::SetMarginRight(), PCB_TEXTBOX::SetMarginTop(), EDA_SHAPE::SetShape(), EDA_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), and EDA_TEXT::SetText().
Referenced by parsePCB_TABLECELL(), and parsePCB_TEXTBOX().
|
private |
Definition at line 1474 of file pcb_io_kicad_sexpr_parser.cpp.
References m_board, parseInt(), TITLE_BLOCK::SetComment(), TITLE_BLOCK::SetCompany(), TITLE_BLOCK::SetDate(), TITLE_BLOCK::SetRevision(), TITLE_BLOCK::SetTitle(), BOARD::SetTitleBlock(), and THROW_PARSE_ERROR.
Referenced by parseBOARD_unchecked().
|
private |
Definition at line 6514 of file pcb_io_kicad_sexpr_parser.cpp.
References _, PADSTACK::CUSTOM, PADSTACK::FRONT_INNER_BACK, PADSTACK::INNER_LAYERS, IsCopperLayer(), lookUpLayer(), m_layerIndices, PADSTACK::Mode(), PCB_VIA::Padstack(), parseBoardUnits(), PADSTACK::SetMode(), PADSTACK::SetSize(), THROW_IO_ERROR, and UNDEFINED_LAYER.
Referenced by parsePCB_VIA().
|
private |
Parse a coordinate pair (xy X Y) in board units (mm).
The parser checks if the previous token was T_LEFT and parses the remainder of the token syntax. This is used when parsing a list of coordinate points. This way the parser can be used in either case.
PARSE_ERROR | if the coordinate pair syntax is incorrect. |
Definition at line 296 of file pcb_io_kicad_sexpr_parser.cpp.
References parseBoardUnits(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseDIMENSION(), parsePCB_SHAPE(), parseXY(), and parseZONE().
|
private |
Definition at line 401 of file pcb_io_kicad_sexpr_parser.cpp.
References parseXY(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
private |
Definition at line 6611 of file pcb_io_kicad_sexpr_parser.cpp.
References _, SEG::A, BOARD::Add(), ARC_HIGH_DEF, SEG::B, SHAPE_POLY_SET::BooleanAdd(), CurStrToKIID(), DEGREES_T, ERROR_OUTSIDE, BOARD::FindNet(), ZONE::GetDefaultHatchPitch(), NETINFO_ITEM::GetNetCode(), getNetCode(), BOARD::GetNetCount(), ignore_unused(), SHAPE_POLY_SET::IsEmpty(), EDA_IU_SCALE::IU_PER_MM, m_board, m_requiredVersion, m_showLegacy5ZoneWarning, m_showLegacySegmentZoneWarning, SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::Outline(), parseBoardItemLayer(), parseBoardItemLayersAsMask(), parseBoardUnits(), parseBool(), parseDouble(), parseInt(), parseOutlinePoints(), parseXY(), pcbIUScale, SHAPE_POLY_SET::PM_FAST, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, pushValueIntoMap(), SHAPE_LINE_CHAIN::SetClosed(), BOARD::SetLegacyTeardrops(), NETINFO_ITEM::SetNetCode(), ZONE_SETTINGS::SMOOTHING_CHAMFER, ZONE_SETTINGS::SMOOTHING_FILLET, ZONE_SETTINGS::SMOOTHING_NONE, TransformOvalToPolygon(), and NETINFO_LIST::UNCONNECTED.
Referenced by parseBOARD_unchecked(), and parseFOOTPRINT_unchecked().
|
private |
Add aValue value in netcode mapping (m_netCodes) at aIndex.
Ensure there is room in m_netCodes for that, and add room if needed.
aIndex | is the index ( expected >=0 )of the location to use in m_netCodes. |
aValue | is the netcode value to map. |
Definition at line 183 of file pcb_io_kicad_sexpr_parser.cpp.
References m_netCodes.
Referenced by parseNETINFO_ITEM(), and parseZONE().
|
private |
Remove an entry from m_fontTextMap.
Replace it by aReplacer if not nullptr The type of progress bar timeout
Definition at line 7395 of file pcb_io_kicad_sexpr_parser.cpp.
References m_fontTextMap.
Referenced by parseFOOTPRINT_unchecked().
|
private |
Called after parsing a footprint definition or board to build the group membership lists.
Definition at line 1245 of file pcb_io_kicad_sexpr_parser.cpp.
References _, FOOTPRINT::Add(), KIID::AsString(), GENERATORS_MGR::CreateFromType(), BOARD_ITEM::GetParentFootprint(), group, BOARD::GroupsSanityCheck(), GENERATORS_MGR::Instance(), m_appendToExisting, m_board, m_generatorInfos, m_groupInfos, m_resetKIIDMap, EDA_ITEM::m_Uuid, NOT_USED, PCB_FOOTPRINT_T, BOARD_ITEM::RunOnChildren(), PCB_GENERATOR::SetLayer(), PCB_GENERATOR::SetProperties(), THROW_IO_ERROR, and EDA_ITEM::Type().
Referenced by Parse().
|
private |
Skip the current token level, i.e search for the RIGHT parenthesis which closes the current description.
Definition at line 162 of file pcb_io_kicad_sexpr_parser.cpp.
Referenced by parseBoardStackup().
|
private |
reading into an existing board; reset UUIDs
if resetting UUIDs, record new ones to update groups with.
Definition at line 419 of file pcb_io_kicad_sexpr_parser.h.
Referenced by CurStrToKIID(), parseSetup(), and resolveGroups().
|
private |
Definition at line 411 of file pcb_io_kicad_sexpr_parser.h.
Referenced by Parse(), parseARC(), parseBOARD_unchecked(), parseBoardStackup(), parseDefaults(), parseDIMENSION(), parseFOOTPRINT_unchecked(), parseGeneralSection(), parseHeader(), parseLayers(), parseNETCLASS(), parseNETINFO_ITEM(), parsePAD(), parsePAGE_INFO(), parsePCB_TRACK(), parsePCB_VIA(), parseSetup(), parseTITLE_BLOCK(), parseZONE(), and resolveGroups().
|
private |
Definition at line 431 of file pcb_io_kicad_sexpr_parser.h.
Referenced by Parse(), parseEDA_TEXT(), parseFOOTPRINT_unchecked(), and removeReplaceEntryInFontTextMap().
|
private |
Definition at line 434 of file pcb_io_kicad_sexpr_parser.h.
Referenced by parseGENERATOR(), and resolveGroups().
|
private |
Set to the generator version this board requires.
Definition at line 418 of file pcb_io_kicad_sexpr_parser.h.
Referenced by parseBOARD_unchecked(), and parseFOOTPRINT_unchecked().
|
private |
Definition at line 433 of file pcb_io_kicad_sexpr_parser.h.
Referenced by IsValidBoardHeader(), Parse(), parseGROUP(), and resolveGroups().
|
private |
for progress reporting
Definition at line 428 of file pcb_io_kicad_sexpr_parser.h.
Referenced by checkpoint().
|
private |
map layer name to it's index
Definition at line 412 of file pcb_io_kicad_sexpr_parser.h.
Referenced by init(), parseBoardItemLayer(), parseFOOTPRINT_unchecked(), parseLayers(), parsePAD(), parsePadstack(), parsePCB_VIA(), and parseViastack().
|
private |
map layer names to their masks
Definition at line 413 of file pcb_io_kicad_sexpr_parser.h.
Referenced by init(), parseBoardItemLayersAsMask(), and parseLayers().
|
private |
for progress reporting
Definition at line 429 of file pcb_io_kicad_sexpr_parser.h.
Referenced by checkpoint().
|
private |
net codes mapping for boards being loaded
Definition at line 415 of file pcb_io_kicad_sexpr_parser.h.
Referenced by getNetCode(), and pushValueIntoMap().
|
private |
optional; may be nullptr
Definition at line 427 of file pcb_io_kicad_sexpr_parser.h.
Referenced by checkpoint().
|
private |
Definition at line 436 of file pcb_io_kicad_sexpr_parser.h.
Referenced by parseBOARD_unchecked().
|
private |
set to the KiCad format version this board requires
Definition at line 417 of file pcb_io_kicad_sexpr_parser.h.
Referenced by GetRequiredVersion(), init(), parseBOARD_unchecked(), parseBoardStackup(), parseEDA_TEXT(), parseFOOTPRINT_unchecked(), parseHeader(), parseLayers(), parseNETCLASS(), parseNETINFO_ITEM(), parsePAD(), parsePAGE_INFO(), parsePCB_SHAPE(), parseTextBoxContent(), and parseZONE().
|
private |
Definition at line 422 of file pcb_io_kicad_sexpr_parser.h.
Referenced by CurStrToKIID(), init(), and resolveGroups().
|
private |
Definition at line 425 of file pcb_io_kicad_sexpr_parser.h.
Referenced by init(), and parseZONE().
|
private |
Definition at line 424 of file pcb_io_kicad_sexpr_parser.h.
Referenced by init(), and parseZONE().
|
private |
true if version parses as later than supported
Definition at line 416 of file pcb_io_kicad_sexpr_parser.h.
Referenced by init(), IsTooRecent(), parseBOARD(), parseFOOTPRINT(), parseFOOTPRINT_unchecked(), and parseHeader().
|
private |
set of layers not defined in layers section
Definition at line 414 of file pcb_io_kicad_sexpr_parser.h.
Referenced by lookUpLayer(), and parseBOARD_unchecked().