25#ifndef SCH_EASYEDAPRO_PARSER_H_
26#define SCH_EASYEDAPRO_PARSER_H_
33#include <wx/filename.h>
58 std::vector<PIN_INFO>
pins;
76 static double Convert( wxString aValue );
107 const nlohmann::json& aProject,
108 std::map<wxString, EASYEDAPRO::SYM_INFO>& aSymbolMap,
109 const std::map<wxString, EASYEDAPRO::BLOB>& aBlobMap,
110 const std::vector<nlohmann::json>& aLines,
const wxString& aLibName );
115 template <
typename T>
117 const wxString& styleStr );
119 template <
typename T>
120 void ApplyLineStyle(
const std::map<wxString, nlohmann::json>& lineStyles, T& shape,
121 const wxString& styleStr );
123 template <
typename T>
constexpr EDA_IU_SCALE schIUScale
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Field object used in symbol libraries.
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)
EASYEDAPRO::SYM_INFO ParseSymbol(const std::vector< nlohmann::json > &aLines)
static VECTOR2< T > ScalePosSym(VECTOR2< T > aValue)
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)
void ApplyAttrToField(const std::map< wxString, nlohmann::json > &fontStyles, T *text, const EASYEDAPRO::SCH_ATTR &aAttr, bool aIsSym, bool aToSym, SCH_SYMBOL *aParent=nullptr)
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
constexpr int MilsToIU(int mils) const
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".