KiCad PCB EDA Suite
Loading...
Searching...
No Matches
FEATURES_MANAGER Class Reference

#include <odb_feature.h>

Inheritance diagram for FEATURES_MANAGER:
ATTR_MANAGER

Public Member Functions

 FEATURES_MANAGER (BOARD *aBoard, PCB_IO_ODBPP *aPlugin, const wxString &aLayerName)
 
virtual ~FEATURES_MANAGER ()
 
void InitFeatureList (PCB_LAYER_ID aLayer, std::vector< BOARD_ITEM * > &aItems)
 
void AddFeatureLine (const VECTOR2I &aStart, const VECTOR2I &aEnd, uint64_t aWidth)
 
void AddFeatureArc (const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCenter, uint64_t aWidth, ODB_DIRECTION aDirection)
 
void AddPadCircle (const VECTOR2I &aCenter, uint64_t aDiameter, const EDA_ANGLE &aAngle, bool aMirror, double aResize=1.0)
 
void AddPadShape (const PAD &aPad, PCB_LAYER_ID aLayer)
 
void AddFeatureSurface (const SHAPE_POLY_SET::POLYGON &aPolygon, FILL_T aFillType=FILL_T::FILLED_SHAPE)
 
void AddShape (const PCB_SHAPE &aShape, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
 
void AddVia (const PCB_VIA *aVia, PCB_LAYER_ID aLayer)
 
void AddViaDrillHole (const PCB_VIA *aVia, PCB_LAYER_ID aLayer)
 
bool AddContour (const SHAPE_POLY_SET &aPolySet, int aOutline=0, FILL_T aFillType=FILL_T::FILLED_SHAPE)
 
bool AddPolygon (const SHAPE_POLY_SET::POLYGON &aPolygon, FILL_T aFillType, int aWidth, LINE_STYLE aDashType)
 
bool AddPolygonCutouts (const SHAPE_POLY_SET::POLYGON &aPolygon)
 
void GenerateFeatureFile (std::ostream &ost) const
 
void GenerateProfileFeatures (std::ostream &ost) const
 
template<typename Tr , typename Ta >
void AddFeatureAttribute (Tr &r, Ta v)
 

Protected Member Functions

size_t GetAttrNameNumber (const wxString &name)
 
void WriteAttributes (std::ostream &ost, const std::string &prefix="") const
 
void WriteAttributesName (std::ostream &ost, const std::string &prefix="") const
 
void WriteAttributesText (std::ostream &ost, const std::string &prefix="") const
 

Private Member Functions

uint32_t AddCircleSymbol (const wxString &aDiameter)
 
uint32_t AddRoundDonutSymbol (const wxString &aOuterDim, const wxString &aInnerDim)
 
uint32_t AddRectSymbol (const wxString &aWidth, const wxString &aHeight)
 
uint32_t AddOvalSymbol (const wxString &aWidth, const wxString &aHeight)
 
uint32_t AddRoundRectSymbol (const wxString &aWidth, const wxString &aHeight, const wxString &aRadius)
 
uint32_t AddRoundRectDonutSymbol (const wxString &aOuterWidth, const wxString &aOuterHeight, const wxString &aLineWidth, const wxString &aRadius)
 
uint32_t AddChamferRectSymbol (const wxString &aWidth, const wxString &aHeight, const wxString &aRadius, int aPositions)
 
uint32_t GetSymbolIndex (std::map< wxString, uint32_t > &aSymMap, const wxString &aKey)
 
template<typename T , typename... Args>
void AddFeature (Args &&... args)
 
PCB_IO_ODBPPGetODBPlugin ()
 
size_t GetAttrTextNumber (const wxString &aName)
 
size_t GetTextIndex (std::unordered_map< std::string, size_t > &aMap, std::vector< std::pair< size_t, std::string > > &aVec, const std::string &aText)
 
template<typename T , unsigned int n>
std::string AttrValue2String (ODB_ATTR::FloatAttribute< T, n > a)
 
template<typename T >
std::string AttrValue2String (ODB_ATTR::BooleanAttribute< T > a)
 
template<typename T >
std::string AttrValue2String (ODB_ATTR::TextAttribute< T > a)
 

Private Attributes

std::map< wxString, uint32_t > m_circleSymMap
 
std::map< wxString, uint32_t > m_roundDonutSymMap
 
std::map< wxString, uint32_t > m_padSymMap
 
std::map< wxString, uint32_t > m_rectSymMap
 
std::map< wxString, uint32_t > m_ovalSymMap
 
std::map< wxString, uint32_t > m_roundRectSymMap
 
std::map< wxString, uint32_t > m_roundRectDonutSymMap
 
std::map< wxString, uint32_t > m_chamRectSymMap
 
std::map< uint32_t, wxString > m_allSymMap
 
BOARDm_board
 
PCB_IO_ODBPPm_plugin
 
wxString m_layerName
 
uint32_t m_symIndex = 0
 
std::list< std::unique_ptr< ODB_FEATURE > > m_featuresList
 
std::map< BOARD_ITEM *, std::vector< uint32_t > > m_featureIDMap
 
std::unordered_map< std::string, size_t > m_attrNames
 
std::vector< std::pair< size_t, std::string > > m_attrNameVec
 
std::unordered_map< std::string, size_t > m_attrTexts
 
std::vector< std::pair< size_t, std::string > > m_attrTextVec
 

Detailed Description

Definition at line 49 of file odb_feature.h.

Constructor & Destructor Documentation

◆ FEATURES_MANAGER()

FEATURES_MANAGER::FEATURES_MANAGER ( BOARD aBoard,
PCB_IO_ODBPP aPlugin,
const wxString &  aLayerName 
)
inline

Definition at line 52 of file odb_feature.h.

◆ ~FEATURES_MANAGER()

virtual FEATURES_MANAGER::~FEATURES_MANAGER ( )
inlinevirtual

Definition at line 57 of file odb_feature.h.

References m_featuresList.

Member Function Documentation

◆ AddChamferRectSymbol()

uint32_t FEATURES_MANAGER::AddChamferRectSymbol ( const wxString &  aWidth,
const wxString &  aHeight,
const wxString &  aRadius,
int  aPositions 
)
inlineprivate

◆ AddCircleSymbol()

uint32_t FEATURES_MANAGER::AddCircleSymbol ( const wxString &  aDiameter)
inlineprivate

Definition at line 93 of file odb_feature.h.

References GetSymbolIndex(), and m_circleSymMap.

Referenced by AddFeatureArc(), AddFeatureLine(), AddPadCircle(), AddPadShape(), and AddShape().

◆ AddContour()

bool FEATURES_MANAGER::AddContour ( const SHAPE_POLY_SET aPolySet,
int  aOutline = 0,
FILL_T  aFillType = FILL_T::FILLED_SHAPE 
)

◆ AddFeature()

template<typename T , typename... Args>
void FEATURES_MANAGER::AddFeature ( Args &&...  args)
inlineprivate

Definition at line 181 of file odb_feature.h.

References m_featuresList.

◆ AddFeatureArc()

void FEATURES_MANAGER::AddFeatureArc ( const VECTOR2I aStart,
const VECTOR2I aEnd,
const VECTOR2I aCenter,
uint64_t  aWidth,
ODB_DIRECTION  aDirection 
)

Definition at line 46 of file odb_feature.cpp.

References AddCircleSymbol(), ODB::AddXY(), and ODB::SymDouble2String().

Referenced by AddShape().

◆ AddFeatureAttribute()

template<typename Tr , typename Ta >
void ATTR_MANAGER::AddFeatureAttribute ( Tr &  r,
Ta  v 
)
inlineinherited

◆ AddFeatureLine()

void FEATURES_MANAGER::AddFeatureLine ( const VECTOR2I aStart,
const VECTOR2I aEnd,
uint64_t  aWidth 
)

Definition at line 38 of file odb_feature.cpp.

References AddCircleSymbol(), ODB::AddXY(), and ODB::SymDouble2String().

Referenced by AddShape().

◆ AddFeatureSurface()

void FEATURES_MANAGER::AddFeatureSurface ( const SHAPE_POLY_SET::POLYGON aPolygon,
FILL_T  aFillType = FILL_T::FILLED_SHAPE 
)

Definition at line 235 of file odb_feature.cpp.

Referenced by AddContour().

◆ AddOvalSymbol()

uint32_t FEATURES_MANAGER::AddOvalSymbol ( const wxString &  aWidth,
const wxString &  aHeight 
)
inlineprivate

Definition at line 110 of file odb_feature.h.

References GetSymbolIndex(), m_ovalSymMap, and ODB_DIM_X.

Referenced by AddPadShape().

◆ AddPadCircle()

void FEATURES_MANAGER::AddPadCircle ( const VECTOR2I aCenter,
uint64_t  aDiameter,
const EDA_ANGLE aAngle,
bool  aMirror,
double  aResize = 1.0 
)

Definition at line 55 of file odb_feature.cpp.

References AddCircleSymbol(), ODB::AddXY(), and ODB::SymDouble2String().

◆ AddPadShape()

◆ AddPolygon()

bool FEATURES_MANAGER::AddPolygon ( const SHAPE_POLY_SET::POLYGON aPolygon,
FILL_T  aFillType,
int  aWidth,
LINE_STYLE  aDashType 
)

◆ AddPolygonCutouts()

bool FEATURES_MANAGER::AddPolygonCutouts ( const SHAPE_POLY_SET::POLYGON aPolygon)

◆ AddRectSymbol()

uint32_t FEATURES_MANAGER::AddRectSymbol ( const wxString &  aWidth,
const wxString &  aHeight 
)
inlineprivate

Definition at line 104 of file odb_feature.h.

References GetSymbolIndex(), m_rectSymMap, and ODB_DIM_X.

Referenced by AddPadShape().

◆ AddRoundDonutSymbol()

uint32_t FEATURES_MANAGER::AddRoundDonutSymbol ( const wxString &  aOuterDim,
const wxString &  aInnerDim 
)
inlineprivate

Definition at line 98 of file odb_feature.h.

References GetSymbolIndex(), m_roundDonutSymMap, and ODB_DIM_X.

Referenced by AddShape().

◆ AddRoundRectDonutSymbol()

uint32_t FEATURES_MANAGER::AddRoundRectDonutSymbol ( const wxString &  aOuterWidth,
const wxString &  aOuterHeight,
const wxString &  aLineWidth,
const wxString &  aRadius 
)
inlineprivate

Definition at line 123 of file odb_feature.h.

References GetSymbolIndex(), m_roundRectDonutSymMap, ODB_DIM_R, and ODB_DIM_X.

Referenced by AddShape().

◆ AddRoundRectSymbol()

uint32_t FEATURES_MANAGER::AddRoundRectSymbol ( const wxString &  aWidth,
const wxString &  aHeight,
const wxString &  aRadius 
)
inlineprivate

Definition at line 116 of file odb_feature.h.

References GetSymbolIndex(), m_roundRectSymMap, ODB_DIM_R, and ODB_DIM_X.

Referenced by AddPadShape(), and AddShape().

◆ AddShape()

◆ AddVia()

void FEATURES_MANAGER::AddVia ( const PCB_VIA aVia,
PCB_LAYER_ID  aLayer 
)

◆ AddViaDrillHole()

void FEATURES_MANAGER::AddViaDrillHole ( const PCB_VIA aVia,
PCB_LAYER_ID  aLayer 
)

◆ AttrValue2String() [1/3]

template<typename T >
std::string ATTR_MANAGER::AttrValue2String ( ODB_ATTR::BooleanAttribute< T >  a)
inlineprivateinherited

Definition at line 320 of file odb_attribute.h.

◆ AttrValue2String() [2/3]

template<typename T , unsigned int n>
std::string ATTR_MANAGER::AttrValue2String ( ODB_ATTR::FloatAttribute< T, n >  a)
inlineprivateinherited

◆ AttrValue2String() [3/3]

template<typename T >
std::string ATTR_MANAGER::AttrValue2String ( ODB_ATTR::TextAttribute< T >  a)
inlineprivateinherited

◆ GenerateFeatureFile()

void FEATURES_MANAGER::GenerateFeatureFile ( std::ostream &  ost) const

◆ GenerateProfileFeatures()

void FEATURES_MANAGER::GenerateProfileFeatures ( std::ostream &  ost) const

Definition at line 816 of file odb_feature.cpp.

References m_featuresList, and PCB_IO_ODBPP::m_unitsStr.

◆ GetAttrNameNumber()

size_t ATTR_MANAGER::GetAttrNameNumber ( const wxString &  name)
protectedinherited

◆ GetAttrTextNumber()

size_t ATTR_MANAGER::GetAttrTextNumber ( const wxString &  aName)
privateinherited

◆ GetODBPlugin()

PCB_IO_ODBPP * FEATURES_MANAGER::GetODBPlugin ( )
inlineprivate

Definition at line 188 of file odb_feature.h.

References m_plugin.

Referenced by InitFeatureList().

◆ GetSymbolIndex()

uint32_t FEATURES_MANAGER::GetSymbolIndex ( std::map< wxString, uint32_t > &  aSymMap,
const wxString &  aKey 
)
inlineprivate

◆ GetTextIndex()

size_t ATTR_MANAGER::GetTextIndex ( std::unordered_map< std::string, size_t > &  aMap,
std::vector< std::pair< size_t, std::string > > &  aVec,
const std::string &  aText 
)
privateinherited

◆ InitFeatureList()

◆ WriteAttributes()

void ATTR_MANAGER::WriteAttributes ( std::ostream &  ost,
const std::string &  prefix = "" 
) const
protectedinherited

◆ WriteAttributesName()

void ATTR_MANAGER::WriteAttributesName ( std::ostream &  ost,
const std::string &  prefix = "" 
) const
protectedinherited

Definition at line 76 of file odb_attribute.cpp.

References ATTR_MANAGER::m_attrNameVec, and name.

Referenced by ATTR_MANAGER::WriteAttributes().

◆ WriteAttributesText()

void ATTR_MANAGER::WriteAttributesText ( std::ostream &  ost,
const std::string &  prefix = "" 
) const
protectedinherited

Definition at line 85 of file odb_attribute.cpp.

References ATTR_MANAGER::m_attrTextVec, and name.

Referenced by ATTR_MANAGER::WriteAttributes().

Member Data Documentation

◆ m_allSymMap

std::map<uint32_t, wxString> FEATURES_MANAGER::m_allSymMap
private

Definition at line 178 of file odb_feature.h.

Referenced by GenerateFeatureFile(), and GetSymbolIndex().

◆ m_attrNames

std::unordered_map<std::string, size_t> ATTR_MANAGER::m_attrNames
privateinherited

Definition at line 332 of file odb_attribute.h.

Referenced by ATTR_MANAGER::GetAttrNameNumber().

◆ m_attrNameVec

std::vector<std::pair<size_t, std::string> > ATTR_MANAGER::m_attrNameVec
privateinherited

◆ m_attrTexts

std::unordered_map<std::string, size_t> ATTR_MANAGER::m_attrTexts
privateinherited

Definition at line 335 of file odb_attribute.h.

Referenced by ATTR_MANAGER::GetAttrTextNumber().

◆ m_attrTextVec

std::vector<std::pair<size_t, std::string> > ATTR_MANAGER::m_attrTextVec
privateinherited

◆ m_board

BOARD* FEATURES_MANAGER::m_board
private

Definition at line 190 of file odb_feature.h.

Referenced by AddPadShape(), AddShape(), and InitFeatureList().

◆ m_chamRectSymMap

std::map<wxString, uint32_t> FEATURES_MANAGER::m_chamRectSymMap
private

Definition at line 176 of file odb_feature.h.

Referenced by AddChamferRectSymbol().

◆ m_circleSymMap

std::map<wxString, uint32_t> FEATURES_MANAGER::m_circleSymMap
private

Definition at line 169 of file odb_feature.h.

Referenced by AddCircleSymbol().

◆ m_featureIDMap

std::map<BOARD_ITEM*, std::vector<uint32_t> > FEATURES_MANAGER::m_featureIDMap
private

Definition at line 196 of file odb_feature.h.

◆ m_featuresList

std::list<std::unique_ptr<ODB_FEATURE> > FEATURES_MANAGER::m_featuresList
private

◆ m_layerName

wxString FEATURES_MANAGER::m_layerName
private

Definition at line 192 of file odb_feature.h.

Referenced by InitFeatureList().

◆ m_ovalSymMap

std::map<wxString, uint32_t> FEATURES_MANAGER::m_ovalSymMap
private

Definition at line 173 of file odb_feature.h.

Referenced by AddOvalSymbol().

◆ m_padSymMap

std::map<wxString, uint32_t> FEATURES_MANAGER::m_padSymMap
private

Definition at line 171 of file odb_feature.h.

◆ m_plugin

PCB_IO_ODBPP* FEATURES_MANAGER::m_plugin
private

Definition at line 191 of file odb_feature.h.

Referenced by GetODBPlugin().

◆ m_rectSymMap

std::map<wxString, uint32_t> FEATURES_MANAGER::m_rectSymMap
private

Definition at line 172 of file odb_feature.h.

Referenced by AddRectSymbol().

◆ m_roundDonutSymMap

std::map<wxString, uint32_t> FEATURES_MANAGER::m_roundDonutSymMap
private

Definition at line 170 of file odb_feature.h.

Referenced by AddRoundDonutSymbol().

◆ m_roundRectDonutSymMap

std::map<wxString, uint32_t> FEATURES_MANAGER::m_roundRectDonutSymMap
private

Definition at line 175 of file odb_feature.h.

Referenced by AddRoundRectDonutSymbol().

◆ m_roundRectSymMap

std::map<wxString, uint32_t> FEATURES_MANAGER::m_roundRectSymMap
private

Definition at line 174 of file odb_feature.h.

Referenced by AddRoundRectSymbol().

◆ m_symIndex

uint32_t FEATURES_MANAGER::m_symIndex = 0
private

Definition at line 193 of file odb_feature.h.

Referenced by GetSymbolIndex().


The documentation for this class was generated from the following files: