37 const wxFileName& aLibraryFileName,
REPORTER* aReporter )
39 std::map<wxString, wxString> mapOfAscFiles;
40 std::map<wxString, wxString> mapOfAsyFiles;
56 std::queue<wxString> ascFileQueue;
57 ascFileQueue.push( aLibraryFileName.GetName().Lower() );
59 LTSPICE_FILE rootAscFile( ascFileQueue.front(), { 0, 0 } );
61 rootAscFile.
Sheet = aRootSheet;
64 int parentSheetIndex = 0;
67 std::vector<LTSPICE_FILE> ascFiles;
69 ascFiles.push_back( rootAscFile );
71 while( !ascFileQueue.empty() )
76 wxString ascFilePath = mapOfAscFiles[ ascFileQueue.front() ];
87 for(
LTSPICE_FILE& newSubSchematicElement : newSubSchematicElements )
89 wxString asyName = newSubSchematicElement.ElementName;
90 auto it = mapOfAsyFiles.find( asyName );
92 if( it == mapOfAsyFiles.end() )
102 newSubSchematicElement.ParentIndex = parentSheetIndex;
103 newSubSchematicElement.Screen = screen;
104 newSubSchematicElement.Sheet =
new SCH_SHEET();
106 ascFileQueue.push( newSubSchematicElement.ElementName );
107 ascFiles.push_back( newSubSchematicElement );
116 for(
unsigned int i = 0; i < ascFiles.size(); i++ )
119 wxString buffer =
SafeReadFile( mapOfAscFiles[ascFiles[i].ElementName], wxS(
"r" ) );
126 m_fileCache[ wxS(
"ascFiles" ) ][ wxS(
"parentFile" ) ] = buffer;
129 wxASSERT( file.Sheet ==
nullptr && file.Screen ==
nullptr );
138 std::map tempAsyMap =
ReadAsyFile( ascFiles[i], mapOfAsyFiles );
139 wxString ascFileName = ascFiles[i].ElementName;
142 LIB_SYMBOL tempLibSymbol( ascFiles[i].ElementName );
150 curSheet->
SetParent( ascFiles[ascFiles[i].ParentIndex].Sheet );
154 wxString sheetName = wxString::Format( wxS(
"%s-subsheet-%d" ),
155 ascFiles[i].ElementName,
158 sheetNameField.
SetText( sheetName );
159 fileNameSheet.
SetText( sheetName +
".kicad_sch" );
161 curSheet->
SetScreen( ascFiles[i].Screen );
163 curSheetPath = ascFiles[ascFiles[i].ParentIndex].SheetPath;
166 ascFiles[i].SheetPath = curSheetPath;
168 ascFiles[ascFiles[i].ParentIndex].Sheet->GetScreen()->Append( curSheet );
177 ascFiles[i].SheetPath.push_back( curSheet );
178 curSheetPath = ascFiles[i].SheetPath;
181 std::vector<wxString> subSchematicAsyFiles;
184 subSchematicAsyFiles.
push_back( ascFile.ElementName );
189 parser.
Parse( &curSheetPath, lt_ascs, subSchematicAsyFiles );
200 std::map<wxString, wxString>& aMapOfAscFiles,
201 std::map<wxString, wxString>& aMapOfAsyFiles,
202 const wxString& aBase )
207 bool cont = aDir.GetFirst( &filename, wxEmptyString, wxDIR_FILES | wxDIR_HIDDEN );
211 wxFileName
path( aDir.GetName(), filename );
213 auto logToMap = [&]( std::map<wxString, wxString>& aMapToLogTo,
const wxString& aKey )
215 if( aMapToLogTo.count( aKey ) )
220 _(
"File at '%s' was ignored. Using previously found "
221 "file at '%s' instead." ),
222 path.GetFullPath(), aMapToLogTo.at( aKey ) ) );
227 aMapToLogTo.emplace( aKey,
path.GetFullPath() );
231 wxString elementName1 = ( aBase +
path.GetName() ).Lower();
232 wxString elementName2 =
path.GetName().Lower();
233 wxString extension =
path.GetExt().Lower();
235 if( extension == wxS(
"asc" ) )
237 logToMap( aMapOfAscFiles, elementName1 );
239 if( !aBase.IsEmpty() )
240 logToMap( aMapOfAscFiles, elementName2 );
242 else if( extension == wxS(
"asy" ) )
244 logToMap( aMapOfAsyFiles, elementName1 );
246 if( !aBase.IsEmpty() )
247 logToMap( aMapOfAsyFiles, elementName2 );
250 cont = aDir.GetNext( &filename );
256 bool cont = aDir.GetFirst( &filename, wxEmptyString, wxDIR_DIRS | wxDIR_HIDDEN );
260 wxFileName
path( aDir.GetName(), filename );
261 wxDir subDir(
path.GetFullPath() );
264 filename + wxS(
"/" ) );
266 cont = aDir.GetNext( &filename );
272std::map<wxString, wxString>
274 const std::map<wxString, wxString>& aAsyFileMap )
276 std::map<wxString, wxString> resultantMap;
280 if( aAsyFileMap.count( fileName ) )
281 resultantMap[fileName] =
SafeReadFile( aAsyFileMap.at( fileName ), wxS(
"r" ) );
287std::map<wxString, wxString>
289 const std::map<wxString, wxString>& aAsyFileMap )
291 std::map<wxString, wxString> resultantMap;
295 wxString fileName = source.ElementName;
297 if( aAsyFileMap.count( fileName ) )
298 resultantMap[fileName] =
SafeReadFile( aAsyFileMap.at( fileName ), wxS(
"r" ) );
307 std::vector<LTSPICE_FILE> resultantArray;
308 wxArrayString lines = wxSplit( aAscFile,
'\n' );
310 for(
const wxString& line : lines )
312 wxArrayString tokens = wxSplit( line,
' ' );
314 if( !tokens.IsEmpty() && tokens[0].Upper() == wxS(
"SYMBOL" ) )
316 wxString elementName( tokens[1] );
319 tokens[2].ToLong( &posX );
320 tokens[3].ToLong( &posY );
322 elementName.Replace(
'\\',
'/' );
326 resultantArray.push_back( asyFile );
330 return resultantArray;
336 wxStringTokenizer lines( aAsyFile,
"\n" );
338 while( lines.HasMoreTokens() )
340 wxStringTokenizer parts( lines.GetNextToken(),
" " );
342 if( parts.GetNextToken().IsSameAs( wxS(
"SYMATTR" ),
false )
343 && parts.GetNextToken().IsSameAs( wxS(
"Prefix" ),
false ) )
354 const wxString& aFileName )
358 if( !aToken.ToLong( &result ) )
360 THROW_IO_ERROR( wxString::Format(
_(
"Expecting integer at line %d in file %s" ),
370 int aLineNumber,
const wxString& aFileName )
378 int aExpectedMax,
int aLineNumber,
379 const wxString& aFileName )
381 if( (
int) aActualSize < aExpectedMin )
383 THROW_IO_ERROR( wxString::Format(
_(
"Expected data missing on line %d in file %s" ),
387 else if( (
int) aActualSize > aExpectedMax )
389 THROW_IO_ERROR( wxString::Format(
_(
"Extra data found on line %d in file %s" ),
399 for(
int i = aIndex + 1; i < (int) aTokens.GetCount(); i++ )
400 aTokens[ aIndex ] +=
" " + aTokens[i];
406 std::map<int, LINESTYLE> lineStyleMap;
414 if( lineStyleMap.find( aValue ) == lineStyleMap.end() )
417 return lineStyleMap[ aValue ];
423 std::map<wxString, LINEWIDTH> lineWidthMap;
428 if( lineWidthMap.find( aValue.Upper() ) == lineWidthMap.end() )
431 return lineWidthMap[ aValue.Upper() ];
437 std::map<wxString, POLARITY> polarityMap;
446 if( polarityMap.find( aValue.Upper() ) == polarityMap.end() )
449 return polarityMap[ aValue.Upper() ];
455 std::map<wxString, ORIENTATION> rotationMirrorMap;
467 if( rotationMirrorMap.find( aValue.Upper() ) == rotationMirrorMap.end() )
468 THROW_IO_ERROR(
_(
"Expecting R0, R90, R18, R270, M0, M90, M180 or M270" ) );
470 return rotationMirrorMap[ aValue.Upper() ];
476 std::map<wxString, JUSTIFICATION> justificationMap;
489 if( justificationMap.find( aValue.Upper() ) == justificationMap.end() )
490 THROW_IO_ERROR(
_(
"Expecting LEFT, CENTER, RIGHT, TOP, BOTTOM, VLEFT, VRIGHT, VCENTER, VTOP or VBOTTOM" ) );
492 return justificationMap[ aValue.Upper() ];
498 std::map<wxString, JUSTIFICATION> pinJustificationMap;
511 if( pinJustificationMap.find( aValue.Upper() ) == pinJustificationMap.end() )
512 THROW_IO_ERROR(
_(
"Expecting NONE, BOTTOM, TOP, LEFT, RIGHT, VBOTTOM, VTOP, VCENTER, VLEFT or VRIGHT" ) );
514 return pinJustificationMap[ aValue.Upper() ];
520 std::map<wxString, SYMBOLTYPE> symbolTypeMap;
525 if( symbolTypeMap.find( aValue.Upper() ) == symbolTypeMap.end() )
528 return symbolTypeMap[ aValue.Upper() ];
534 if( elementFromLine.EndsWith(
'\r' ) )
535 elementFromLine = elementFromLine.BeforeLast(
'\r' );
542 const std::map<wxString, wxString>& asyFiles =
m_fileCache[ wxS(
"asyFiles" ) ];
544 if( !asyFiles.count( aAscFileName.Lower() ) )
545 THROW_IO_ERROR( wxString::Format(
_(
"Symbol '%s.asy' not found" ), aAscFileName ) );
547 return SymbolBuilder( aAscFileName, asyFiles.at( aAscFileName.Lower() ), aAscFile );
551 const wxString& aAsyFileContent,
557 lt_symbol.
Name = aAscFileName;
561 for( wxString line : wxSplit( aAsyFileContent,
'\n' ) )
565 wxArrayString tokens = wxSplit( line,
' ' );
567 if( tokens.IsEmpty() )
570 wxString element = tokens[0].Upper();
572 if( element ==
"LINE" )
576 wxString lineWidth = tokens[1];
577 wxString startPointX = tokens[2];
578 wxString startPointY = tokens[3];
579 wxString endPointX = tokens[4];
580 wxString endPointY = tokens[5];
584 lt_line.
Start =
pointCheck( startPointX, startPointY, lineNumber, aAscFileName );
585 lt_line.
End =
pointCheck( endPointX, endPointY, lineNumber, aAscFileName );
587 int lineStyleNumber = 0;
589 if( tokens.size() == 7 )
591 wxString lineStyle = tokens[6];
592 lineStyleNumber =
integerCheck( lineStyle, lineNumber, aAscFileName );
597 lt_symbol.
Lines.push_back( lt_line );
599 else if( element ==
"RECTANGLE" )
603 wxString lineWidth = tokens[1];
604 wxString botRightX = tokens[2];
605 wxString botRightY = tokens[3];
606 wxString topLeftX = tokens[4];
607 wxString topRightY = tokens[5];
614 int lineStyleNumber = 0;
616 if( tokens.size() == 7 )
618 wxString lineStyle = tokens[6];
619 lineStyleNumber =
integerCheck( lineStyle, lineNumber, aAscFileName );
626 else if( element ==
"CIRCLE" )
634 wxString lineWidth = tokens[1];
635 wxString botRightX = tokens[2];
636 wxString botRightY = tokens[3];
637 wxString topLeftX = tokens[4];
638 wxString topRightY = tokens[5];
645 int lineStyleNumber = 0;
647 if( tokens.size() == 7 )
649 wxString lineStyle = tokens[6];
650 lineStyleNumber =
integerCheck( lineStyle, lineNumber, aAscFileName );
655 lt_symbol.
Circles.push_back( circle );
657 else if( element ==
"ARC" )
666 wxString lineWidth = tokens[1];
667 wxString botRightX = tokens[2];
668 wxString botRightY = tokens[3];
669 wxString topLeftX = tokens[4];
670 wxString topRightY = tokens[5];
671 wxString arcStartPointX = tokens[6];
672 wxString arcStartPointY = tokens[7];
673 wxString arcEndPointX = tokens[8];
674 wxString arcEndPointY = tokens[9];
680 arc.
ArcStart =
pointCheck( arcStartPointX, arcStartPointY, lineNumber, aAscFileName );
681 arc.
ArcEnd =
pointCheck( arcEndPointX, arcEndPointY, lineNumber, aAscFileName );
683 int lineStyleNumber = 0;
685 if( tokens.size() == 11 )
687 wxString lineStyle = tokens[10];
688 lineStyleNumber =
integerCheck( lineStyle, lineNumber, aAscFileName );
693 lt_symbol.
Arcs.push_back( arc );
695 else if( element ==
"WINDOW" )
699 wxString number = tokens[1];
700 wxString windowPosX = tokens[2];
701 wxString windowPosY = tokens[3];
702 wxString justification = tokens[4];
703 wxString fontSize = tokens[5];
715 lt_symbol.
Windows.push_back( window );
717 else if( element ==
"SYMATTR" )
723 wxString key = tokens[1];
724 wxString value = tokens[2];
726 if( value == wxS(
"\"\"" ) )
727 value = wxEmptyString;
731 else if( element ==
"PIN" )
735 wxString pinLocationX = tokens[1];
736 wxString pinLocationY = tokens[2];
737 wxString Justification = tokens[3];
738 wxString nameOffSet = tokens[4];
741 pin.PinLocation =
pointCheck( pinLocationX, pinLocationY, lineNumber,aAscFileName );
745 lt_symbol.
Pins.push_back(
pin );
747 else if( element ==
"PINATTR" )
753 wxString
name = tokens[1];
754 wxString Value = tokens[2];
756 lt_symbol.
Pins.back().PinAttribute.insert( {
name, Value } );
758 else if( element ==
"SYMBOLTYPE" )
762 wxString symbolType = tokens[1];
778 std::vector<LT_ASC> ascFiles;
780 for(
const auto& [ fileName, contents ] :
m_fileCache[ wxS(
"ascFiles" ) ] )
783 std::vector<LT_SYMBOL> symbolArray;
792 for( wxString line : wxSplit( contents,
'\n' ) )
796 wxArrayString tokens = wxSplit( line,
' ' );
798 if( tokens.IsEmpty() )
801 wxString element = tokens[0].Upper();
803 if( element ==
"SHEET" )
807 wxString sheetNumber = tokens[1];
808 wxString sheetWidth = tokens[2];
809 wxString sheetHeight = tokens[3];
814 else if( element ==
"SYMBOL" )
818 wxString symbolName = tokens[1];
819 wxString posX = tokens[2];
820 wxString posY = tokens[3];
821 wxString rotate_mirror_option = tokens[4];
823 symbolName.Replace(
'\\',
'/' );
829 ascFile.
Symbols.push_back( lt_symbol );
832 else if( element ==
"WIRE" )
836 wxString startPointX = tokens[1];
837 wxString startPointY = tokens[2];
838 wxString endPointX = tokens[3];
839 wxString endPointY = tokens[4];
842 wire.
Start =
pointCheck( startPointX, startPointY, lineNumber, fileName );
843 wire.
End =
pointCheck( endPointX, endPointY, lineNumber, fileName );
845 ascFile.
Wires.push_back( wire );
849 else if( element ==
"FLAG" )
853 wxString posX = tokens[1];
854 wxString posY = tokens[2];
855 wxString
name = tokens[3];
865 else if( element ==
"DATAFLAG" )
869 wxString posX = tokens[1];
870 wxString posY = tokens[2];
871 wxString expression = tokens[3];
875 flag.Expression = expression;
881 else if( element ==
"WINDOW" )
885 wxString number = tokens[1];
886 wxString windowPosX = tokens[2];
887 wxString windowPosY = tokens[3];
888 wxString justification = tokens[4];
889 wxString fontSize = tokens[5];
891 int windowNumber =
integerCheck( number, lineNumber, fileName );
897 if( candidate.WindowNumber == windowNumber )
907 window = &ascFile.
Symbols.back().Windows.back();
917 else if( element ==
"SYMATTR" )
923 wxString
name = tokens[1];
924 wxString value = tokens[2];
926 if( value == wxS(
"\"\"" ) )
927 value = wxEmptyString;
929 ascFile.
Symbols.back().SymAttributes[
name.Upper() ] = value;
931 else if( element ==
"LINE" )
935 wxString lineWidth = tokens[1];
936 wxString startPointX = tokens[2];
937 wxString startPointY = tokens[3];
938 wxString endPointX = tokens[4];
939 wxString endPointY = tokens[5];
943 lt_line.
Start =
pointCheck( startPointX, startPointY, lineNumber, fileName );
944 lt_line.
End =
pointCheck( endPointX, endPointY, lineNumber, fileName );
946 int lineStyleNumber = 0;
948 if( tokens.size() == 7 )
950 wxString lineStyle = tokens[6];
951 lineStyleNumber =
integerCheck( lineStyle, lineNumber, fileName );
956 ascFile.
Lines.push_back( lt_line );
960 else if( element ==
"RECTANGLE" )
964 wxString lineWidth = tokens[1];
965 wxString botRightX = tokens[2];
966 wxString botRightY = tokens[3];
967 wxString topLeftX = tokens[4];
968 wxString topRightY = tokens[5];
975 int lineStyleNumber = 0;
977 if( tokens.size() == 7 )
979 wxString lineStyle = tokens[6];
980 lineStyleNumber =
integerCheck( lineStyle, lineNumber, fileName );
989 else if( element ==
"CIRCLE" )
993 wxString lineWidth = tokens[1];
994 wxString botRightX = tokens[2];
995 wxString botRightY = tokens[3];
996 wxString topLeftX = tokens[4];
997 wxString topRightY = tokens[5];
1004 int lineStyleNumber = 0;
1006 if( tokens.size() == 7 )
1008 wxString lineStyle = tokens[6];
1009 lineStyleNumber =
integerCheck( lineStyle, lineNumber, fileName );
1014 ascFile.
Circles.push_back( circle );
1018 else if( element ==
"ARC" )
1027 wxString lineWidth = tokens[1];
1028 wxString botRightX = tokens[2];
1029 wxString botRightY = tokens[3];
1030 wxString topLeftX = tokens[4];
1031 wxString topRightY = tokens[5];
1032 wxString arcStartPointX = tokens[6];
1033 wxString arcStartPointY = tokens[7];
1034 wxString arcEndPointX = tokens[8];
1035 wxString arcEndPointY = tokens[9];
1041 arc.
ArcEnd =
pointCheck( arcStartPointX, arcStartPointY, lineNumber, fileName );
1044 int lineStyleNumber = 0;
1046 if( tokens.size() == 11 )
1048 wxString lineStyle = tokens[10];
1049 lineStyleNumber =
integerCheck( lineStyle, lineNumber, fileName );
1054 ascFile.
Arcs.push_back( arc );
1058 else if( element ==
"IOPIN" )
1062 wxString pinLocationX = tokens[1];
1063 wxString pinLocationY = tokens[2];
1064 wxString pinPolarity = tokens[3];
1070 ascFile.
Iopins.push_back( iopin );
1073 else if( element ==
"TEXT" )
1079 wxString positionX = tokens[1];
1080 wxString positionY = tokens[2];
1081 wxString justification = tokens[3];
1082 wxString fontSize = tokens[4];
1083 wxString value = tokens[5];
1086 text.Offset =
pointCheck( positionX, positionY, lineNumber, fileName );
1090 if( value.StartsWith( wxS(
"!" ), &
text.Value ) )
1091 text.Value.Replace( wxS(
"! " ), wxS(
"\n" ) );
1092 else if( value.StartsWith( wxS(
";" ), &
text.Value ) )
1093 text.Value.Replace( wxS(
"; " ), wxS(
"\n" ) );
1097 text.Value.Replace( wxS(
"\\n" ), wxS(
"\n" ) );
1102 else if( element ==
"BUSTAP" )
1106 wxString startPointX = tokens[1];
1107 wxString startPointY = tokens[2];
1108 wxString endPointX = tokens[3];
1109 wxString endPointY = tokens[4];
1112 bustap.
Start =
pointCheck( startPointX, startPointY, lineNumber, fileName );
1113 bustap.
End =
pointCheck( endPointX, endPointY, lineNumber, fileName );
1115 ascFile.
Bustap.push_back( bustap );
1119 else if( element ==
"VERSION" )
1121 wxString versionNumber = tokens[1];
1128 ascFiles.push_back( ascFile );
const Vec & GetOrigin() const
const Vec & GetSize() const
BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
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.
Definition of file extensions used in Kicad.