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

#include <template_fieldnames.h>

Public Member Functions

 TEMPLATES ()
 
void Format (OUTPUTFORMATTER *out, bool aGlobal) const
 Serialize this object out as text into the given OUTPUTFORMATTER.
 
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.
 
void DeleteAllFieldNameTemplates (bool aGlobal)
 Delete the entire contents.
 
const TEMPLATE_FIELDNAMESGetTemplateFieldNames ()
 Return a template field name list for read only access.
 
const TEMPLATE_FIELDNAMESGetTemplateFieldNames (bool aGlobal)
 Return a specific list (global or project) for read only access.
 
const TEMPLATE_FIELDNAMEGetFieldName (const wxString &aName)
 Search for aName in the template field name list.
 

Protected Member Functions

void resolveTemplates ()
 
void parse (TEMPLATE_FIELDNAMES_LEXER *in, bool aGlobal)
 

Private Attributes

TEMPLATE_FIELDNAMES m_globals
 
TEMPLATE_FIELDNAMES m_project
 
TEMPLATE_FIELDNAMES m_resolved
 
bool m_resolvedDirty
 

Detailed Description

Definition at line 132 of file template_fieldnames.h.

Constructor & Destructor Documentation

◆ TEMPLATES()

TEMPLATES::TEMPLATES ( )
inline

Definition at line 135 of file template_fieldnames.h.

Member Function Documentation

◆ AddTemplateFieldName()

void TEMPLATES::AddTemplateFieldName ( const TEMPLATE_FIELDNAME aFieldName,
bool  aGlobal 
)

Insert or append a wanted symbol field name into the field names template.

Should be used for any symbol property editor. If the name already exists, it overwrites the same name.

Parameters
aFieldNameis a full description of the wanted field, and it must not match any of the default field names.
aGlobalindicates whether to add to the global or project table.

Definition at line 231 of file template_fieldnames.cpp.

References GetCanonicalFieldName(), m_globals, TEMPLATE_FIELDNAME::m_Name, m_project, m_resolvedDirty, and MANDATORY_FIELDS.

Referenced by parse(), SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS(), and PANEL_TEMPLATE_FIELDNAMES::TransferDataFromWindow().

◆ AddTemplateFieldNames()

void TEMPLATES::AddTemplateFieldNames ( const wxString &  aSerializedFieldNames)

◆ DeleteAllFieldNameTemplates()

void TEMPLATES::DeleteAllFieldNameTemplates ( bool  aGlobal)

◆ Format()

void TEMPLATES::Format ( OUTPUTFORMATTER out,
bool  aGlobal 
) const

Serialize this object out as text into the given OUTPUTFORMATTER.

Definition at line 141 of file template_fieldnames.cpp.

References m_globals, m_project, and OUTPUTFORMATTER::Print().

Referenced by PANEL_TEMPLATE_FIELDNAMES::TransferDataFromWindow().

◆ GetFieldName()

const TEMPLATE_FIELDNAME * TEMPLATES::GetFieldName ( const wxString &  aName)

Search for aName in the template field name list.

Parameters
aNameA wxString object containing the field name to search for.
Returns
the template field name if found; NULL otherwise.

Definition at line 309 of file template_fieldnames.cpp.

References m_resolved, m_resolvedDirty, and resolveTemplates().

Referenced by FIELDS_GRID_TABLE::GetAttr().

◆ GetTemplateFieldNames() [1/2]

◆ GetTemplateFieldNames() [2/2]

const TEMPLATE_FIELDNAMES & TEMPLATES::GetTemplateFieldNames ( bool  aGlobal)

Return a specific list (global or project) for read only access.

Definition at line 300 of file template_fieldnames.cpp.

References m_globals, and m_project.

◆ parse()

void TEMPLATES::parse ( TEMPLATE_FIELDNAMES_LEXER *  in,
bool  aGlobal 
)
protected

◆ resolveTemplates()

void TEMPLATES::resolveTemplates ( )
protected

Definition at line 203 of file template_fieldnames.cpp.

References m_globals, m_project, m_resolved, m_resolvedDirty, and project.

Referenced by GetFieldName(), and GetTemplateFieldNames().

Member Data Documentation

◆ m_globals

◆ m_project

◆ m_resolved

TEMPLATE_FIELDNAMES TEMPLATES::m_resolved
private

◆ m_resolvedDirty

bool TEMPLATES::m_resolvedDirty
private

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