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

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

Public Types

enum class  BOOL_FORMAT { ZERO_ONE , TRUE_FALSE }
 

Public Member Functions

 PIN_INFO_FORMATTER (UNITS_PROVIDER &aUnitsProvider, bool aIncludeUnits, BOOL_FORMAT aBoolFormat, REPORTER &aReporter)
 
wxString Format (const SCH_PIN &aPin, int aFieldId) const
 
void UpdatePin (SCH_PIN &aPin, const wxString &aValue, int aFieldId, const LIB_SYMBOL &aSymbol) const
 Update the pin from the given col/string.
 

Private Member Functions

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

Private Attributes

UNITS_PROVIDERm_unitsProvider
 
bool m_includeUnits
 
BOOL_FORMAT m_boolFormat
 
REPORTERm_reporter
 

Detailed Description

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

Definition at line 114 of file dialog_lib_edit_pin_table.cpp.

Member Enumeration Documentation

◆ BOOL_FORMAT

Enumerator
ZERO_ONE 
TRUE_FALSE 

Definition at line 117 of file dialog_lib_edit_pin_table.cpp.

Constructor & Destructor Documentation

◆ PIN_INFO_FORMATTER()

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

Definition at line 123 of file dialog_lib_edit_pin_table.cpp.

Member Function Documentation

◆ boolFromString()

bool PIN_INFO_FORMATTER::boolFromString ( const wxString &  aValue,
REPORTER aReporter 
) const
inlineprivate

◆ Format()

◆ stringFromBool()

wxString PIN_INFO_FORMATTER::stringFromBool ( bool  aValue) const
inlineprivate

Definition at line 294 of file dialog_lib_edit_pin_table.cpp.

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

Referenced by Format().

◆ UpdatePin()

Member Data Documentation

◆ m_boolFormat

BOOL_FORMAT PIN_INFO_FORMATTER::m_boolFormat
private

Definition at line 334 of file dialog_lib_edit_pin_table.cpp.

Referenced by stringFromBool().

◆ m_includeUnits

bool PIN_INFO_FORMATTER::m_includeUnits
private

Definition at line 333 of file dialog_lib_edit_pin_table.cpp.

Referenced by Format().

◆ m_reporter

REPORTER& PIN_INFO_FORMATTER::m_reporter
private

Definition at line 335 of file dialog_lib_edit_pin_table.cpp.

Referenced by UpdatePin().

◆ m_unitsProvider

UNITS_PROVIDER& PIN_INFO_FORMATTER::m_unitsProvider
private

Definition at line 332 of file dialog_lib_edit_pin_table.cpp.

Referenced by Format(), and UpdatePin().


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