![]() |
KiCad PCB EDA Suite
|
Read the new s-expression based KiCad netlist format. More...
#include <netlist_reader.h>
Public Types | |
enum | NETLIST_FILE_T { UNKNOWN = -1, ORCAD, LEGACY, KICAD } |
Public Member Functions | |
KICAD_NETLIST_READER (LINE_READER *aLineReader, NETLIST *aNetlist, CMP_READER *aFootprintLinkReader=nullptr) | |
virtual | ~KICAD_NETLIST_READER () |
virtual void | LoadNetlist () override |
Load the contents of the netlist file into aNetlist. More... | |
LINE_READER * | GetLineReader () |
Static Public Member Functions | |
static NETLIST_FILE_T | GuessNetlistFileType (LINE_READER *aLineReader) |
Look at aFileHeaderLine to see if it matches any of the netlist file types it knows about. More... | |
static NETLIST_READER * | GetNetlistReader (NETLIST *aNetlist, const wxString &aNetlistFileName, const wxString &aCompFootprintFileName=wxEmptyString) |
Attempt to determine the net list file type of aNetlistFileName and return the appropriate NETLIST_READER type. More... | |
Protected Attributes | |
NETLIST * | m_netlist |
The net list to read the file(s) into. More... | |
bool | m_loadFootprintFilters |
Load the component footprint filters section if true. More... | |
bool | m_loadNets |
Load the nets section of the netlist file if true. More... | |
LINE_READER * | m_lineReader |
The line reader of the netlist. More... | |
CMP_READER * | m_footprintReader |
The reader used to load the footprint links. If NULL, footprint links are not read. More... | |
Private Attributes | |
KICAD_NETLIST_PARSER * | m_parser |
The s-expression format parser. More... | |
Read the new s-expression based KiCad netlist format.
Definition at line 361 of file netlist_reader.h.
|
inherited |
Enumerator | |
---|---|
UNKNOWN | |
ORCAD | |
LEGACY | |
KICAD |
Definition at line 110 of file netlist_reader.h.
|
inline |
Definition at line 364 of file netlist_reader.h.
|
inlinevirtual |
Definition at line 372 of file netlist_reader.h.
References m_parser.
|
inherited |
|
staticinherited |
Attempt to determine the net list file type of aNetlistFileName and return the appropriate NETLIST_READER type.
aNetlist | is the netlist to load aNetlistFileName into. |
aNetlistFileName | is the full path and file name of the net list to read. |
aCompFootprintFileName | is the full path and file name of the component footprint associations to read. Set to wxEmptyString if loading the footprint association file is not required. |
Definition at line 81 of file netlist_reader.cpp.
References NETLIST_READER::GuessNetlistFileType(), NETLIST_READER::KICAD, NETLIST_READER::LEGACY, and NETLIST_READER::ORCAD.
Referenced by TEST_NETLISTS_FIXTURE::compareNetlists(), and PCB_EDIT_FRAME::ReadNetlistFromFile().
|
staticinherited |
Look at aFileHeaderLine to see if it matches any of the netlist file types it knows about.
aLineReader | is the LINE_READER object containing lines from the netlist to test. |
Definition at line 48 of file netlist_reader.cpp.
References FROM_UTF8(), NETLIST_READER::KICAD, NETLIST_READER::LEGACY, LINE_READER::Line(), NETLIST_READER::ORCAD, LINE_READER::ReadLine(), and NETLIST_READER::UNKNOWN.
Referenced by NETLIST_READER::GetNetlistReader().
|
overridevirtual |
Load the contents of the netlist file into aNetlist.
IO_ERROR | if a file IO error occurs. |
PARSE_ERROR | if an error occurs while parsing the file. |
Implements NETLIST_READER.
Definition at line 37 of file kicad_netlist_reader.cpp.
Referenced by PCB_EDIT_FRAME::FetchNetlistFromSchematic(), and CVPCB_MAINFRAME::ReadSchematicNetlist().
|
protectedinherited |
The reader used to load the footprint links. If NULL, footprint links are not read.
Definition at line 187 of file netlist_reader.h.
Referenced by LEGACY_NETLIST_READER::LoadNetlist(), NETLIST_READER::NETLIST_READER(), and NETLIST_READER::~NETLIST_READER().
|
protectedinherited |
The line reader of the netlist.
Definition at line 184 of file netlist_reader.h.
Referenced by LEGACY_NETLIST_READER::loadComponent(), LEGACY_NETLIST_READER::loadFootprintFilters(), LEGACY_NETLIST_READER::loadNet(), LEGACY_NETLIST_READER::LoadNetlist(), NETLIST_READER::NETLIST_READER(), and NETLIST_READER::~NETLIST_READER().
|
protectedinherited |
Load the component footprint filters section if true.
Definition at line 182 of file netlist_reader.h.
Referenced by LEGACY_NETLIST_READER::LoadNetlist(), and NETLIST_READER::NETLIST_READER().
|
protectedinherited |
Load the nets section of the netlist file if true.
Definition at line 183 of file netlist_reader.h.
Referenced by NETLIST_READER::NETLIST_READER().
|
protectedinherited |
The net list to read the file(s) into.
Definition at line 181 of file netlist_reader.h.
Referenced by LEGACY_NETLIST_READER::loadComponent(), LEGACY_NETLIST_READER::loadFootprintFilters(), LEGACY_NETLIST_READER::LoadNetlist(), and NETLIST_READER::NETLIST_READER().
|
private |
The s-expression format parser.
Definition at line 380 of file netlist_reader.h.
Referenced by ~KICAD_NETLIST_READER().