31 #ifndef __SCH_SEXPR_PARSER_H__ 32 #define __SCH_SEXPR_PARSER_H__ 38 #include <schematic_lexer.h> 87 void parseHeader( TSCHEMATIC_T::T aHeaderType,
int aFileVersion );
92 return strtol( CurText(),
NULL, 16 );
97 return (
int)strtol( CurText(),
NULL, 10 );
102 NeedNUMBER( aExpected );
117 NeedNUMBER( aExpected );
133 double int_limit = std::numeric_limits<int>::max() * 0.7071;
135 return KiROUND( Clamp<double>( -int_limit, retval, int_limit ) );
142 double int_limit = std::numeric_limits<int>::max() * 0.7071;
144 return KiROUND( Clamp<double>( -int_limit, retval, int_limit ) );
239 #endif // __SCH_SEXPR_PARSER_H__
int m_fieldId
The current field ID.
void ParseLib(LIB_PART_MAP &aSymbolLibMap)
LIB_PART * ParseSymbol(LIB_PART_MAP &aSymbolLibMap, int aFileVersion=SEXPR_SYMBOL_LIB_FILE_VERSION)
SCH_FIELD instances are attached to a component and provide a place for the component's value,...
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
SCH_SEXPR_PARSER(LINE_READER *aLineReader=nullptr)
void parseProperty(std::unique_ptr< LIB_PART > &aSymbol)
void parseEDA_TEXT(EDA_TEXT *aText)
FILL_TYPE
The set of fill types used in plotting or drawing enclosed areas.
Define a symbol library graphical text item.
SCH_SHEET_PIN * parseSchSheetPin(SCH_SHEET *aSheet)
static constexpr double IU_PER_MM
Mock up a conversion function.
void parseBusAlias(SCH_SCREEN *aScreen)
LIB_POLYLINE * parsePolyLine()
std::map< wxString, LIB_PART *, LibPartMapSort > LIB_PART_MAP
Part map used by part library object.
int m_unit
The current unit being parsed.
void parseTITLE_BLOCK(TITLE_BLOCK &aTitleBlock)
#define SEXPR_SYMBOL_LIB_FILE_VERSION
This file contains the file format version information for the s-expression schematic and symbol libr...
Hold the information shown in the lower right corner of a plot, printout, or editing view.
void parseSchSheetInstances(SCH_SHEET *aRootSheet, SCH_SCREEN *aScreen)
void parseSchSymbolInstances(SCH_SCREEN *aScreen)
SCH_BUS_WIRE_ENTRY * parseBusEntry()
LIB_RECTANGLE * parseRectangle()
The base class for drawable items used by schematic library components.
int parseInternalUnits(const char *aExpected)
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Simple container to manage fill parameters.
void parseHeader(TSCHEMATIC_T::T aHeaderType, int aFileVersion)
wxString m_symbolName
The current symbol name.
SCH_JUNCTION * parseJunction()
int m_convert
The current body style being parsed.
Describe the page size and margins of a paper page on which to eventually print or plot.
SCH_NO_CONNECT * parseNoConnect()
LIB_BEZIER * parseBezier()
Define a library symbol object.
int parseInternalUnits(TSCHEMATIC_T::T aToken)
double parseDouble(const char *aExpected)
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Object to parser s-expression symbol library and schematic file formats.
bool IsTooRecent() const
Return whether a version number, if any was parsed, was too recent.
Object to handle a bitmap image that can be inserted in a schematic.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
LIB_ITEM * ParseDrawItem()
void parsePAGE_INFO(PAGE_INFO &aPageInfo)
int m_requiredVersion
Set to the symbol library file version required.
Segment description base class to describe items which have 2 end points (track, wire,...
SCH_BITMAP * parseImage()
Simple container to manage line stroke parameters.
double parseDouble(TSCHEMATIC_T::T aToken)
SCH_FIELD * parseSchField(SCH_ITEM *aParent)
LIB_CIRCLE * parseCircle()
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
void parseFill(FILL_PARAMS &aFill)
const char * GetTokenText(T aTok)
Function GetTokenText is in the DSN namespace and returns the C string representing a SPECCTRA_DB::ke...
void ParseSchematic(SCH_SHEET *aSheet, bool aIsCopyablyOnly=false, int aFileVersion=SEXPR_SCHEMATIC_FILE_VERSION)
Parse the internal LINE_READER object into aSheet.
Class for a wire to bus entry.
SCH_TEXT * parseSchText()
double parseDouble()
Parse the current token as an ASCII numeric string with possible leading whitespace into a double pre...
int parseInt(const char *aExpected)
void parsePinNames(std::unique_ptr< LIB_PART > &aSymbol)
Definition for part library class.
#define SEXPR_SCHEMATIC_FILE_VERSION
Symbol library file version.
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCH_COMPONENT * parseSchematicSymbol()
void parseStroke(STROKE_PARAMS &aStroke)
Parse stroke definition aStroke.
Define a bezier curve graphic body item.