40 const wxFileName& aLibraryFileName,
REPORTER* aReporter )
42 std::map<wxString, wxString> mapOfAscFiles;
43 std::map<wxString, wxString> mapOfAsyFiles;
59 std::queue<wxString> ascFileQueue;
60 ascFileQueue.push( aLibraryFileName.GetName().Lower() );
62 LTSPICE_FILE rootAscFile( ascFileQueue.front(), { 0, 0 } );
64 rootAscFile.
Sheet = aRootSheet;
67 int parentSheetIndex = 0;
70 std::vector<LTSPICE_FILE> ascFiles;
72 ascFiles.push_back( rootAscFile );
74 while( !ascFileQueue.empty() )
79 wxString ascFilePath = mapOfAscFiles[ ascFileQueue.front() ];
90 for(
LTSPICE_FILE& newSubSchematicElement : newSubSchematicElements )
92 wxString asyName = newSubSchematicElement.ElementName;
93 auto it = mapOfAsyFiles.find( asyName );
95 if( it == mapOfAsyFiles.end() )
105 newSubSchematicElement.ParentIndex = parentSheetIndex;
106 newSubSchematicElement.Screen = screen;
107 newSubSchematicElement.Sheet =
new SCH_SHEET();
109 ascFileQueue.push( newSubSchematicElement.ElementName );
110 ascFiles.push_back( newSubSchematicElement );
119 for(
unsigned int i = 0; i < ascFiles.size(); i++ )
122 wxString buffer =
SafeReadFile( mapOfAscFiles[ascFiles[i].ElementName], wxS(
"r" ) );
129 m_fileCache[ wxS(
"ascFiles" ) ][ wxS(
"parentFile" ) ] = buffer;
132 wxASSERT( file.Sheet ==
nullptr && file.Screen ==
nullptr );
141 std::map tempAsyMap =
ReadAsyFile( ascFiles[i], mapOfAsyFiles );
142 wxString ascFileName = ascFiles[i].ElementName;
145 LIB_SYMBOL tempLibSymbol( ascFiles[i].ElementName );
153 curSheet->
SetParent( ascFiles[ascFiles[i].ParentIndex].Sheet );
157 wxString sheetName = wxString::Format( wxS(
"%s-subsheet-%d" ),
158 ascFiles[i].ElementName,
161 sheetNameField.
SetText( sheetName );
162 fileNameSheet.
SetText( sheetName +
".kicad_sch" );
164 curSheet->
SetScreen( ascFiles[i].Screen );
166 curSheetPath = ascFiles[ascFiles[i].ParentIndex].SheetPath;
169 ascFiles[i].SheetPath = curSheetPath;
171 ascFiles[ascFiles[i].ParentIndex].Sheet->GetScreen()->Append( curSheet );
180 ascFiles[i].SheetPath.push_back( curSheet );
181 curSheetPath = ascFiles[i].SheetPath;
184 std::vector<wxString> subSchematicAsyFiles;
187 subSchematicAsyFiles.
push_back( ascFile.ElementName );
192 parser.
Parse( &curSheetPath, lt_ascs, subSchematicAsyFiles );
203 std::map<wxString, wxString>& aMapOfAscFiles,
204 std::map<wxString, wxString>& aMapOfAsyFiles,
205 const wxString& aBase )
210 bool cont = aDir.GetFirst( &filename, wxEmptyString, wxDIR_FILES | wxDIR_HIDDEN );
214 wxFileName
path( aDir.GetName(), filename );
216 auto logToMap = [&]( std::map<wxString, wxString>& aMapToLogTo,
const wxString& aKey )
218 if( aMapToLogTo.count( aKey ) )
223 _(
"File at '%s' was ignored. Using previously found "
224 "file at '%s' instead." ),
225 path.GetFullPath(), aMapToLogTo.at( aKey ) ) );
230 aMapToLogTo.emplace( aKey,
path.GetFullPath() );
234 wxString elementName1 = ( aBase +
path.GetName() ).Lower();
235 wxString elementName2 =
path.GetName().Lower();
236 wxString extension =
path.GetExt().Lower();
238 if( extension == wxS(
"asc" ) )
240 logToMap( aMapOfAscFiles, elementName1 );
242 if( !aBase.IsEmpty() )
243 logToMap( aMapOfAscFiles, elementName2 );
245 else if( extension == wxS(
"asy" ) )
247 logToMap( aMapOfAsyFiles, elementName1 );
249 if( !aBase.IsEmpty() )
250 logToMap( aMapOfAsyFiles, elementName2 );
253 cont = aDir.GetNext( &filename );
259 bool cont = aDir.GetFirst( &filename, wxEmptyString, wxDIR_DIRS | wxDIR_HIDDEN );
263 wxFileName
path( aDir.GetName(), filename );
264 wxDir subDir(
path.GetFullPath() );
267 filename + wxS(
"/" ) );
269 cont = aDir.GetNext( &filename );
275std::map<wxString, wxString>
277 const std::map<wxString, wxString>& aAsyFileMap )
279 std::map<wxString, wxString> resultantMap;
283 if( aAsyFileMap.count( fileName ) )
284 resultantMap[fileName] =
SafeReadFile( aAsyFileMap.at( fileName ), wxS(
"r" ) );
290std::map<wxString, wxString>
292 const std::map<wxString, wxString>& aAsyFileMap )
294 std::map<wxString, wxString> resultantMap;
298 wxString fileName = source.ElementName;
300 if( aAsyFileMap.count( fileName ) )
301 resultantMap[fileName] =
SafeReadFile( aAsyFileMap.at( fileName ), wxS(
"r" ) );
310 std::vector<LTSPICE_FILE> resultantArray;
311 wxArrayString lines = wxSplit( aAscFile,
'\n' );
313 for(
const wxString& line : lines )
315 wxArrayString tokens = wxSplit( line,
' ' );
317 if( !tokens.IsEmpty() && tokens[0].Upper() == wxS(
"SYMBOL" ) )
319 wxString elementName( tokens[1] );
322 tokens[2].ToLong( &posX );
323 tokens[3].ToLong( &posY );
325 elementName.Replace(
'\\',
'/' );
329 resultantArray.push_back( asyFile );
333 return resultantArray;
339 wxStringTokenizer lines( aAsyFile,
"\n" );
341 while( lines.HasMoreTokens() )
343 wxStringTokenizer parts( lines.GetNextToken(),
" " );
345 if( parts.GetNextToken().IsSameAs( wxS(
"SYMATTR" ),
false )
346 && parts.GetNextToken().IsSameAs( wxS(
"Prefix" ),
false ) )
357 const wxString& aFileName )
361 if( !aToken.ToLong( &result ) )
363 THROW_IO_ERROR( wxString::Format(
_(
"Expecting integer at line %d in file %s" ),
373 int aLineNumber,
const wxString& aFileName )
381 int aExpectedMax,
int aLineNumber,
382 const wxString& aFileName )
384 if( (
int) aActualSize < aExpectedMin )
386 THROW_IO_ERROR( wxString::Format(
_(
"Expected data missing on line %d in file %s" ),
390 else if( (
int) aActualSize > aExpectedMax )
392 THROW_IO_ERROR( wxString::Format(
_(
"Extra data found on line %d in file %s" ),
402 for(
int i = aIndex + 1; i < (int) aTokens.GetCount(); i++ )
403 aTokens[ aIndex ] +=
" " + aTokens[i];
409 std::map<int, LINESTYLE> lineStyleMap;
417 if( lineStyleMap.find( aValue ) == lineStyleMap.end() )
420 return lineStyleMap[ aValue ];
426 std::map<wxString, LINEWIDTH> lineWidthMap;
431 if( lineWidthMap.find( aValue.Upper() ) == lineWidthMap.end() )
434 return lineWidthMap[ aValue.Upper() ];
440 std::map<wxString, POLARITY> polarityMap;
449 if( polarityMap.find( aValue.Upper() ) == polarityMap.end() )
452 return polarityMap[ aValue.Upper() ];
458 std::map<wxString, ORIENTATION> rotationMirrorMap;
470 if( rotationMirrorMap.find( aValue.Upper() ) == rotationMirrorMap.end() )
471 THROW_IO_ERROR(
_(
"Expecting R0, R90, R18, R270, M0, M90, M180 or M270" ) );
473 return rotationMirrorMap[ aValue.Upper() ];
479 std::map<wxString, JUSTIFICATION> justificationMap;
492 if( justificationMap.find( aValue.Upper() ) == justificationMap.end() )
493 THROW_IO_ERROR(
_(
"Expecting LEFT, CENTER, RIGHT, TOP, BOTTOM, VLEFT, VRIGHT, VCENTER, VTOP or VBOTTOM" ) );
495 return justificationMap[ aValue.Upper() ];
501 std::map<wxString, JUSTIFICATION> pinJustificationMap;
514 if( pinJustificationMap.find( aValue.Upper() ) == pinJustificationMap.end() )
515 THROW_IO_ERROR(
_(
"Expecting NONE, BOTTOM, TOP, LEFT, RIGHT, VBOTTOM, VTOP, VCENTER, VLEFT or VRIGHT" ) );
517 return pinJustificationMap[ aValue.Upper() ];
523 std::map<wxString, SYMBOLTYPE> symbolTypeMap;
528 if( symbolTypeMap.find( aValue.Upper() ) == symbolTypeMap.end() )
531 return symbolTypeMap[ aValue.Upper() ];
537 if( elementFromLine.EndsWith(
'\r' ) )
538 elementFromLine = elementFromLine.BeforeLast(
'\r' );
545 const std::map<wxString, wxString>& asyFiles =
m_fileCache[ wxS(
"asyFiles" ) ];
547 if( !asyFiles.count( aAscFileName.Lower() ) )
548 THROW_IO_ERROR( wxString::Format(
_(
"Symbol '%s.asy' not found" ), aAscFileName ) );
550 return SymbolBuilder( aAscFileName, asyFiles.at( aAscFileName.Lower() ), aAscFile );
554 const wxString& aAsyFileContent,
560 lt_symbol.
Name = aAscFileName;
564 for( wxString line : wxSplit( aAsyFileContent,
'\n' ) )
568 wxArrayString tokens = wxSplit( line,
' ' );
570 if( tokens.IsEmpty() )
573 wxString element = tokens[0].Upper();
575 if( element ==
"LINE" )
579 wxString lineWidth = tokens[1];
580 wxString startPointX = tokens[2];
581 wxString startPointY = tokens[3];
582 wxString endPointX = tokens[4];
583 wxString endPointY = tokens[5];
587 lt_line.
Start =
pointCheck( startPointX, startPointY, lineNumber, aAscFileName );
588 lt_line.
End =
pointCheck( endPointX, endPointY, lineNumber, aAscFileName );
590 int lineStyleNumber = 0;
592 if( tokens.size() == 7 )
594 wxString lineStyle = tokens[6];
595 lineStyleNumber =
integerCheck( lineStyle, lineNumber, aAscFileName );
600 lt_symbol.
Lines.push_back( lt_line );
602 else if( element ==
"RECTANGLE" )
606 wxString lineWidth = tokens[1];
607 wxString botRightX = tokens[2];
608 wxString botRightY = tokens[3];
609 wxString topLeftX = tokens[4];
610 wxString topRightY = tokens[5];
617 int lineStyleNumber = 0;
619 if( tokens.size() == 7 )
621 wxString lineStyle = tokens[6];
622 lineStyleNumber =
integerCheck( lineStyle, lineNumber, aAscFileName );
629 else if( element ==
"CIRCLE" )
637 wxString lineWidth = tokens[1];
638 wxString botRightX = tokens[2];
639 wxString botRightY = tokens[3];
640 wxString topLeftX = tokens[4];
641 wxString topRightY = tokens[5];
648 int lineStyleNumber = 0;
650 if( tokens.size() == 7 )
652 wxString lineStyle = tokens[6];
653 lineStyleNumber =
integerCheck( lineStyle, lineNumber, aAscFileName );
658 lt_symbol.
Circles.push_back( circle );
660 else if( element ==
"ARC" )
669 wxString lineWidth = tokens[1];
670 wxString botRightX = tokens[2];
671 wxString botRightY = tokens[3];
672 wxString topLeftX = tokens[4];
673 wxString topRightY = tokens[5];
674 wxString arcStartPointX = tokens[6];
675 wxString arcStartPointY = tokens[7];
676 wxString arcEndPointX = tokens[8];
677 wxString arcEndPointY = tokens[9];
683 arc.
ArcStart =
pointCheck( arcStartPointX, arcStartPointY, lineNumber, aAscFileName );
684 arc.
ArcEnd =
pointCheck( arcEndPointX, arcEndPointY, lineNumber, aAscFileName );
686 int lineStyleNumber = 0;
688 if( tokens.size() == 11 )
690 wxString lineStyle = tokens[10];
691 lineStyleNumber =
integerCheck( lineStyle, lineNumber, aAscFileName );
696 lt_symbol.
Arcs.push_back( arc );
698 else if( element ==
"WINDOW" )
702 wxString number = tokens[1];
703 wxString windowPosX = tokens[2];
704 wxString windowPosY = tokens[3];
705 wxString justification = tokens[4];
706 wxString fontSize = tokens[5];
718 lt_symbol.
Windows.push_back( window );
720 else if( element ==
"SYMATTR" )
726 wxString key = tokens[1];
727 wxString value = tokens[2];
729 if( value == wxS(
"\"\"" ) )
730 value = wxEmptyString;
734 else if( element ==
"PIN" )
738 wxString pinLocationX = tokens[1];
739 wxString pinLocationY = tokens[2];
740 wxString Justification = tokens[3];
741 wxString nameOffSet = tokens[4];
744 pin.PinLocation =
pointCheck( pinLocationX, pinLocationY, lineNumber,aAscFileName );
748 lt_symbol.
Pins.push_back(
pin );
750 else if( element ==
"PINATTR" )
756 wxString
name = tokens[1];
757 wxString Value = tokens[2];
759 lt_symbol.
Pins.back().PinAttribute.insert( {
name, Value } );
761 else if( element ==
"SYMBOLTYPE" )
765 wxString symbolType = tokens[1];
781 std::vector<LT_ASC> ascFiles;
783 for(
const auto& [ fileName, contents ] :
m_fileCache[ wxS(
"ascFiles" ) ] )
786 std::vector<LT_SYMBOL> symbolArray;
795 for( wxString line : wxSplit( contents,
'\n' ) )
799 wxArrayString tokens = wxSplit( line,
' ' );
801 if( tokens.IsEmpty() )
804 wxString element = tokens[0].Upper();
806 if( element ==
"SHEET" )
810 wxString sheetNumber = tokens[1];
811 wxString sheetWidth = tokens[2];
812 wxString sheetHeight = tokens[3];
817 else if( element ==
"SYMBOL" )
821 wxString symbolName = tokens[1];
822 wxString posX = tokens[2];
823 wxString posY = tokens[3];
824 wxString rotate_mirror_option = tokens[4];
826 symbolName.Replace(
'\\',
'/' );
832 ascFile.
Symbols.push_back( lt_symbol );
835 else if( element ==
"WIRE" )
839 wxString startPointX = tokens[1];
840 wxString startPointY = tokens[2];
841 wxString endPointX = tokens[3];
842 wxString endPointY = tokens[4];
845 wire.
Start =
pointCheck( startPointX, startPointY, lineNumber, fileName );
846 wire.
End =
pointCheck( endPointX, endPointY, lineNumber, fileName );
848 ascFile.
Wires.push_back( wire );
852 else if( element ==
"FLAG" )
856 wxString posX = tokens[1];
857 wxString posY = tokens[2];
858 wxString
name = tokens[3];
868 else if( element ==
"DATAFLAG" )
872 wxString posX = tokens[1];
873 wxString posY = tokens[2];
874 wxString expression = tokens[3];
878 flag.Expression = expression;
884 else if( element ==
"WINDOW" )
888 wxString number = tokens[1];
889 wxString windowPosX = tokens[2];
890 wxString windowPosY = tokens[3];
891 wxString justification = tokens[4];
892 wxString fontSize = tokens[5];
894 int windowNumber =
integerCheck( number, lineNumber, fileName );
900 if( candidate.WindowNumber == windowNumber )
910 window = &ascFile.
Symbols.back().Windows.back();
920 else if( element ==
"SYMATTR" )
926 wxString
name = tokens[1];
927 wxString value = tokens[2];
929 if( value == wxS(
"\"\"" ) )
930 value = wxEmptyString;
932 ascFile.
Symbols.back().SymAttributes[
name.Upper() ] = value;
934 else if( element ==
"LINE" )
938 wxString lineWidth = tokens[1];
939 wxString startPointX = tokens[2];
940 wxString startPointY = tokens[3];
941 wxString endPointX = tokens[4];
942 wxString endPointY = tokens[5];
946 lt_line.
Start =
pointCheck( startPointX, startPointY, lineNumber, fileName );
947 lt_line.
End =
pointCheck( endPointX, endPointY, lineNumber, fileName );
949 int lineStyleNumber = 0;
951 if( tokens.size() == 7 )
953 wxString lineStyle = tokens[6];
954 lineStyleNumber =
integerCheck( lineStyle, lineNumber, fileName );
959 ascFile.
Lines.push_back( lt_line );
963 else if( element ==
"RECTANGLE" )
967 wxString lineWidth = tokens[1];
968 wxString botRightX = tokens[2];
969 wxString botRightY = tokens[3];
970 wxString topLeftX = tokens[4];
971 wxString topRightY = tokens[5];
978 int lineStyleNumber = 0;
980 if( tokens.size() == 7 )
982 wxString lineStyle = tokens[6];
983 lineStyleNumber =
integerCheck( lineStyle, lineNumber, fileName );
992 else if( element ==
"CIRCLE" )
996 wxString lineWidth = tokens[1];
997 wxString botRightX = tokens[2];
998 wxString botRightY = tokens[3];
999 wxString topLeftX = tokens[4];
1000 wxString topRightY = tokens[5];
1007 int lineStyleNumber = 0;
1009 if( tokens.size() == 7 )
1011 wxString lineStyle = tokens[6];
1012 lineStyleNumber =
integerCheck( lineStyle, lineNumber, fileName );
1017 ascFile.
Circles.push_back( circle );
1021 else if( element ==
"ARC" )
1030 wxString lineWidth = tokens[1];
1031 wxString botRightX = tokens[2];
1032 wxString botRightY = tokens[3];
1033 wxString topLeftX = tokens[4];
1034 wxString topRightY = tokens[5];
1035 wxString arcStartPointX = tokens[6];
1036 wxString arcStartPointY = tokens[7];
1037 wxString arcEndPointX = tokens[8];
1038 wxString arcEndPointY = tokens[9];
1044 arc.
ArcEnd =
pointCheck( arcStartPointX, arcStartPointY, lineNumber, fileName );
1047 int lineStyleNumber = 0;
1049 if( tokens.size() == 11 )
1051 wxString lineStyle = tokens[10];
1052 lineStyleNumber =
integerCheck( lineStyle, lineNumber, fileName );
1057 ascFile.
Arcs.push_back( arc );
1061 else if( element ==
"IOPIN" )
1065 wxString pinLocationX = tokens[1];
1066 wxString pinLocationY = tokens[2];
1067 wxString pinPolarity = tokens[3];
1073 ascFile.
Iopins.push_back( iopin );
1076 else if( element ==
"TEXT" )
1082 wxString positionX = tokens[1];
1083 wxString positionY = tokens[2];
1084 wxString justification = tokens[3];
1085 wxString fontSize = tokens[4];
1086 wxString value = tokens[5];
1089 text.Offset =
pointCheck( positionX, positionY, lineNumber, fileName );
1093 if( value.StartsWith( wxS(
"!" ), &
text.Value ) )
1094 text.Value.Replace( wxS(
"! " ), wxS(
"\n" ) );
1095 else if( value.StartsWith( wxS(
";" ), &
text.Value ) )
1096 text.Value.Replace( wxS(
"; " ), wxS(
"\n" ) );
1100 text.Value.Replace( wxS(
"\\n" ), wxS(
"\n" ) );
1105 else if( element ==
"BUSTAP" )
1109 wxString startPointX = tokens[1];
1110 wxString startPointY = tokens[2];
1111 wxString endPointX = tokens[3];
1112 wxString endPointY = tokens[4];
1115 bustap.
Start =
pointCheck( startPointX, startPointY, lineNumber, fileName );
1116 bustap.
End =
pointCheck( endPointX, endPointY, lineNumber, fileName );
1118 ascFile.
Bustap.push_back( bustap );
1122 else if( element ==
"VERSION" )
1124 wxString versionNumber = tokens[1];
1131 ascFiles.push_back( ascFile );
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
constexpr const Vec & GetOrigin() const
constexpr const SizeVec & GetSize() const
virtual void SetParent(EDA_ITEM *aParent)
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
Define a library symbol object.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
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.
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.
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
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)
virtual const wxString GetProjectPath() const
Return the full path of the project.
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
Holds all the data relating to one schematic.
PROJECT & Prj() const override
Return a reference to the project this schematic is part of.
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
void SetText(const wxString &aText) override
The class is been used for loading the asc and asy files in intermediate data structure.
void Parse(SCH_SHEET_PATH *aSheet, std::vector< LTSPICE_SCHEMATIC::LT_ASC > &outLT_ASCs, const std::vector< wxString > &aAsyFileNames)
Function responsible for loading the .asc and .asy files in intermediate data structure.
int ToKicadCoords(int aCoordinate)
Method converts ltspice coordinate(i.e scale) to kicad coordinates.
void CreateSymbol(LTSPICE_SCHEMATIC::LT_SYMBOL &aLtSymbol, LIB_SYMBOL *aLibSymbol)
void SetFileName(const wxString &aFileName)
Set the file name for this screen to aFileName.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void SetSize(const VECTOR2I &aSize)
std::vector< SCH_FIELD > & GetFields()
void SetPosition(const VECTOR2I &aPosition) override
SCH_SCREEN * GetScreen() const
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
#define THROW_IO_ERROR(msg)
void delete_if(_Container &__c, _Function &&__f)
Deletes all values from __c for which __f returns true.
wxString SafeReadFile(const wxString &aFilePath, const wxString &aReadType)
Nominally opens a file and reads it into a string.
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< WIRE > Wires
std::vector< RECTANGLE > Rectangles
std::vector< FLAG > Flags
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
ORIENTATION SymbolOrientation
std::vector< CIRCLE > Circles
std::vector< LINE > Lines
JUSTIFICATION Justification
A 4-sided polygon with opposite equal sides, used in representing shapes.
A metallic connection, used for transfer, between two points or pin.
VECTOR2< int32_t > VECTOR2I
Definition of file extensions used in Kicad.