21#ifndef _ODB_EDA_DATA_H_
22#define _ODB_EDA_DATA_H_
38 void Write( std::ostream& ost )
const;
39 size_t GetLyrIdx(
const wxString& aLayerName );
60 void Write( std::ostream& ost )
const;
68 void Write( std::ostream& ost )
const;
84 void WriteSubnet( std::ostream& ost )
const override;
91 void WriteSubnet( std::ostream& ost )
const override;
122 void WriteSubnet( std::ostream& ost )
const override;
147 void WriteSubnet( std::ostream& ost )
const override;
159 template <
typename T,
typename... Args>
162 auto f = std::make_unique<T>(
subnets.size(), std::forward<Args>( args )... );
164 subnets.push_back( std::move( f ) );
168 void Write( std::ostream& ost )
const;
217 void Write( std::ostream& ost )
const;
223 PACKAGE(
const size_t aIndex,
const wxString& afpName ) :
240 void AddPin(
const PAD* aPad,
size_t aPinNum );
246 void Write( std::ostream& ost )
const;
270 virtual void Write( std::ostream& ost )
const = 0;
284 OUTLINE_RECT( aBox.GetPosition(), aBox.GetWidth(), aBox.GetHeight() )
292 void Write( std::ostream& ost )
const override;
300 FILL_T aFillType = FILL_T::FILLED_SHAPE )
302 if( !aPolygon.empty() && aPolygon[0].PointCount() >= 3 )
304 m_surfaces = std::make_unique<ODB_SURFACE_DATA>( aPolygon );
305 if( aFillType != FILL_T::NO_FILL )
314 void Write( std::ostream& ost )
const override;
327 void Write( std::ostream& ost )
const override;
340 void Write( std::ostream& ost )
const override;
FEATURE_ID(TYPE t, size_t l, size_t fid)
void Write(std::ostream &ost) const
void Write(std::ostream &ost) const
T & AddSubnet(Args &&... args)
std::list< std::unique_ptr< SUB_NET > > subnets
NET(size_t aIndex, const wxString &aName)
PACKAGE(const size_t aIndex, const wxString &afpName)
void AddPin(const PAD *aPad, size_t aPinNum)
std::vector< std::shared_ptr< PIN > > m_pinsVec
const std::shared_ptr< PIN > GetEdaPkgPin(size_t aPadIndex) const
wxString m_name
<! Reference number of the package to be used in CMP.
void Write(std::ostream &ost) const
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
std::pair< wxString, wxString > m_center
void Write(std::ostream &ost) const
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
std::list< const PACKAGE * > packages
std::map< wxString, size_t > layers_map
std::list< const NET * > nets
std::map< size_t, NET > nets_map
NET & GetNet(size_t aNetcode)
std::vector< wxString > layers
const PACKAGE & GetPackage(size_t aHash) const
std::map< size_t, PACKAGE > packages_map
void AddNET(const NETINFO_ITEM *aNet)
std::vector< std::shared_ptr< FOOTPRINT > > m_eda_footprints
size_t GetLyrIdx(const wxString &aLayerName)
void AddPackage(const FOOTPRINT *aFp)
void Write(std::ostream &ost) const
std::vector< std::shared_ptr< FOOTPRINT > > GetEdaFootprints() const
Handle the data for a net.
void Write(std::ostream &ost) const override
OUTLINE_CIRCLE(const VECTOR2I &aCenter, size_t aRadius)
void Write(std::ostream &ost) 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)
OUTLINE_RECT(const VECTOR2I &aLowerLeft, size_t aWidth, size_t aHeight)
void Write(std::ostream &ost) const override
OUTLINE_SQUARE(const VECTOR2I &aCenter, size_t aHalfSide)
void Write(std::ostream &ost) const override
virtual void Write(std::ostream &ost) const =0
virtual ~PKG_OUTLINE()=default
std::vector< SHAPE_LINE_CHAIN > POLYGON
represents a single polygon outline with holes.