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

Variant information for a footprint. More...

#include <footprint.h>

Public Member Functions

 FOOTPRINT_VARIANT (const wxString &aName=wxEmptyString)
 
wxString GetName () const
 
void SetName (const wxString &aName)
 
bool GetDNP () const
 
void SetDNP (bool aDNP)
 
bool GetExcludedFromBOM () const
 
void SetExcludedFromBOM (bool aExclude)
 
bool GetExcludedFromPosFiles () const
 
void SetExcludedFromPosFiles (bool aExclude)
 
wxString GetFieldValue (const wxString &aFieldName) const
 Get a field value override for this variant.
 
void SetFieldValue (const wxString &aFieldName, const wxString &aValue)
 Set a field value override for this variant.
 
bool HasFieldValue (const wxString &aFieldName) const
 
const std::map< wxString, wxString > & GetFields () const
 
bool operator== (const FOOTPRINT_VARIANT &aOther) const
 

Private Attributes

wxString m_name
 
bool m_dnp
 
bool m_excludedFromBOM
 
bool m_excludedFromPosFiles
 
std::map< wxString, wxString > m_fields
 Field value overrides for this variant.
 

Detailed Description

Variant information for a footprint.

Footprint variants store per-variant overrides for DNP, exclusion flags, and field values. These are synchronized with SCH_SYMBOL_VARIANT during Update PCB from Schematic operations.

Definition at line 143 of file footprint.h.

Constructor & Destructor Documentation

◆ FOOTPRINT_VARIANT()

FOOTPRINT_VARIANT::FOOTPRINT_VARIANT ( const wxString & aName = wxEmptyString)
inline

Definition at line 146 of file footprint.h.

References m_dnp, m_excludedFromBOM, m_excludedFromPosFiles, and m_name.

Referenced by operator==().

Member Function Documentation

◆ GetDNP()

◆ GetExcludedFromBOM()

◆ GetExcludedFromPosFiles()

◆ GetFields()

const std::map< wxString, wxString > & FOOTPRINT_VARIANT::GetFields ( ) const
inline

Definition at line 196 of file footprint.h.

References m_fields.

Referenced by BOOST_AUTO_TEST_CASE().

◆ GetFieldValue()

wxString FOOTPRINT_VARIANT::GetFieldValue ( const wxString & aFieldName) const
inline

Get a field value override for this variant.

Parameters
aFieldNameThe name of the field.
Returns
The field value, or empty string if not overridden or overridden to empty.

Definition at line 171 of file footprint.h.

References m_fields.

Referenced by BOARD_NETLIST_UPDATER::applyComponentVariants(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and FOOTPRINT::GetFieldValueForVariant().

◆ GetName()

wxString FOOTPRINT_VARIANT::GetName ( ) const
inline

Definition at line 154 of file footprint.h.

References m_name.

Referenced by BOOST_AUTO_TEST_CASE(), and FOOTPRINT::SetVariant().

◆ HasFieldValue()

bool FOOTPRINT_VARIANT::HasFieldValue ( const wxString & aFieldName) const
inline

◆ operator==()

bool FOOTPRINT_VARIANT::operator== ( const FOOTPRINT_VARIANT & aOther) const
inline

◆ SetDNP()

◆ SetExcludedFromBOM()

◆ SetExcludedFromPosFiles()

◆ SetFieldValue()

void FOOTPRINT_VARIANT::SetFieldValue ( const wxString & aFieldName,
const wxString & aValue )
inline

Set a field value override for this variant.

Parameters
aFieldNameThe name of the field.
aValueThe value to set.

Definition at line 186 of file footprint.h.

References m_fields.

Referenced by BOARD_NETLIST_UPDATER::applyComponentVariants(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PCB_IO_KICAD_SEXPR_PARSER::parseFootprintVariant(), and PCB_FOOTPRINT_FIELD_PROPERTY::setter().

◆ SetName()

void FOOTPRINT_VARIANT::SetName ( const wxString & aName)
inline

Definition at line 155 of file footprint.h.

References m_name.

Referenced by FOOTPRINT::RenameVariant(), and FOOTPRINT::SetVariant().

Member Data Documentation

◆ m_dnp

bool FOOTPRINT_VARIANT::m_dnp
private

Definition at line 209 of file footprint.h.

Referenced by FOOTPRINT_VARIANT(), GetDNP(), operator==(), and SetDNP().

◆ m_excludedFromBOM

bool FOOTPRINT_VARIANT::m_excludedFromBOM
private

Definition at line 210 of file footprint.h.

Referenced by FOOTPRINT_VARIANT(), GetExcludedFromBOM(), operator==(), and SetExcludedFromBOM().

◆ m_excludedFromPosFiles

bool FOOTPRINT_VARIANT::m_excludedFromPosFiles
private

◆ m_fields

std::map<wxString, wxString> FOOTPRINT_VARIANT::m_fields
private

Field value overrides for this variant.

Definition at line 212 of file footprint.h.

Referenced by GetFields(), GetFieldValue(), HasFieldValue(), operator==(), and SetFieldValue().

◆ m_name

wxString FOOTPRINT_VARIANT::m_name
private

Definition at line 208 of file footprint.h.

Referenced by FOOTPRINT_VARIANT(), GetName(), operator==(), and SetName().


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