37#include <wx/wfstream.h>
39#include <wx/filename.h>
60 wxFileInputStream stream( aFileName );
62 if( !stream.IsOk() || stream.GetLength() < 8 )
68 if( stream.LastRead() < 8 )
81 const std::map<std::string, UTF8>* aProperties,
90 m_board->SetFileName( aFileName );
109 if( !rules.IsEmpty() )
111 wxFileName drcPath( aFileName );
112 drcPath.SetExt( wxT(
"kicad_dru" ) );
114 wxFile drcFile( drcPath.GetFullPath(), wxFile::write );
116 if( drcFile.IsOpened() )
117 drcFile.Write( rules );
Information pertinent to a Pcbnew printed circuit board.
Parses a DipTrace .dip binary board file and populates a KiCad BOARD.
wxString GenerateDesignRules() const
Build a KiCad custom design-rule (.kicad_dru) document for the per-zone DipTrace properties that have...
void Parse()
Parse the file and populate the board. Throws IO_ERROR on failure.
PROGRESS_REPORTER * m_progressReporter
Progress reporter to track the progress of the operation, may be nullptr.
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.
Parser for DipTrace binary .dip board files.
#define THROW_IO_ERROR(msg)
macro which captures the "call site" values of FILE_, __FUNCTION & LINE
Pcbnew PCB_IO for DipTrace binary .dip board files.
std::vector< std::string > header