KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KICAD_NETLIST_READER Class Reference

Read the new s-expression based KiCad netlist format. More...

#include <netlist_reader.h>

Inheritance diagram for KICAD_NETLIST_READER:
NETLIST_READER

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.
 

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.
 
static NETLIST_READERGetNetlistReader (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.
 

Protected Attributes

NETLISTm_netlist
 The net list to read the file(s) into.
 
bool m_loadFootprintFilters
 Load the component footprint filters section if true.
 
bool m_loadNets
 Load the nets section of the netlist file if true.
 
LINE_READERm_lineReader
 The line reader of the netlist.
 
CMP_READERm_footprintReader
 The reader used to load the footprint links. If NULL, footprint links are not read.
 

Detailed Description

Read the new s-expression based KiCad netlist format.

Definition at line 348 of file netlist_reader.h.

Member Enumeration Documentation

◆ NETLIST_FILE_T

Enumerator
UNKNOWN 
ORCAD 
LEGACY 
KICAD 

Definition at line 106 of file netlist_reader.h.

Constructor & Destructor Documentation

◆ KICAD_NETLIST_READER()

KICAD_NETLIST_READER::KICAD_NETLIST_READER ( LINE_READER aLineReader,
NETLIST aNetlist,
CMP_READER aFootprintLinkReader = nullptr 
)
inline

Definition at line 351 of file netlist_reader.h.

◆ ~KICAD_NETLIST_READER()

virtual KICAD_NETLIST_READER::~KICAD_NETLIST_READER ( )
inlinevirtual

Definition at line 357 of file netlist_reader.h.

Member Function Documentation

◆ GetNetlistReader()

NETLIST_READER * NETLIST_READER::GetNetlistReader ( NETLIST aNetlist,
const wxString &  aNetlistFileName,
const wxString &  aCompFootprintFileName = wxEmptyString 
)
staticinherited

Attempt to determine the net list file type of aNetlistFileName and return the appropriate NETLIST_READER type.

Parameters
aNetlistis the netlist to load aNetlistFileName into.
aNetlistFileNameis the full path and file name of the net list to read.
aCompFootprintFileNameis 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.
Returns
the appropriate NETLIST_READER if aNetlistFileName is a valid netlist or NULL if aNetlistFileName is not a valid netlist files.

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_NETLIST_EXPORTER_KICAD_FIXTURE::CompareNetlists(), and PCB_EDIT_FRAME::ReadNetlistFromFile().

◆ GuessNetlistFileType()

NETLIST_READER::NETLIST_FILE_T NETLIST_READER::GuessNetlistFileType ( LINE_READER aLineReader)
staticinherited

Look at aFileHeaderLine to see if it matches any of the netlist file types it knows about.

Parameters
aLineReaderis the LINE_READER object containing lines from the netlist to test.
Returns
the NETLIST_FILE_T of aLineReader.

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().

◆ LoadNetlist()

void KICAD_NETLIST_READER::LoadNetlist ( )
overridevirtual

Member Data Documentation

◆ m_footprintReader

CMP_READER* NETLIST_READER::m_footprintReader
protectedinherited

The reader used to load the footprint links. If NULL, footprint links are not read.

Definition at line 178 of file netlist_reader.h.

Referenced by LEGACY_NETLIST_READER::LoadNetlist(), LoadNetlist(), NETLIST_READER::NETLIST_READER(), and NETLIST_READER::~NETLIST_READER().

◆ m_lineReader

◆ m_loadFootprintFilters

bool NETLIST_READER::m_loadFootprintFilters
protectedinherited

Load the component footprint filters section if true.

Definition at line 173 of file netlist_reader.h.

Referenced by LEGACY_NETLIST_READER::LoadNetlist(), and NETLIST_READER::NETLIST_READER().

◆ m_loadNets

bool NETLIST_READER::m_loadNets
protectedinherited

Load the nets section of the netlist file if true.

Definition at line 174 of file netlist_reader.h.

Referenced by NETLIST_READER::NETLIST_READER().

◆ m_netlist

NETLIST* NETLIST_READER::m_netlist
protectedinherited

The documentation for this class was generated from the following files: