23#include <initializer_list>
29class TEMPLATE_FIELDNAMES_LEXER;
56#define MANDATORY_FIELDS { FIELD_T::REFERENCE, \
60 FIELD_T::DESCRIPTION }
62#define GLOBALLABEL_MANDATORY_FIELDS { FIELD_T::INTERSHEET_REFS }
64#define SHEET_MANDATORY_FIELDS { FIELD_T::SHEET_NAME, \
65 FIELD_T::SHEET_FILENAME }
101 std::initializer_list<FIELD_T> aMandatoryFields );
154 void Parse( TEMPLATE_FIELDNAMES_LEXER* aSpec );
195 void AddTemplateFieldNames(
const wxString& aSerializedFieldNames,
SCOPE aScope );
200 void DeleteFieldNameTemplates(
SCOPE aScope );
205 const std::vector<TEMPLATE_FIELDNAME>& GetResolvedTemplateFieldNames();
210 const std::vector<TEMPLATE_FIELDNAME>& GetTemplateFieldNames(
SCOPE aScope );
221 void resolveTemplates();
223 void parse( TEMPLATE_FIELDNAMES_LEXER* in,
SCOPE aScope );
std::vector< TEMPLATE_FIELDNAME > m_resolved
std::vector< TEMPLATE_FIELDNAME > m_project
std::vector< TEMPLATE_FIELDNAME > m_globals
LIB_FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE SCOPE
@ USER
The main config directory (e.g. ~/.config/kicad/)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Hold a name of a symbol's field, field value, and default visibility.
TEMPLATE_FIELDNAME(const wxString &aName)
TEMPLATE_FIELDNAME(const TEMPLATE_FIELDNAME &ref)
FIELD_T
The set of all field indices assuming an array like sequence that a SCH_COMPONENT or LIB_PART can hol...
@ INTERSHEET_REFS
Global label cross-reference page numbers.
@ DESCRIPTION
Field Description of part, i.e. "1/4W 1% Metal Film Resistor".
@ DATASHEET
name of datasheet
@ VALUE
Field Value of part, i.e. "3.3K".
KICOMMON_API wxString GetUserFieldName(int aFieldNdx, TRANSLATION aTranslation)
KICOMMON_API bool FieldNamesAreDuplicates(const wxString &aLhs, const wxString &aRhs, std::initializer_list< FIELD_T > aMandatoryFields)
Test whether two field names should be treated as duplicates for the purposes of field name uniquenes...
KICOMMON_API wxString GetDefaultFieldName(FIELD_T aFieldId, TRANSLATION aTranslation)
Return a default symbol field name for a mandatory field type.