47 comp.m_mirror = wxT(
"M" );
58 if( comp.m_comp_name.IsEmpty() )
61 comp.m_comp_name = wxString::Format(
"UNNAMED%zu",
m_compList.size() );
69 wxString key = field->GetName();
71 comp.m_prp[key] = wxString::Format(
"'%s'", field->GetText() );
93 ost <<
"# CMP " <<
m_index << std::endl;
101 for(
const auto& [key, value] :
m_prp )
103 ost <<
"PRP " << key <<
" " << value << std::endl;
111 ost <<
"#" << std::endl;
void WriteAttributes(std::ostream &ost, const std::string &prefix="") const
void WriteAttributes(std::ostream &ost) const
std::list< ODB_COMPONENT > m_compList
ODB_COMPONENT & AddComponent(const FOOTPRINT *aFp, const EDA_DATA::PACKAGE &aPkg)
void Write(std::ostream &ost) const
const UTF8 & GetLibItemName() const
const wxString GetFullLibraryName() const
const size_t m_index
! CMP index number on board to be used in SNT(TOP), 0~n-1
std::list< TOEPRINT > m_toeprints
std::pair< wxString, wxString > m_center
size_t m_pkg_ref
! package ref number from PKG in eda/data file, 0~n-1
wxString m_part_name
! Part identification is a single string of ASCII characters without spaces
void Write(std::ostream &ost) const
wxString m_comp_name
! Unique reference designator (component name)
std::map< wxString, wxString > m_prp
static std::string m_unitsStr
static constexpr EDA_ANGLE ANGLE_0
static constexpr EDA_ANGLE ANGLE_360
void RemoveWhitespace(wxString &aStr)
std::pair< wxString, wxString > AddXY(const VECTOR2I &aVec)
wxString Double2String(double aVal)
size_t m_subnet_num
! Number of subnet (SNT record TOP) in the referenced net
std::pair< wxString, wxString > m_center
! Board location of the pin.
void Write(std::ostream &ost) const
size_t m_net_num
! Number of NET record in the eda/data file.
wxString m_mirror
! equal to CMP m_mirror.
const size_t m_pin_num
! index of PIN record in the eda/data file, 0~n-1.
wxString m_toeprint_name
! Name of the pad in PIN record
wxString m_rot
! Rotation, clockwise, it equals to the actual PAD rotation, ! not CMP m_rot.
@ REFERENCE_FIELD
Field Reference of part, i.e. "IC21".