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

Class that handles conversion of various pad data fields into strings for display in the UI or serialisation to formats like CSV. More...

Inheritance diagram for PAD_INFO_FORMATTER:
COLUMN_FORMATTER

Public Types

enum class  BOOL_FORMAT { ZERO_ONE , TRUE_FALSE }
 

Public Member Functions

 PAD_INFO_FORMATTER (UNITS_PROVIDER &aUnitsProvider, bool aIncludeUnits, BOOL_FORMAT aBoolFormat, REPORTER &aReporter)
 
wxString Format (const PAD &aPin, int aFieldId) const
 
void UpdatePad (PAD &aPad, const wxString &aValue, int aFieldId) const
 Update the pad from the given col/string.
 

Protected Member Functions

wxString stringFromBool (bool aValue) const
 
bool boolFromString (const wxString &aValue, REPORTER &aReporter) const
 

Protected Attributes

UNITS_PROVIDERm_unitsProvider
 
bool m_includeUnits
 
BOOL_FORMAT m_boolFormat
 
REPORTERm_reporter
 

Detailed Description

Class that handles conversion of various pad data fields into strings for display in the UI or serialisation to formats like CSV.

This is the footprint editor partner to PIN_INFO_FORMATTER

Definition at line 247 of file dialog_fp_edit_pad_table.cpp.

Member Enumeration Documentation

◆ BOOL_FORMAT

enum class COLUMN_FORMATTER::BOOL_FORMAT
stronginherited
Enumerator
ZERO_ONE 
TRUE_FALSE 

Definition at line 31 of file column_formatter.h.

Constructor & Destructor Documentation

◆ PAD_INFO_FORMATTER()

PAD_INFO_FORMATTER::PAD_INFO_FORMATTER ( UNITS_PROVIDER & aUnitsProvider,
bool aIncludeUnits,
BOOL_FORMAT aBoolFormat,
REPORTER & aReporter )
inline

Member Function Documentation

◆ boolFromString()

bool COLUMN_FORMATTER::boolFromString ( const wxString & aValue,
REPORTER & aReporter ) const
protectedinherited

◆ Format()

◆ stringFromBool()

wxString COLUMN_FORMATTER::stringFromBool ( bool aValue) const
protectedinherited

Definition at line 38 of file column_formatter.cpp.

References BOOL_FALSE, BOOL_TRUE, m_boolFormat, TRUE_FALSE, and ZERO_ONE.

Referenced by PIN_INFO_FORMATTER::Format().

◆ UpdatePad()

Member Data Documentation

◆ m_boolFormat

BOOL_FORMAT COLUMN_FORMATTER::m_boolFormat
protectedinherited

Definition at line 55 of file column_formatter.h.

Referenced by COLUMN_FORMATTER(), and stringFromBool().

◆ m_includeUnits

bool COLUMN_FORMATTER::m_includeUnits
protectedinherited

◆ m_reporter

REPORTER& COLUMN_FORMATTER::m_reporter
protectedinherited

Definition at line 56 of file column_formatter.h.

Referenced by COLUMN_FORMATTER(), and PIN_INFO_FORMATTER::UpdatePin().

◆ m_unitsProvider

UNITS_PROVIDER& COLUMN_FORMATTER::m_unitsProvider
protectedinherited

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