KiCad PCB EDA Suite
|
Object to parser s-expression symbol library and schematic file formats. More...
#include <sch_io_kicad_sexpr_parser.h>
Public Member Functions | |
SCH_IO_KICAD_SEXPR_PARSER (LINE_READER *aLineReader=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr, unsigned aLineCount=0, SCH_SHEET *aRootSheet=nullptr, bool aIsAppending=false) | |
void | ParseLib (LIB_SYMBOL_MAP &aSymbolLibMap) |
LIB_SYMBOL * | ParseSymbol (LIB_SYMBOL_MAP &aSymbolLibMap, int aFileVersion=SEXPR_SYMBOL_LIB_FILE_VERSION) |
Parse internal LINE_READER object into symbols and return all found. | |
SCH_ITEM * | ParseSymbolDrawItem () |
void | ParseSchematic (SCH_SHEET *aSheet, bool aIsCopyablyOnly=false, int aFileVersion=SEXPR_SCHEMATIC_FILE_VERSION) |
Parse the internal LINE_READER object into aSheet. | |
int | GetParsedRequiredVersion () const |
Private Attributes | |
int | m_requiredVersion |
Set to the symbol library file version required. | |
wxString | m_generatorVersion |
int | m_unit |
The current unit being parsed. | |
int | m_bodyStyle |
The current body style being parsed. | |
wxString | m_symbolName |
The current symbol name. | |
bool | m_appending |
Appending load status. | |
std::set< int > | m_fieldIDsRead |
Field IDs that have been read so far for the current symbol. | |
std::set< KIID > | m_uuids |
std::map< EDA_TEXT *, std::tuple< wxString, bool, bool > > | m_fontTextMap |
PROGRESS_REPORTER * | m_progressReporter |
const LINE_READER * | m_lineReader |
unsigned | m_lastProgressLine |
unsigned | m_lineCount |
KIID | m_rootUuid |
SCH_SHEET * | m_rootSheet |
The rootsheet for full project loads or null for importing a schematic. | |
Object to parser s-expression symbol library and schematic file formats.
Definition at line 76 of file sch_io_kicad_sexpr_parser.h.
SCH_IO_KICAD_SEXPR_PARSER::SCH_IO_KICAD_SEXPR_PARSER | ( | LINE_READER * | aLineReader = nullptr , |
PROGRESS_REPORTER * | aProgressReporter = nullptr , |
||
unsigned | aLineCount = 0 , |
||
SCH_SHEET * | aRootSheet = nullptr , |
||
bool | aIsAppending = false |
||
) |
Definition at line 72 of file sch_io_kicad_sexpr_parser.cpp.
|
private |
Definition at line 90 of file sch_io_kicad_sexpr_parser.cpp.
References _, PROGRESS_REPORTER::KeepRefreshing(), LINE_READER::LineNumber(), m_lastProgressLine, m_lineCount, m_lineReader, m_progressReporter, PROGRESS_REPORTER::SetCurrentProgress(), and THROW_IO_ERROR.
Referenced by ParseSchematic().
|
inline |
Definition at line 113 of file sch_io_kicad_sexpr_parser.h.
References m_requiredVersion.
Referenced by SCH_IO_KICAD_SEXPR_LIB_CACHE::Load().
|
private |
Definition at line 125 of file sch_io_kicad_sexpr_parser.cpp.
Referenced by parseLibSymbol(), ParseSchematic(), parseSchematicSymbol(), parseSchTable(), parseSchText(), parseSchTextBoxContent(), and parseSheet().
|
private |
Definition at line 4600 of file sch_io_kicad_sexpr_parser.cpp.
References SCH_SCREEN::AddBusAlias(), ConvertToNewOverbarNotation(), and m_requiredVersion.
Referenced by ParseSchematic().
|
private |
Definition at line 3654 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, EDA_IU_SCALE::MilsToIU(), parseInternalUnits(), parseKIID(), parseStroke(), parseXY(), schIUScale, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseSchematic().
|
private |
Definition at line 692 of file sch_io_kicad_sexpr_parser.cpp.
References _, color, 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, m_fontTextMap, m_requiredVersion, parseDouble(), parseInt(), parseInternalUnits(), parseMaybeAbsentBool(), EDA_TEXT::SetBoldFlag(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetHyperlink(), EDA_TEXT::SetItalicFlag(), EDA_TEXT::SetLineSpacing(), EDA_TEXT::SetText(), EDA_TEXT::SetTextColor(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetTextThickness(), EDA_TEXT::SetVertJustify(), EDA_TEXT::SetVisible(), THROW_PARSE_ERROR, EDA_TEXT::ValidateHyperlink(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseProperty(), parseSchField(), parseSchSheetPin(), parseSchText(), parseSchTextBoxContent(), parseSymbolPin(), parseSymbolText(), and parseSymbolTextBox().
|
private |
Definition at line 637 of file sch_io_kicad_sexpr_parser.cpp.
References color, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, parseDouble(), and parseInt().
Referenced by parseSchArc(), parseSchBezier(), parseSchCircle(), parseSchPolyLine(), parseSchRectangle(), parseSchTextBoxContent(), parseSheet(), parseSymbolArc(), parseSymbolBezier(), parseSymbolCircle(), parseSymbolPolyLine(), parseSymbolRectangle(), and parseSymbolTextBox().
|
private |
Definition at line 834 of file sch_io_kicad_sexpr_parser.cpp.
References m_requiredVersion, and parseInt().
Referenced by ParseLib(), and ParseSchematic().
|
inlineprivate |
Definition at line 122 of file sch_io_kicad_sexpr_parser.h.
|
private |
Definition at line 3262 of file sch_io_kicad_sexpr_parser.cpp.
References _, image, m_requiredVersion, EDA_IU_SCALE::MilsToIU(), parseDouble(), parseKIID(), parseXY(), schIUScale, and THROW_IO_ERROR.
Referenced by ParseSchematic().
|
inlineprivate |
Definition at line 128 of file sch_io_kicad_sexpr_parser.h.
Referenced by parseEDA_TEXT(), parseFill(), parseHeader(), parseInt(), parseJunction(), parseProperty(), parseSchematicSymbol(), parseSchField(), parseSchSymbolInstances(), parseSchTable(), parseSchTextBoxContent(), parseSymbolPin(), and parseTITLE_BLOCK().
|
inlineprivate |
Definition at line 133 of file sch_io_kicad_sexpr_parser.h.
References parseInt().
|
private |
Definition at line 604 of file sch_io_kicad_sexpr_parser.cpp.
References EDA_IU_SCALE::IU_PER_MM, KiROUND(), parseDouble(), and schIUScale.
Referenced by parseBusEntry(), parseEDA_TEXT(), parseInternalUnits(), parseJunction(), parseMargins(), parsePinNames(), parseSchCircle(), parseSchTable(), parseSchText(), parseSheet(), parseSymbolArc(), parseSymbolCircle(), parseSymbolPin(), and parseXY().
|
private |
Definition at line 617 of file sch_io_kicad_sexpr_parser.cpp.
References EDA_IU_SCALE::IU_PER_MM, KiROUND(), parseDouble(), and schIUScale.
|
inlineprivate |
Definition at line 143 of file sch_io_kicad_sexpr_parser.h.
References parseInternalUnits().
|
private |
Definition at line 3561 of file sch_io_kicad_sexpr_parser.cpp.
References color, parseDouble(), parseInt(), parseInternalUnits(), parseKIID(), and parseXY().
Referenced by ParseSchematic().
|
private |
Definition at line 112 of file sch_io_kicad_sexpr_parser.cpp.
References m_uuids.
Referenced by parseBusEntry(), parseImage(), parseJunction(), parseLine(), parseNoConnect(), ParseSchematic(), parseSchematicSymbol(), parseSchPolyLine(), parseSchSheetPin(), parseSchText(), and parseSheet().
void SCH_IO_KICAD_SEXPR_PARSER::ParseLib | ( | LIB_SYMBOL_MAP & | aSymbolLibMap | ) |
Definition at line 174 of file sch_io_kicad_sexpr_parser.cpp.
References LIB_SYMBOL::GetName(), m_bodyStyle, m_generatorVersion, m_requiredVersion, m_unit, parseHeader(), parseLibSymbol(), and SEXPR_SYMBOL_LIB_FILE_VERSION.
Referenced by SCH_IO_KICAD_SEXPR_LIB_CACHE::Load().
|
private |
Definition at line 291 of file sch_io_kicad_sexpr_parser.cpp.
References _, m_bodyStyle, m_fieldIDsRead, m_symbolName, m_unit, MANDATORY_FIELDS, name, LIB_ID::Parse(), parseBool(), EMBEDDED_FILES_PARSER::ParseEmbedded(), parsePinNames(), parseProperty(), ParseSymbolDrawItem(), EDA_ITEM::SetParent(), THROW_PARSE_ERROR, and IO_ERROR::What().
Referenced by ParseLib(), ParseSchematic(), and ParseSymbol().
|
private |
Definition at line 3773 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, LAYER_BUS, LAYER_NOTES, LAYER_WIRE, EDA_IU_SCALE::MilsToIU(), parseKIID(), parseStroke(), parseXY(), and schIUScale.
Referenced by ParseSchematic().
|
inlineprivate |
Definition at line 184 of file sch_io_kicad_sexpr_parser.h.
References parseInternalUnits().
Referenced by parseSchTextBoxContent(), and parseSymbolTextBox().
|
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 143 of file sch_io_kicad_sexpr_parser.cpp.
References DSN_RIGHT.
Referenced by parseEDA_TEXT(), parseProperty(), parseSchematicSymbol(), parseSchField(), parseSchText(), and parseSheet().
|
private |
Definition at line 3617 of file sch_io_kicad_sexpr_parser.cpp.
References parseKIID(), and parseXY().
Referenced by ParseSchematic().
|
private |
Definition at line 1944 of file sch_io_kicad_sexpr_parser.cpp.
References _, PAGE_INFO::Custom, m_requiredVersion, MAX_PAGE_SIZE_EESCHEMA_MM, MIN_PAGE_SIZE_MM, parseDouble(), PAGE_INFO::SetHeightMM(), PAGE_INFO::SetPortrait(), PAGE_INFO::SetType(), PAGE_INFO::SetWidthMM(), and THROW_PARSE_ERROR.
Referenced by ParseSchematic().
|
private |
Definition at line 855 of file sch_io_kicad_sexpr_parser.cpp.
References _, parseInternalUnits(), and THROW_PARSE_ERROR.
Referenced by parseLibSymbol().
|
private |
Definition at line 887 of file sch_io_kicad_sexpr_parser.cpp.
References _, DEGREES_T, GetCanonicalFieldName(), SCH_FIELD::GetCanonicalName(), m_fieldIDsRead, MANDATORY_FIELDS, name, parseDouble(), parseEDA_TEXT(), parseInt(), parseMaybeAbsentBool(), parseXY(), THROW_PARSE_ERROR, UnescapeString(), and VALUE_FIELD.
Referenced by parseLibSymbol().
|
private |
Definition at line 3842 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, EDA_IU_SCALE::MilsToIU(), parseFill(), parseStroke(), parseXY(), and schIUScale.
Referenced by ParseSchematic().
|
private |
Definition at line 4065 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, EDA_IU_SCALE::MilsToIU(), parseFill(), parseStroke(), parseXY(), and schIUScale.
Referenced by ParseSchematic().
|
private |
Definition at line 3907 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, EDA_IU_SCALE::MilsToIU(), parseFill(), parseInternalUnits(), parseStroke(), parseXY(), schIUScale, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseSchematic().
void SCH_IO_KICAD_SEXPR_PARSER::ParseSchematic | ( | SCH_SHEET * | aSheet, |
bool | aIsCopyablyOnly = false , |
||
int | aFileVersion = SEXPR_SCHEMATIC_FILE_VERSION |
||
) |
Parse the internal LINE_READER object into aSheet.
When aIsCopyableOnly is true, only schematic objects that are viewable on the canvas for copy and paste purposes are parsed. Other schematic content such as bus definitions or instance data will throw an IO_ERROR exception.
When aIsCopyableOnly is false, full schematic file parsing is performed.
aSheet | The SCH_SHEET object to store the parsed schematic file. |
aIsCopyableOnly | Load only the schematic objects that can be copied into aSheet if true. Otherwise, load the full schematic file format. |
aFileVersion | The schematic file version to parser. Defaults to the schematic file being parsed when aIsCopyableOnly is false. |
Definition at line 2493 of file sch_io_kicad_sexpr_parser.cpp.
References _, SCH_SCREEN::AddLibSymbol(), SCH_SCREEN::Append(), checkpoint(), SHAPE_LINE_CHAIN::CPoint(), SCH_SCREEN::FixupEmbeddedData(), Fontconfig(), SCHEMATIC::GetEmbeddedFiles(), KIFONT::FONT::GetFont(), EMBEDDED_FILES::GetFontFiles(), EDA_SHAPE::GetPointCount(), EDA_SHAPE::GetPolyShape(), SCH_SHEET::GetScreen(), SCH_SHAPE::GetStroke(), SCH_SCREEN::GetUuid(), KI_FALLTHROUGH, LAYER_NOTES, m_fontTextMap, m_generatorVersion, m_requiredVersion, m_rootSheet, m_rootUuid, SCH_SCREEN::m_uuid, EDA_ITEM::m_Uuid, SHAPE_POLY_SET::Outline(), parseBool(), parseBusAlias(), parseBusEntry(), EMBEDDED_FILES_PARSER::ParseEmbedded(), parseHeader(), parseImage(), parseJunction(), parseKIID(), parseLibSymbol(), parseLine(), parseNoConnect(), parsePAGE_INFO(), parseSchArc(), parseSchBezier(), parseSchCircle(), parseSchematicSymbol(), parseSchPolyLine(), parseSchRectangle(), parseSchRuleArea(), parseSchSheetInstances(), parseSchSymbolInstances(), parseSchTable(), parseSchText(), parseSchTextBox(), parseSheet(), parseTITLE_BLOCK(), Pgm(), SCH_SCREEN::Schematic(), EMBEDDED_FILES::SetAreFontsEmbedded(), SCH_LINE::SetEndPoint(), SCH_SCREEN::SetFileFormatVersionAtLoad(), SCH_SCREEN::SetLegacySymbolInstanceData(), SCH_SCREEN::SetPageSettings(), EDA_ITEM::SetParent(), SCH_LINE::SetStartPoint(), SCH_LINE::SetStroke(), SCH_SCREEN::SetTitleBlock(), SEXPR_SCHEMATIC_FILE_VERSION, text, THROW_PARSE_ERROR, LIB_SYMBOL::UpdateFieldOrdinals(), EMBEDDED_FILES::UpdateFontFiles(), SCH_SCREEN::UpdateLocalLibSymbolLinks(), and IO_ERROR::What().
Referenced by SCH_IO_KICAD_SEXPR::LoadContent(), SCH_IO_KICAD_SEXPR::loadFile(), and KI_TEST::LoadSheetSchematicContents().
|
private |
Definition at line 2873 of file sch_io_kicad_sexpr_parser.cpp.
References _, SCH_FIELD::GetCanonicalName(), SCH_FIELD::GetId(), EDA_TEXT::GetText(), m_fieldIDsRead, SCH_SYMBOL_INSTANCE::m_Path, SCH_SYMBOL_INSTANCE::m_ProjectName, SCH_SYMBOL_INSTANCE::m_Reference, m_requiredVersion, SCH_SYMBOL_INSTANCE::m_Unit, MANDATORY_FIELDS, name, LIB_ID::Parse(), parseBool(), parseDouble(), parseInt(), parseKIID(), parseMaybeAbsentBool(), parseSchField(), parseXY(), REFERENCE_FIELD, SCH_FIELD::SetId(), SIM_LEGACY_ENABLE_FIELD, SIM_LEGACY_ENABLE_FIELD_V7, SYM_MIRROR_X, SYM_MIRROR_Y, and THROW_PARSE_ERROR.
Referenced by ParseSchematic().
Definition at line 2100 of file sch_io_kicad_sexpr_parser.cpp.
References _, DEGREES_T, GetCanonicalFieldName(), SCH_SHEET::GetDefaultFieldName(), MANDATORY_FIELDS, name, parseDouble(), parseEDA_TEXT(), parseInt(), parseMaybeAbsentBool(), parseXY(), SCH_SHEET_T, SCH_SYMBOL_T, SHEET_MANDATORY_FIELDS, SHEETFILENAME, SHEETNAME, THROW_PARSE_ERROR, EDA_ITEM::Type(), and VALUE_FIELD.
Referenced by parseSchematicSymbol(), parseSchText(), and parseSheet().
|
private |
Definition at line 3708 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, STROKE_PARAMS::GetLineStyle(), LAYER_NOTES, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, m_requiredVersion, EDA_IU_SCALE::MilsToIU(), parseFill(), parseKIID(), parseStroke(), parseXY(), schIUScale, and STROKE_PARAMS::SetLineStyle().
Referenced by ParseSchematic(), and parseSchRuleArea().
|
private |
Definition at line 3967 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, EDA_IU_SCALE::MilsToIU(), parseFill(), parseStroke(), parseXY(), and schIUScale.
Referenced by ParseSchematic().
|
private |
Definition at line 4022 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, EDA_IU_SCALE::MilsToIU(), SHAPE_POLY_SET::Outline(), parseSchPolyLine(), schIUScale, and SHAPE_LINE_CHAIN::SetClosed().
Referenced by ParseSchematic().
|
private |
Definition at line 2319 of file sch_io_kicad_sexpr_parser.cpp.
References SCH_SCREEN::GetFileFormatVersionAtLoad(), SCH_SHEET::GetScreen(), m_appending, SCH_SHEET_INSTANCE::m_PageNumber, SCH_SHEET_INSTANCE::m_Path, m_rootUuid, SCH_SCREEN::m_sheetInstances, SCH_SHEET_PATH::push_back(), BASE_SCREEN::SetContentModified(), and SCH_SHEET_PATH::SetPageNumber().
Referenced by ParseSchematic().
|
private |
Definition at line 2233 of file sch_io_kicad_sexpr_parser.cpp.
References _, name, parseDouble(), parseEDA_TEXT(), parseKIID(), parseXY(), and THROW_PARSE_ERROR.
Referenced by parseSheet().
|
private |
Definition at line 2416 of file sch_io_kicad_sexpr_parser.cpp.
References m_appending, SCH_SYMBOL_INSTANCE::m_Footprint, SCH_SYMBOL_INSTANCE::m_Path, SCH_SYMBOL_INSTANCE::m_Reference, m_rootUuid, SCH_SCREEN::m_symbolInstances, SCH_SYMBOL_INSTANCE::m_Unit, SCH_SYMBOL_INSTANCE::m_Value, NilUuid(), and parseInt().
Referenced by ParseSchematic().
|
private |
Definition at line 4464 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, EDA_IU_SCALE::MilsToIU(), parseBool(), parseInt(), parseInternalUnits(), parseSchTableCell(), parseStroke(), and schIUScale.
Referenced by ParseSchematic().
|
private |
Definition at line 4321 of file sch_io_kicad_sexpr_parser.cpp.
References parseSchTextBoxContent().
Referenced by parseSchTable().
|
private |
Definition at line 4138 of file sch_io_kicad_sexpr_parser.cpp.
References SPIN_STYLE::BOTTOM, DEGREES_T, SCH_LABEL_BASE::GetFields(), SCH_FIELD::GetInternalName(), SPIN_STYLE::LEFT, parseBool(), parseDouble(), parseEDA_TEXT(), parseInternalUnits(), parseKIID(), parseMaybeAbsentBool(), parseSchField(), parseXY(), SPIN_STYLE::RIGHT, SCH_DIRECTIVE_LABEL_T, SCH_GLOBAL_LABEL_T, SCH_LABEL_T, SCH_TEXT_T, SCH_ITEM::SetFieldsAutoplaced(), SCH_FIELD::SetId(), SCH_DIRECTIVE_LABEL::SetPinLength(), SCH_LABEL_BASE::SetShape(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetVisible(), text, and SPIN_STYLE::UP.
Referenced by ParseSchematic().
|
private |
Definition at line 4308 of file sch_io_kicad_sexpr_parser.cpp.
References parseSchTextBoxContent().
Referenced by ParseSchematic().
|
private |
Definition at line 4334 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, DEGREES_T, SCH_TEXTBOX::GetLegacyTextMargin(), left, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, EDA_ITEM::m_Uuid, EDA_IU_SCALE::MilsToIU(), parseBool(), parseDouble(), parseEDA_TEXT(), parseFill(), parseInt(), parseMargins(), parseStroke(), parseXY(), right, schIUScale, EDA_SHAPE::SetEnd(), SCH_TEXTBOX::SetExcludedFromSim(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFillMode(), SCH_TEXTBOX::SetMarginBottom(), SCH_TEXTBOX::SetMarginLeft(), SCH_TEXTBOX::SetMarginRight(), SCH_TEXTBOX::SetMarginTop(), SCH_SHAPE::SetPosition(), SCH_SHAPE::SetStroke(), EDA_TEXT::SetText(), and EDA_TEXT::SetTextAngle().
Referenced by parseSchTableCell(), and parseSchTextBox().
|
private |
Definition at line 3346 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, STROKE_PARAMS::GetColor(), SCH_FIELD::GetId(), STROKE_PARAMS::GetWidth(), FILL_PARAMS::m_Color, SCH_SHEET_INSTANCE::m_PageNumber, SCH_SHEET_INSTANCE::m_Path, SCH_SHEET_INSTANCE::m_ProjectName, m_requiredVersion, EDA_IU_SCALE::MilsToIU(), parseBool(), parseFill(), parseInternalUnits(), parseKIID(), parseMaybeAbsentBool(), parseSchField(), parseSchSheetPin(), parseStroke(), parseXY(), schIUScale, SCH_FIELD::SetId(), SHEET_MANDATORY_FIELDS, SHEETFILENAME, SHEETNAME, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseSchematic().
|
private |
Parse stroke definition aStroke.
aStrokeDef | A reference to the STROKE_PARAMS structure to write to. |
Definition at line 627 of file sch_io_kicad_sexpr_parser.cpp.
References EDA_IU_SCALE::IU_PER_MM, STROKE_PARAMS_PARSER::ParseStroke(), and schIUScale.
Referenced by parseBusEntry(), parseLine(), parseSchArc(), parseSchBezier(), parseSchCircle(), parseSchPolyLine(), parseSchRectangle(), parseSchTable(), parseSchTextBoxContent(), parseSheet(), parseSymbolArc(), parseSymbolBezier(), parseSymbolCircle(), parseSymbolPolyLine(), parseSymbolRectangle(), and parseSymbolTextBox().
LIB_SYMBOL * SCH_IO_KICAD_SEXPR_PARSER::ParseSymbol | ( | LIB_SYMBOL_MAP & | aSymbolLibMap, |
int | aFileVersion = SEXPR_SYMBOL_LIB_FILE_VERSION |
||
) |
Parse internal LINE_READER object into symbols and return all found.
Definition at line 255 of file sch_io_kicad_sexpr_parser.cpp.
References _, LIB_SYMBOL::GetEmbeddedFiles(), KIFONT::FONT::GetFont(), m_fontTextMap, m_requiredVersion, parseLibSymbol(), text, THROW_PARSE_ERROR, and EMBEDDED_FILES::UpdateFontFiles().
Referenced by SCH_IO_KICAD_SEXPR::ParseLibSymbols().
|
private |
Definition at line 1091 of file sch_io_kicad_sexpr_parser.cpp.
References ANGLE_0, ANGLE_180, ANGLE_360, ANGLE_90, CalcArcCenter(), DEFAULT_LINE_WIDTH_MILS, DEGREES_T, LAYER_DEVICE, m_bodyStyle, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, m_requiredVersion, m_unit, EDA_IU_SCALE::MilsToIU(), EDA_ANGLE::Normalize(), parseDouble(), parseFill(), parseInternalUnits(), parseStroke(), parseXY(), and schIUScale.
Referenced by ParseSymbolDrawItem().
|
private |
Definition at line 1278 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, LAYER_DEVICE, m_bodyStyle, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, m_unit, EDA_IU_SCALE::MilsToIU(), parseFill(), parseStroke(), parseXY(), and schIUScale.
Referenced by ParseSymbolDrawItem().
|
private |
Definition at line 1359 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, LAYER_DEVICE, m_bodyStyle, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, m_unit, EDA_IU_SCALE::MilsToIU(), parseFill(), parseInternalUnits(), parseStroke(), parseXY(), schIUScale, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseSymbolDrawItem().
SCH_ITEM * SCH_IO_KICAD_SEXPR_PARSER::ParseSymbolDrawItem | ( | ) |
Definition at line 585 of file sch_io_kicad_sexpr_parser.cpp.
References parseSymbolArc(), parseSymbolBezier(), parseSymbolCircle(), parseSymbolPin(), parseSymbolPolyLine(), parseSymbolRectangle(), parseSymbolText(), and parseSymbolTextBox().
Referenced by parseLibSymbol().
|
private |
Definition at line 1425 of file sch_io_kicad_sexpr_parser.cpp.
References _, ConvertToNewOverbarNotation(), m_bodyStyle, SCH_PIN::ALT::m_Name, m_requiredVersion, SCH_PIN::ALT::m_Shape, SCH_PIN::ALT::m_Type, m_unit, parseEDA_TEXT(), parseInt(), parseInternalUnits(), parseXY(), pin, schIUScale, text, and THROW_PARSE_ERROR.
Referenced by ParseSymbolDrawItem().
|
private |
Definition at line 1637 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, LAYER_DEVICE, m_bodyStyle, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, m_unit, EDA_IU_SCALE::MilsToIU(), parseFill(), parseStroke(), parseXY(), and schIUScale.
Referenced by ParseSymbolDrawItem().
|
private |
Definition at line 1705 of file sch_io_kicad_sexpr_parser.cpp.
References DEFAULT_LINE_WIDTH_MILS, LAYER_DEVICE, m_bodyStyle, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, m_unit, EDA_IU_SCALE::MilsToIU(), parseFill(), parseStroke(), parseXY(), and schIUScale.
Referenced by ParseSymbolDrawItem().
|
private |
Definition at line 1765 of file sch_io_kicad_sexpr_parser.cpp.
References _, LAYER_DEVICE, m_bodyStyle, m_unit, parseDouble(), parseEDA_TEXT(), parseXY(), TENTHS_OF_A_DEGREE_T, text, and THROW_PARSE_ERROR.
Referenced by ParseSymbolDrawItem().
|
private |
Definition at line 1821 of file sch_io_kicad_sexpr_parser.cpp.
References _, DEFAULT_LINE_WIDTH_MILS, DEGREES_T, LAYER_DEVICE, left, m_bodyStyle, FILL_PARAMS::m_Color, FILL_PARAMS::m_FillType, m_unit, EDA_IU_SCALE::MilsToIU(), parseDouble(), parseEDA_TEXT(), parseFill(), parseMargins(), parseStroke(), parseXY(), right, schIUScale, and THROW_PARSE_ERROR.
Referenced by ParseSymbolDrawItem().
|
private |
Definition at line 1996 of file sch_io_kicad_sexpr_parser.cpp.
References _, parseInt(), TITLE_BLOCK::SetComment(), TITLE_BLOCK::SetCompany(), TITLE_BLOCK::SetDate(), TITLE_BLOCK::SetRevision(), TITLE_BLOCK::SetTitle(), and THROW_PARSE_ERROR.
Referenced by ParseSchematic().
|
inlineprivate |
Definition at line 148 of file sch_io_kicad_sexpr_parser.h.
References parseInternalUnits(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by parseBusEntry(), parseImage(), parseJunction(), parseLine(), parseNoConnect(), parseProperty(), parseSchArc(), parseSchBezier(), parseSchCircle(), parseSchematicSymbol(), parseSchField(), parseSchPolyLine(), parseSchRectangle(), parseSchSheetPin(), parseSchText(), parseSchTextBoxContent(), parseSheet(), parseSymbolArc(), parseSymbolBezier(), parseSymbolCircle(), parseSymbolPin(), parseSymbolPolyLine(), parseSymbolRectangle(), parseSymbolText(), and parseSymbolTextBox().
|
private |
Appending load status.
Definition at line 240 of file sch_io_kicad_sexpr_parser.h.
Referenced by parseSchSheetInstances(), and parseSchSymbolInstances().
|
private |
The current body style being parsed.
Definition at line 238 of file sch_io_kicad_sexpr_parser.h.
Referenced by ParseLib(), parseLibSymbol(), parseSymbolArc(), parseSymbolBezier(), parseSymbolCircle(), parseSymbolPin(), parseSymbolPolyLine(), parseSymbolRectangle(), parseSymbolText(), and parseSymbolTextBox().
|
private |
Field IDs that have been read so far for the current symbol.
Definition at line 243 of file sch_io_kicad_sexpr_parser.h.
Referenced by parseLibSymbol(), parseProperty(), and parseSchematicSymbol().
|
private |
Definition at line 247 of file sch_io_kicad_sexpr_parser.h.
Referenced by parseEDA_TEXT(), ParseSchematic(), and ParseSymbol().
|
private |
Definition at line 236 of file sch_io_kicad_sexpr_parser.h.
Referenced by ParseLib(), and ParseSchematic().
|
private |
Definition at line 251 of file sch_io_kicad_sexpr_parser.h.
Referenced by checkpoint().
|
private |
Definition at line 252 of file sch_io_kicad_sexpr_parser.h.
Referenced by checkpoint().
|
private |
Definition at line 250 of file sch_io_kicad_sexpr_parser.h.
Referenced by checkpoint().
|
private |
Definition at line 249 of file sch_io_kicad_sexpr_parser.h.
Referenced by checkpoint().
|
private |
Set to the symbol library file version required.
Definition at line 235 of file sch_io_kicad_sexpr_parser.h.
Referenced by GetParsedRequiredVersion(), parseBusAlias(), parseEDA_TEXT(), parseHeader(), parseImage(), ParseLib(), parsePAGE_INFO(), ParseSchematic(), parseSchematicSymbol(), parseSchPolyLine(), parseSheet(), ParseSymbol(), parseSymbolArc(), and parseSymbolPin().
|
private |
The rootsheet for full project loads or null for importing a schematic.
Definition at line 257 of file sch_io_kicad_sexpr_parser.h.
Referenced by ParseSchematic().
|
private |
Definition at line 254 of file sch_io_kicad_sexpr_parser.h.
Referenced by ParseSchematic(), parseSchSheetInstances(), and parseSchSymbolInstances().
|
private |
The current symbol name.
Definition at line 239 of file sch_io_kicad_sexpr_parser.h.
Referenced by parseLibSymbol().
|
private |
The current unit being parsed.
Definition at line 237 of file sch_io_kicad_sexpr_parser.h.
Referenced by ParseLib(), parseLibSymbol(), parseSymbolArc(), parseSymbolBezier(), parseSymbolCircle(), parseSymbolPin(), parseSymbolPolyLine(), parseSymbolRectangle(), parseSymbolText(), and parseSymbolTextBox().
|
private |
Definition at line 245 of file sch_io_kicad_sexpr_parser.h.
Referenced by parseKIID().