KiCad PCB EDA Suite
Loading...
Searching...
No Matches
TEMPLATE_FIELDNAME Struct Reference

Hold a name of a symbol's field, field value, and default visibility. More...

#include <template_fieldnames.h>

Public Member Functions

 TEMPLATE_FIELDNAME ()
 
 TEMPLATE_FIELDNAME (const wxString &aName)
 
 TEMPLATE_FIELDNAME (const TEMPLATE_FIELDNAME &ref)
 
void Format (OUTPUTFORMATTER *out, int nestLevel) 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 Public Member Functions

static const wxString GetDefaultFieldName (int aFieldNdx, bool aTranslateForHI=false)
 Return a default symbol field name for field aFieldNdx for all components.
 

Public Attributes

wxString m_Name
 
bool m_Visible
 
bool m_URL
 

Detailed Description

Hold a name of a symbol's field, field value, and default visibility.

Template fieldnames are wanted field names for use in the symbol property editors.

Definition at line 64 of file template_fieldnames.h.

Constructor & Destructor Documentation

◆ TEMPLATE_FIELDNAME() [1/3]

TEMPLATE_FIELDNAME::TEMPLATE_FIELDNAME ( )
inline

Definition at line 66 of file template_fieldnames.h.

◆ TEMPLATE_FIELDNAME() [2/3]

TEMPLATE_FIELDNAME::TEMPLATE_FIELDNAME ( const wxString &  aName)
inline

Definition at line 72 of file template_fieldnames.h.

◆ TEMPLATE_FIELDNAME() [3/3]

TEMPLATE_FIELDNAME::TEMPLATE_FIELDNAME ( const TEMPLATE_FIELDNAME ref)
inline

Definition at line 79 of file template_fieldnames.h.

References m_Name, m_URL, and m_Visible.

Member Function Documentation

◆ Format()

void TEMPLATE_FIELDNAME::Format ( OUTPUTFORMATTER out,
int  nestLevel 
) const

Serialize this object out as text into the given OUTPUTFORMATTER.

Definition at line 81 of file template_fieldnames.cpp.

References m_Name, m_URL, m_Visible, OUTPUTFORMATTER::Print(), and OUTPUTFORMATTER::Quotew().

◆ GetDefaultFieldName()

const wxString TEMPLATE_FIELDNAME::GetDefaultFieldName ( int  aFieldNdx,
bool  aTranslateForHI = false 
)
static

◆ Parse()

void TEMPLATE_FIELDNAME::Parse ( TEMPLATE_FIELDNAMES_LEXER *  aSpec)

Fill this object from information in the input stream aSpec, which is a #TEMPLATE_FIELDNAMES_LEXER.

The entire textual element spec is
(field (name yourfieldname)(value yourvalue) visible)). The presence of value is optional, the presence of visible is optional. When this function is called, the input token stream given by aSpec is assumed to be positioned at the '^' in the following example, i.e. just after the identifying keyword and before the content specifying stuff.
(field ^ (....) ).

Parameters
aSpecis the input token stream of keywords and symbols.

Definition at line 95 of file template_fieldnames.cpp.

References From_UTF8(), m_Name, m_URL, and m_Visible.

Referenced by TEMPLATES::parse().

Member Data Documentation

◆ m_Name

wxString TEMPLATE_FIELDNAME::m_Name

◆ m_URL

bool TEMPLATE_FIELDNAME::m_URL

◆ m_Visible


The documentation for this struct was generated from the following files: