22#ifndef LTSPICE_SCHEMATIC_LOADER_H
23#define LTSPICE_SCHEMATIC_LOADER_H
30#include <wx/filename.h>
307 std::map<wxString, wxString>& aMapOfAscFiles,
308 std::map<wxString, wxString>& aMapOfAsyFiles,
309 const wxString& aBase = wxEmptyString );
335 std::map<wxString, wxString>
ReadAsyFiles(
const std::vector<LTSPICE_FILE>& aSourceFiles,
336 const std::map<wxString, wxString>& aAsyFileMap );
339 const std::map<wxString, wxString>& aAsyFileMap );
372 static int integerCheck(
const wxString& aToken,
int aLineNumber,
const wxString& aFileName );
374 static VECTOR2I pointCheck(
const wxString& aTokenX,
const wxString& aTokenY,
int aLineNumber,
375 const wxString& aFileName );
387 int aLineNumber,
const wxString& aFileName );
static VECTOR2I pointCheck(const wxString &aTokenX, const wxString &aTokenY, int aLineNumber, const wxString &aFileName)
static SYMBOLTYPE getSymbolType(const wxString &aValue)
std::vector< LT_ASC > StructureBuilder()
Build Intermediate data structure.
std::vector< LTSPICE_FILE > GetSchematicElements(const wxString &aAscFile)
Used to get symbols list present in asc file.
LT_SYMBOL SymbolBuilder(const wxString &aAscFileName, LT_ASC &aAscFile)
POLARITY
Polarity enum represents polarity of pin.
const wxFileName & GetLTspiceDataDir()
JUSTIFICATION
Defines in what ways the PIN or TEXT can be justified.
void GetAscAndAsyFilePaths(const wxDir &aDir, bool aRecursive, std::map< wxString, wxString > &aMapOfAscFiles, std::map< wxString, wxString > &aMapOfAsyFiles, const wxString &aBase=wxEmptyString)
Used to get file path for Asc and Asy files.
static ORIENTATION getSymbolRotationOrMirror(const wxString &aValue)
bool IsAsySubsheet(const wxString &aAsyFile)
Check if the asy file content indicates that we need to load subsheet.
static POLARITY getPolarity(const wxString &aValue)
static void tokensSizeRangeCheck(size_t aActualSize, int aExpectedMin, int aExpectedMax, int aLineNumber, const wxString &aFileName)
Used to check size of the token generated from split function.
static LINEWIDTH getLineWidth(const wxString &aValue)
ORIENTATION
Defines different types or rotation and mirror operation can be applied to a LT_SYMBOL.
static void aggregateAttributeValue(wxArrayString &aTokens, int aIndex)
Join value present across multiple tokens into one.
PROGRESS_REPORTER * m_progressReporter
void Load(SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet, const wxFileName &aLibraryFileName, REPORTER *aReporter)
The main function responsible for loading the .asc and .asy files.
static int integerCheck(const wxString &aToken, int aLineNumber, const wxString &aFileName)
Used to check if the given token in integer or not.
wxFileName m_ltspiceDataDir
std::map< wxString, std::map< wxString, wxString > > m_fileCache
LTSPICE_SCHEMATIC(const wxString &aFilename, const wxFileName &aLTspiceDataDir, REPORTER *aReporter, PROGRESS_REPORTER *aProgressReporter)
static JUSTIFICATION getTextJustification(const wxString &aValue)
static JUSTIFICATION getPinJustification(const wxString &aValue)
std::map< wxString, wxString > ReadAsyFile(const LTSPICE_FILE &aSourceFile, const std::map< wxString, wxString > &aAsyFileMap)
SYMBOLTYPE
Type of Symbol loaded from asc and asy file.
std::map< wxString, wxString > ReadAsyFiles(const std::vector< LTSPICE_FILE > &aSourceFiles, const std::map< wxString, wxString > &aAsyFileMap)
The function returns a map.
static void removeCarriageReturn(wxString &elementFromLine)
static LINESTYLE getLineStyle(int aValue)
A progress reporter interface for use in multi-threaded environments.
A pure virtual class used to derive REPORTER objects from.
Holds all the data relating to one schematic.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
LTSPICE_FILE(const wxString &aElementName, const VECTOR2I &aOffset)
bool operator<(const LTSPICE_FILE &t) const
The ARC is represented inside a rectangle whose opposite site are given.
The CIRCLE is represented in Ltpsice inside a rectangle whose two opposite points and line style are ...
IOPIN is special contact on symbol used for IO operations.
A struct to hold .asc file definition.
std::vector< CIRCLE > Circles
std::vector< IOPIN > Iopins
std::vector< BUSTAP > Bustap
std::vector< LT_SYMBOL > Symbols
std::vector< TEXT > Texts
std::vector< DATAFLAG > DataFlags
std::vector< LINE > Lines
std::vector< LT_WINDOW > Windows
std::vector< WIRE > Wires
std::vector< RECTANGLE > Rectangles
std::vector< FLAG > Flags
JUSTIFICATION PinJustification
std::map< wxString, wxString > PinAttribute
A struct to hold SYMBOL definition.
std::map< wxString, wxString > SymAttributes
std::vector< RECTANGLE > Rectangles
std::vector< LT_WINDOW > Windows
std::vector< LT_PIN > Pins
std::vector< WIRE > Wires
ORIENTATION SymbolOrientation
std::vector< CIRCLE > Circles
std::vector< LINE > Lines
JUSTIFICATION Justification
A 4-sided polygon with opposite equal sides, used in representing shapes.
JUSTIFICATION Justification
A metallic connection, used for transfer, between two points or pin.