23#include <initializer_list>
29class TEMPLATE_FIELDNAMES_LEXER;
57#define MANDATORY_FIELDS { FIELD_T::REFERENCE, \
61 FIELD_T::DESCRIPTION }
63#define GLOBALLABEL_MANDATORY_FIELDS { FIELD_T::INTERSHEET_REFS }
65#define SHEET_MANDATORY_FIELDS { FIELD_T::SHEET_NAME, \
66 FIELD_T::SHEET_FILENAME }
103 std::initializer_list<FIELD_T> aMandatoryFields );
156 void Parse( TEMPLATE_FIELDNAMES_LEXER* aSpec );
197 void AddTemplateFieldNames(
const wxString& aSerializedFieldNames,
SCOPE aScope );
202 void DeleteFieldNameTemplates(
SCOPE aScope );
207 const std::vector<TEMPLATE_FIELDNAME>& GetResolvedTemplateFieldNames();
212 const std::vector<TEMPLATE_FIELDNAME>& GetTemplateFieldNames(
SCOPE aScope );
223 void resolveTemplates();
225 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.
A schematic sheet path's composed reference suffix and its position in page order.
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.