29#include <template_fieldnames_lexer.h> 
   32using namespace TFIELD_T;
 
   35#define REFERENCE_CANONICAL "Reference" 
   36#define VALUE_CANONICAL "Value" 
   37#define FOOTPRINT_CANONICAL "Footprint" 
   38#define DATASHEET_CANONICAL "Datasheet" 
   39#define DESCRIPTION_CANONICAL "Description" 
   40#define SHEET_NAME_CANONICAL "Sheetname" 
   41#define SHEET_FILE_CANONICAL "Sheetfile" 
   42#define INTERSHEET_REFS_CANONICAL "Intersheetrefs" 
   43#define USER_FIELD_CANONICAL "Field%d" 
   57    if( !aTranslateForHI )
 
 
   92    if( !aTranslateForHI )
 
 
  104        out->
Print( 
" visible" );
 
  107        out->
Print( 
" url" );
 
 
  119    if( ( tok = in->NextTok() ) != T_name )
 
  120        in->Expecting( T_name );
 
  122    in->NeedSYMBOLorNUMBER();
 
  128    while( (tok = in->NextTok() ) != T_RIGHT && tok != T_EOF )
 
  138            in->NeedSYMBOLorNUMBER();
 
  151            in->Expecting( 
"value|url|visible" );
 
 
  162    out->
Print( 
"(templatefields" );
 
  168        if( !temp.m_Name.IsEmpty() )
 
 
  180    while( ( tok = in->NextTok() ) != T_RIGHT && tok != T_EOF )
 
  187        case T_templatefields:  
 
  203                if( !field.
m_Name.IsEmpty() )
 
  209            in->Unexpected( in->CurText() );
 
 
  229        bool overriddenInProject = 
false;
 
  233            if( global.m_Name == 
project.m_Name )
 
  235                overriddenInProject = 
true;
 
  240        if( !overriddenInProject )
 
 
  262        if( temp.m_Name == aFieldName.
m_Name )
 
  272    target.push_back( aFieldName );
 
 
  279    TEMPLATE_FIELDNAMES_LEXER field_lexer( 
TO_UTF8( aSerializedFieldNames ) );
 
  283        parse( &field_lexer, 
true );
 
 
  333        if( field.m_Name == aName )
 
 
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
 
void AddTemplateFieldName(const TEMPLATE_FIELDNAME &aFieldName, bool aGlobal)
Insert or append a wanted symbol field name into the field names template.
 
void AddTemplateFieldNames(const wxString &aSerializedFieldNames)
Add a serialized list of template field names.
 
const std::vector< TEMPLATE_FIELDNAME > & GetTemplateFieldNames()
Return a template field name list for read only access.
 
std::vector< TEMPLATE_FIELDNAME > m_resolved
 
void resolveTemplates()
Flatten project and global templates into a single list.
 
std::vector< TEMPLATE_FIELDNAME > m_project
 
const TEMPLATE_FIELDNAME * GetFieldName(const wxString &aName)
Search for aName in the template field name list.
 
void DeleteAllFieldNameTemplates(bool aGlobal)
Delete the entire contents.
 
void parse(TEMPLATE_FIELDNAMES_LEXER *in, bool aGlobal)
 
std::vector< TEMPLATE_FIELDNAME > m_globals
 
void Format(OUTPUTFORMATTER *out, bool aGlobal) const
Serialize this object out as text into the given OUTPUTFORMATTER.
 
wxString From_UTF8(const char *cstring)
 
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
 
Hold a name of a symbol's field, field value, and default visibility.
 
void Format(OUTPUTFORMATTER *out) const
Serialize this object out as text into the given OUTPUTFORMATTER.
 
void Parse(TEMPLATE_FIELDNAMES_LEXER *aSpec)
Fill this object from information in the input stream aSpec, which is a #TEMPLATE_FIELDNAMES_LEXER.
 
static wxString s_CanonicalSheetFile(SHEET_FILE_CANONICAL)
 
#define FOOTPRINT_CANONICAL
 
#define USER_FIELD_CANONICAL
 
#define INTERSHEET_REFS_CANONICAL
 
static wxString s_CanonicalReference(REFERENCE_CANONICAL)
 
static wxString s_CanonicalValue(VALUE_CANONICAL)
 
static wxString s_CanonicalFootprint(FOOTPRINT_CANONICAL)
 
static wxString s_CanonicalDatasheet(DATASHEET_CANONICAL)
 
#define DATASHEET_CANONICAL
 
wxString GetUserFieldName(int aFieldNdx, bool aTranslateForHI)
 
static wxString s_CanonicalIntersheetRefs(INTERSHEET_REFS_CANONICAL)
 
#define SHEET_NAME_CANONICAL
 
static wxString s_CanonicalSheetName(SHEET_NAME_CANONICAL)
 
#define DESCRIPTION_CANONICAL
 
static wxString s_CanonicalDescription(DESCRIPTION_CANONICAL)
 
#define REFERENCE_CANONICAL
 
#define SHEET_FILE_CANONICAL
 
wxString GetDefaultFieldName(FIELD_T aFieldId, bool aTranslateForHI)
Return a default symbol field name for a mandatory field type.
 
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".
 
@ FOOTPRINT
Field Name Module PCB, i.e. "16DIP300".
 
@ DATASHEET
name of datasheet
 
@ REFERENCE
Field Reference of part, i.e. "IC21".
 
@ VALUE
Field Value of part, i.e. "3.3K".
 
wxString GetCanonicalFieldName(FIELD_T aFieldType)