21#ifndef _ODB_EDA_DATA_H_
22#define _ODB_EDA_DATA_H_
44 size_t GetLyrIdx(
const wxString& aLayerName );
46 bool AddShort(
const std::set<int>& aNetCodes,
const wxString& aLayer,
47 size_t aFeatureIndex, uint32_t aUid );
69 void Write( std::ostream& ost )
const;
77 void Write( std::ostream& ost )
const;
93 void WriteSubnet( std::ostream& ost )
const override;
100 void WriteSubnet( std::ostream& ost )
const override;
131 void WriteSubnet( std::ostream& ost )
const override;
156 void WriteSubnet( std::ostream& ost )
const override;
169 template <
typename T,
typename... Args>
172 auto f = std::make_unique<T>(
subnets.size(), std::forward<Args>( args )... );
174 subnets.push_back( std::move( f ) );
178 void Write( std::ostream& ost,
bool aIncludeComponents )
const;
233 PACKAGE(
const size_t aIndex,
const wxString& afpName ) :
303 OUTLINE_RECT( aBox.GetPosition(), aBox.GetWidth(), aBox.GetHeight() )
311 void Write( std::ostream& ost,
const ODB_FORMAT& aFormat )
const override;
321 if( !aPolygon.empty() && aPolygon[0].PointCount() >= 3 )
323 m_surfaces = std::make_unique<ODB_SURFACE_DATA>( aPolygon );
333 void Write( std::ostream& ost,
const ODB_FORMAT& aFormat )
const override;
346 void Write( std::ostream& ost,
const ODB_FORMAT& aFormat )
const override;
359 void Write( std::ostream& ost,
const ODB_FORMAT& aFormat )
const override;
ATTR_RECORD_WRITER()=default
FEATURE_ID(TYPE t, size_t l, size_t fid)
void Write(std::ostream &ost) const
T & AddSubnet(Args &&... args)
std::list< std::unique_ptr< SUB_NET > > subnets
void Write(std::ostream &ost, bool aIncludeComponents) const
NET(size_t aIndex, const wxString &aName)
PACKAGE(const size_t aIndex, const wxString &afpName)
void AddPin(const PAD *aPad, size_t aPinNum, const ODB_FORMAT &aFormat)
std::vector< std::shared_ptr< PIN > > m_pinsVec
void Write(std::ostream &ost, const ODB_FORMAT &aFormat) const
const std::shared_ptr< PIN > GetEdaPkgPin(size_t aPadIndex) const
wxString m_name
<! Reference number of the package to be used in CMP.
std::list< std::unique_ptr< PKG_OUTLINE > > m_pkgOutlines
PIN(const size_t aIndex, const wxString &aName)
std::list< std::unique_ptr< PKG_OUTLINE > > m_pinOutlines
void Write(std::ostream &ost, const ODB_FORMAT &aFormat) const
std::pair< wxString, wxString > m_center
void WriteSubnet(std::ostream &ost) const override
SUB_NET_PLANE(size_t aIndex, EDA_DATA *aEda, FILL_TYPE aFill, CUTOUT_TYPE aCutout, size_t aFillSize)
void WriteSubnet(std::ostream &ost) const override
SUB_NET_TOEPRINT(size_t aIndex, EDA_DATA *aEda, SIDE aSide, size_t aCompNum, size_t aToepNum)
SUB_NET_TRACE(size_t aIndex, EDA_DATA *aEda)
void WriteSubnet(std::ostream &ost) const override
SUB_NET_VIA(size_t aIndex, EDA_DATA *aEda)
void WriteSubnet(std::ostream &ost) const override
std::list< FEATURE_ID > feature_ids
void Write(std::ostream &ost) const
void AddFeatureID(FEATURE_ID::TYPE type, const wxString &layer, size_t feature_id)
SUB_NET(size_t aIndex, EDA_DATA *aEda)
virtual void WriteSubnet(std::ostream &ost) const =0
bool AddShort(const std::set< int > &aNetCodes, const wxString &aLayer, size_t aFeatureIndex, uint32_t aUid)
std::list< const PACKAGE * > packages
std::map< wxString, size_t > layers_map
std::map< size_t, NET > nets_map
void AssignNetUids(PCB_IO_ODBPP &aPlugin)
NET & GetNet(size_t aNetcode)
std::vector< wxString > layers
void WriteShortf(std::ostream &ost, const ODB_FORMAT &aFormat) const
void AddPackage(const FOOTPRINT *aFp, const ODB_FORMAT &aFormat)
const PACKAGE & GetPackage(size_t aHash) const
void Write(std::ostream &ost, const ODB_FORMAT &aFormat) const
std::map< size_t, PACKAGE > packages_map
std::vector< SHORT_NET > m_shorts
void AddNET(const NETINFO_ITEM *aNet, const wxString &aName)
std::vector< std::shared_ptr< FOOTPRINT > > m_eda_footprints
size_t GetLyrIdx(const wxString &aLayerName)
std::vector< std::shared_ptr< FOOTPRINT > > GetEdaFootprints() const
Handle the data for a net.
void Write(std::ostream &ost, const ODB_FORMAT &aFormat) const override
OUTLINE_CIRCLE(const VECTOR2I &aCenter, size_t aRadius)
void Write(std::ostream &ost, const ODB_FORMAT &aFormat) const override
std::unique_ptr< ODB_SURFACE_DATA > m_surfaces
OUTLINE_CONTOUR(const SHAPE_POLY_SET::POLYGON &aPolygon, FILL_T aFillType=FILL_T::FILLED_SHAPE)
OUTLINE_RECT(const BOX2I &aBox)
void Write(std::ostream &ost, const ODB_FORMAT &aFormat) const override
OUTLINE_RECT(const VECTOR2I &aLowerLeft, size_t aWidth, size_t aHeight)
OUTLINE_SQUARE(const VECTOR2I &aCenter, size_t aHalfSide)
void Write(std::ostream &ost, const ODB_FORMAT &aFormat) const override
virtual ~PKG_OUTLINE()=default
virtual void Write(std::ostream &ost, const ODB_FORMAT &aFormat) const =0
std::vector< SHAPE_LINE_CHAIN > POLYGON
represents a single polygon outline with holes.
@ FILLED_SHAPE
Fill with object color.
std::set< uint32_t > m_netUids
VECTOR2< int32_t > VECTOR2I