44 const std::map<std::string, UTF8>* aProperties,
PROJECT* aProject )
48 THROW_IO_ERROR(
_(
"TARGET 3001! boards cannot be appended to an existing board." ) );
73 wxString
name = fp->GetFPID().GetUniStringLibItemName();
78 std::unique_ptr<FOOTPRINT> def(
static_cast<FOOTPRINT*
>( fp->Duplicate(
false ) ) );
79 def->SetParent(
nullptr );
81 if( def->IsFlipped() )
85 def->SetPosition(
VECTOR2I( 0, 0 ) );
93 std::vector<FOOTPRINT*>
result;
Information pertinent to a Pcbnew printed circuit board.
REPORTER * m_reporter
Reporter to log errors/warnings to, may be nullptr.
PROGRESS_REPORTER * m_progressReporter
Progress reporter to track the progress of the operation, may be nullptr.
wxString m_importedDesignRules
bool CanReadBoard(const wxString &aFileName) const override
std::vector< FOOTPRINT * > GetImportedCachedLibraryFootprints() override
Return a container with the cached library footprints generated in the last call to Load.
std::map< wxString, std::unique_ptr< FOOTPRINT > > m_libraryFootprints
by package name
void loadBoard(const wxString &aFileName, BOARD &aBoard, bool aIsNewLoad, const std::map< std::string, UTF8 > *aProperties=nullptr, PROJECT *aProject=nullptr) override
Parse aFileName into aBoard.
BOARD * m_board
The board BOARD being worked on, no ownership here.
virtual bool CanReadBoard(const wxString &aFileName) const
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.
Builds a KiCad board from a parsed TARGET 3001!
const wxString & DesignRules() const
Custom rules that carry what KiCad cannot store on the items themselves, empty when none apply.
static constexpr EDA_ANGLE ANGLE_0
#define THROW_IO_ERROR(msg)
macro which captures the "call site" values of FILE_, __FUNCTION & LINE
#define THROW_IO_CANCELLED()
@ LEFT_RIGHT
Flip left to right (around the Y axis)
PROJECT ParseFile(const wxString &aFileName)
Parse a complete .T3001 file.
bool LooksLikeProject(const wxString &aFileName)
Cheap check used by the plugin managers: the extension matches and the header is plausible.
wxString result
Test unit parsing edge cases and error handling.
VECTOR2< int32_t > VECTOR2I