55 std::ifstream file( aFileName.fn_str() );
63 static const char* keywords[] = {
64 "REFDES",
"COMPCLASS",
"NETNAME",
"SUBCLASS",
"GRAPHICDATANAME",
65 "SYMNAME",
"PINNAME",
"VIAX",
"PADSHAPENAME",
"PADNAME",
"LAYERSORT"
71 while( std::getline( file, line ) && linesRead < 100 )
87 std::string upper = line;
88 std::transform( upper.begin(), upper.end(), upper.begin(), ::toupper );
90 for(
const char* kw : keywords )
92 if( upper.find( kw ) != std::string::npos )
102 const std::map<std::string, UTF8>* aProperties,
PROJECT* aProject )
110 m_board->SetFileName( aFileName );
124 readerr =
_(
"Could not read file " ) + aFileName.ToStdString();
Information pertinent to a Pcbnew printed circuit board.
PROGRESS_REPORTER * m_progressReporter
Progress reporter to track the progress of the operation, may be nullptr.
PCB_IO_FABMASTER()
Pcbnew PLUGIN for FABMASTER ASCII *.txt / *.fab format.
BOARD * LoadBoard(const wxString &aFileName, BOARD *aAppendToMe, const std::map< std::string, UTF8 > *aProperties=nullptr, PROJECT *aProject=nullptr) override
Load information from some input file format that this PCB_IO implementation knows about into either ...
bool CanReadBoard(const wxString &aFileName) const override
Checks if this PCB_IO can read the specified board file.
BOARD * m_board
The board BOARD being worked on, no ownership here.
virtual bool CanReadBoard(const wxString &aFileName) const
Checks if this PCB_IO can read the specified board file.
PCB_IO(const wxString &aName)
const std::map< std::string, UTF8 > * m_props
Properties passed via Save() or Load(), no ownership, may be NULL.
Container for project specific data.
#define THROW_IO_ERROR(msg)
macro which captures the "call site" values of FILE_, __FUNCTION & LINE
This file contains miscellaneous commonly used macros and functions.