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

#include <odb_component.h>

Inheritance diagram for COMPONENTS_MANAGER:
ATTR_MANAGER

Public Member Functions

 COMPONENTS_MANAGER (PCB_IO_ODBPP *aPlugin)
 
virtual ~COMPONENTS_MANAGER ()
 
ODB_COMPONENT & AddComponent (const FOOTPRINT *aFp, const EDA_DATA::PACKAGE &aPkg)
 
void Write (std::ostream &ost) const
 
template<typename Tr, typename Ta>
void AddSystemAttribute (Tr &r, Ta v)
 
template<typename Tr, typename Ta>
void AddUserDefAttribute (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

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)
 
template<typename T>
std::string AttrValue2String (ODB_ATTR::ListTextAttribute< T > a)
 
template<typename T>
std::string AttrValue2String (ODB_ATTR::IntegerAttribute< T > a)
 

Static Private Member Functions

template<typename Ta>
static bool isEmptyText (const Ta &v)
 An empty TEXT value is the attribute's default and has no legal text table entry.
 

Private Attributes

PCB_IO_ODBPP * m_plugin
 Plugin the export runs under, used for formatting and designator reports.
 
std::list< ODB_COMPONENT > m_compList
 
std::set< wxString > m_usedCompNames
 
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 43 of file odb_component.h.

Constructor & Destructor Documentation

◆ COMPONENTS_MANAGER()

COMPONENTS_MANAGER::COMPONENTS_MANAGER ( PCB_IO_ODBPP * aPlugin)
inlineexplicit

Definition at line 46 of file odb_component.h.

References m_plugin.

◆ ~COMPONENTS_MANAGER()

virtual COMPONENTS_MANAGER::~COMPONENTS_MANAGER ( )
inlinevirtual

Definition at line 48 of file odb_component.h.

References m_compList.

Member Function Documentation

◆ AddComponent()

◆ AddSystemAttribute()

◆ AddUserDefAttribute()

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

◆ AttrValue2String() [1/5]

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

Definition at line 429 of file odb_attribute.h.

◆ AttrValue2String() [2/5]

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

◆ AttrValue2String() [3/5]

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

Definition at line 447 of file odb_attribute.h.

References ODB_ATTR::AttributeBase< T, AttrType >::value.

◆ AttrValue2String() [4/5]

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

◆ AttrValue2String() [5/5]

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

◆ GetAttrNameNumber()

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

Definition at line 45 of file odb_attribute.cpp.

References GetTextIndex(), m_attrNames, and m_attrNameVec.

Referenced by AddSystemAttribute(), and AddUserDefAttribute().

◆ GetAttrTextNumber()

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

Definition at line 51 of file odb_attribute.cpp.

References GetTextIndex(), m_attrTexts, and m_attrTextVec.

Referenced by AttrValue2String().

◆ 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

Definition at line 26 of file odb_attribute.cpp.

References index.

Referenced by AttrValue2String(), GetAttrNameNumber(), and GetAttrTextNumber().

◆ isEmptyText()

template<typename Ta>
static bool ATTR_MANAGER::isEmptyText ( const Ta & v)
inlinestaticprivateinherited

An empty TEXT value is the attribute's default and has no legal text table entry.

Definition at line 409 of file odb_attribute.h.

Referenced by AddSystemAttribute(), and AddUserDefAttribute().

◆ Write()

void COMPONENTS_MANAGER::Write ( std::ostream & ost) const

Definition at line 287 of file odb_component.cpp.

References comp, m_compList, m_plugin, and ATTR_MANAGER::WriteAttributes().

◆ 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 83 of file odb_attribute.cpp.

References m_attrNameVec, and name.

Referenced by WriteAttributes().

◆ WriteAttributesText()

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

Definition at line 92 of file odb_attribute.cpp.

References m_attrTextVec, and name.

Referenced by WriteAttributes().

Member Data Documentation

◆ m_attrNames

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

Definition at line 453 of file odb_attribute.h.

Referenced by GetAttrNameNumber().

◆ m_attrNameVec

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

Definition at line 454 of file odb_attribute.h.

Referenced by GetAttrNameNumber(), and WriteAttributesName().

◆ m_attrTexts

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

Definition at line 456 of file odb_attribute.h.

Referenced by AttrValue2String(), and GetAttrTextNumber().

◆ m_attrTextVec

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

Definition at line 457 of file odb_attribute.h.

Referenced by AttrValue2String(), GetAttrTextNumber(), and WriteAttributesText().

◆ m_compList

std::list<ODB_COMPONENT> COMPONENTS_MANAGER::m_compList
private

Definition at line 57 of file odb_component.h.

Referenced by AddComponent(), Write(), and ~COMPONENTS_MANAGER().

◆ m_plugin

PCB_IO_ODBPP* COMPONENTS_MANAGER::m_plugin
private

Plugin the export runs under, used for formatting and designator reports.

Definition at line 56 of file odb_component.h.

Referenced by AddComponent(), COMPONENTS_MANAGER(), and Write().

◆ m_usedCompNames

std::set<wxString> COMPONENTS_MANAGER::m_usedCompNames
private

Definition at line 58 of file odb_component.h.

Referenced by AddComponent().


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