22#ifndef _PCB_IO_ODBPP_H_
23#define _PCB_IO_ODBPP_H_
63 const std::map<std::string, UTF8>* aProperties =
nullptr )
override;
85 static int MinPrecision(
bool aInches ) {
return aInches ? 4 : 3; }
100 bool CanReadBoard(
const wxString& aFileName )
const override {
return false; }
106 bool CanReadLibrary(
const wxString& aFileName )
const override {
return false; }
123 inline std::map<std::pair<PCB_LAYER_ID, PCB_LAYER_ID>, std::vector<BOARD_ITEM*>>&
147 m_netTieFeatures.try_emplace( std::make_pair( aItem, aLayer ), aLayerName, aIndex );
150 const std::map<std::pair<const BOARD_ITEM*, PCB_LAYER_ID>, std::pair<wxString, size_t>>&
165 bool ExportODB(
const wxString& aFileName );
174 template <
typename T,
typename... Args>
177 std::shared_ptr<ODB_ENTITY_BASE> entity =
178 std::make_shared<T>( std::forward<Args>( args )... );
193 std::map<ODB_AUX_LAYER_KEY, std::vector<BOARD_ITEM*>>
196 std::map<std::pair<PCB_LAYER_ID, PCB_LAYER_ID>, std::vector<BOARD_ITEM*>>
207 std::map<std::pair<const BOARD_ITEM*, PCB_LAYER_ID>, std::pair<wxString, size_t>>
m_netTieFeatures;
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Board stackup snapshot synchronized without changing the source board.
Handle the data for a net.
std::map< std::pair< PCB_LAYER_ID, ZONE * >, EDA_DATA::SUB_NET_PLANE * > & GetPlaneSubnetMap()
std::unique_ptr< FAB_STACKUP > m_fabStackup
void ConfigureExport(BOARD &aBoard, const ODB_EXPORT_OPTIONS &aOptions)
std::map< PCB_TRACK *, EDA_DATA::SUB_NET * > & GetViaTraceSubnetMap()
std::shared_ptr< ODB_TREE_WRITER > m_writer
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.
void ClearLoadedFootprints()
void Make(Args &&... args)
std::vector< std::shared_ptr< FOOTPRINT > > & GetLoadedFootprintList()
std::map< std::pair< PCB_LAYER_ID, ZONE * >, EDA_DATA::SUB_NET_PLANE * > m_plane_subnets
bool CanReadFootprint(const wxString &aFileName) const override
Check if this PCB_IO can read a footprint from specified file or directory.
std::vector< ODB_LAYER_NAME > & GetLayerNameList()
void RecordNetTieFeature(const BOARD_ITEM *aItem, PCB_LAYER_ID aLayer, const wxString &aLayerName, size_t aIndex)
std::map< std::pair< const BOARD_ITEM *, PCB_LAYER_ID >, std::pair< wxString, size_t > > m_netTieFeatures
const FAB_DRILL_MODEL & GetFabDrillModel()
bool ExportODB(const wxString &aFileName)
std::vector< std::shared_ptr< FOOTPRINT > > m_loaded_footprints
static int MinPrecision(bool aInches)
Lowest sigfig that still resolves a 0.1 mil grid: 3 decimal places in mm, 4 in inches.
void Export(const wxString &aFileName, BOARD &aBoard, const ODB_EXPORT_OPTIONS &aOptions)
Write the product model tree at aFileName Throw IO_ERROR when the write fails.
std::map< std::pair< PCB_LAYER_ID, PCB_LAYER_ID >, std::vector< BOARD_ITEM * > > & GetSlotHolesMap()
std::map< ODB_AUX_LAYER_KEY, std::vector< BOARD_ITEM * > > m_auxilliary_layers
const FAB_STACKUP & GetFabStackup() const
std::map< const PAD *, EDA_DATA::SUB_NET_TOEPRINT * > & GetPadSubnetMap()
static int MaxPrecision()
Highest sigfig accepted by the exporter, matching the export dialog's spin control.
void SaveBoard(const wxString &aFileName, BOARD &aBoard, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be u...
std::map< int, wxString > m_netNames
std::map< DRILL_SPAN, std::vector< BOARD_ITEM * > > & GetDrillLayerItemsMap()
const IO_BASE::IO_FILE_DESC GetBoardFileDesc() const override
Return board file description for the PCB_IO.
std::map< ODB_AUX_LAYER_KEY, std::vector< BOARD_ITEM * > > & GetAuxilliaryLayerItemsMap()
std::vector< std::shared_ptr< ODB_ENTITY_BASE > > m_entities
std::map< const PAD *, EDA_DATA::SUB_NET_TOEPRINT * > m_topeprint_subnets
const ODB_FORMAT & GetFormat() const
std::map< std::pair< PCB_LAYER_ID, PCB_LAYER_ID >, std::vector< BOARD_ITEM * > > m_slot_holes
std::map< DRILL_SPAN, std::vector< BOARD_ITEM * > > m_drill_layers
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
const wxString & GetLegalNetName(int aNetCode) const
bool GenerateFiles(ODB_TREE_WRITER &writer)
const std::map< std::pair< const BOARD_ITEM *, PCB_LAYER_ID >, std::pair< wxString, size_t > > & GetNetTieFeatures() const
std::map< PCB_TRACK *, EDA_DATA::SUB_NET * > m_via_trace_subnets
bool CreateDirectories(ODB_TREE_WRITER &writer)
std::vector< ODB_LAYER_NAME > m_layer_name_list
std::unique_ptr< FAB_DRILL_MODEL > m_fabDrillModel
bool CanReadLibrary(const wxString &aFileName) const override
Checks if this IO object can read the specified library file/directory.
long long GetLibraryTimestamp(const wxString &aLibraryPath) const override
Generate a timestamp representing all the files in the library (including the library directory).
PCB_IO(const wxString &aName)
A progress reporter interface for use in multi-threaded environments.
Represent a set of closed polygons.
Handle a list of polygons defining a copper zone.
PCB_LAYER_ID
A quick note on layer IDs:
Container that describes file type info.
What a caller asks of one ODB++ export.