21#ifndef SCH_EASYEDAPRO_PARSER_H_
22#define SCH_EASYEDAPRO_PARSER_H_
47 std::vector<PIN_INFO>
pins;
65 static double Convert( wxString aValue );
94 const std::map<wxString, wxString>& aDeviceAttributes );
97 const nlohmann::json& aProject,
98 std::map<wxString, EASYEDAPRO::SYM_INFO>& aSymbolMap,
99 const std::map<wxString, EASYEDAPRO::BLOB>& aBlobMap,
100 const std::vector<nlohmann::json>& aLines,
const wxString& aLibName );
106 const std::map<wxString, wxString>& aDeviceAttributes );
108 template <
typename T>
110 const wxString& styleStr );
112 template <
typename T>
113 void ApplyLineStyle(
const std::map<wxString, nlohmann::json>& lineStyles,
T& shape,
114 const wxString& styleStr );
116 template <
typename T>
119 const std::map<wxString, wxString>& aDeviceAttributes = {},
constexpr EDA_IU_SCALE schIUScale
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
A progress reporter interface for use in multi-threaded environments.
Holds all the data relating to one schematic.
static double Convert(wxString aValue)
static VECTOR2< T > ScalePos(VECTOR2< T > aValue)
double SizeToKi(wxString units)
static T ScaleSize(T aValue)
void ApplyFontStyle(const std::map< wxString, nlohmann::json > &fontStyles, T &text, const wxString &styleStr)
static VECTOR2< T > ScalePosSym(VECTOR2< T > aValue)
SCH_EASYEDAPRO_PARSER(SCHEMATIC *aSchematic, PROGRESS_REPORTER *aProgressReporter)
EASYEDAPRO::SYM_INFO ParseSymbol(const std::vector< nlohmann::json > &aLines, const std::map< wxString, wxString > &aDeviceAttributes)
void ApplyAttrToField(const std::map< wxString, nlohmann::json > &fontStyles, T *text, const EASYEDAPRO::SCH_ATTR &aAttr, bool aIsSym, bool aToSym, const std::map< wxString, wxString > &aDeviceAttributes={}, SCH_SYMBOL *aParent=nullptr)
void ParseSchematic(SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet, const nlohmann::json &aProject, std::map< wxString, EASYEDAPRO::SYM_INFO > &aSymbolMap, const std::map< wxString, EASYEDAPRO::BLOB > &aBlobMap, const std::vector< nlohmann::json > &aLines, const wxString &aLibName)
wxString ResolveFieldVariables(const wxString aInput, const std::map< wxString, wxString > &aDeviceAttributes)
void ApplyLineStyle(const std::map< wxString, nlohmann::json > &lineStyles, T &shape, const wxString &styleStr)
static VECTOR2< T > ScaleSize(VECTOR2< T > aValue)
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Define a general 2D-vector/point.
std::unique_ptr< LIB_SYMBOL > libSymbol
std::vector< PIN_INFO > pins
std::optional< EASYEDAPRO::SCH_ATTR > symbolAttr
std::map< wxString, int > partUnits
EASYEDAPRO::SYM_HEAD head