KiCad PCB EDA Suite
|
#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_FIELDNAMES & | GetTemplateFieldNames () |
Return a template field name list for read only access. | |
const TEMPLATE_FIELDNAMES & | GetTemplateFieldNames (bool aGlobal) |
Return a specific list (global or project) for read only access. | |
const TEMPLATE_FIELDNAME * | GetFieldName (const wxString &aName) |
Search for aName in the template field name list. | |
Protected Member Functions | |
void | resolveTemplates () |
Flatten project and global templates into a single list. | |
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 |
Definition at line 135 of file template_fieldnames.h.
|
inline |
Definition at line 138 of file template_fieldnames.h.
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.
aFieldName | is a full description of the wanted field, and it must not match any of the default field names. |
aGlobal | indicates whether to add to the global or project table. |
Definition at line 236 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().
void TEMPLATES::AddTemplateFieldNames | ( | const wxString & | aSerializedFieldNames | ) |
Add a serialized list of template field names.
Definition at line 265 of file template_fieldnames.cpp.
References parse(), and TO_UTF8.
Referenced by SCH_EDIT_FRAME::CommonSettingsChanged(), PANEL_TEMPLATE_FIELDNAMES::PANEL_TEMPLATE_FIELDNAMES(), SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS(), and DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataToWindow().
void TEMPLATES::DeleteAllFieldNameTemplates | ( | bool | aGlobal | ) |
Delete the entire contents.
Definition at line 279 of file template_fieldnames.cpp.
References m_globals, m_project, m_resolved, and m_resolvedDirty.
Referenced by SCH_EDIT_FRAME::CommonSettingsChanged(), SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS(), and PANEL_TEMPLATE_FIELDNAMES::TransferDataFromWindow().
void TEMPLATES::Format | ( | OUTPUTFORMATTER * | out, |
bool | aGlobal | ||
) | const |
Serialize this object out as text into the given OUTPUTFORMATTER.
Definition at line 146 of file template_fieldnames.cpp.
References m_globals, m_project, and OUTPUTFORMATTER::Print().
Referenced by PANEL_TEMPLATE_FIELDNAMES::TransferDataFromWindow().
const TEMPLATE_FIELDNAME * TEMPLATES::GetFieldName | ( | const wxString & | aName | ) |
Search for aName in the template field name list.
aName | A wxString object containing the field name to search for. |
Definition at line 314 of file template_fieldnames.cpp.
References m_resolved, m_resolvedDirty, and resolveTemplates().
Referenced by FIELDS_GRID_TABLE::GetAttr().
const TEMPLATE_FIELDNAMES & TEMPLATES::GetTemplateFieldNames | ( | ) |
Return a template field name list for read only access.
Definition at line 296 of file template_fieldnames.cpp.
References m_resolved, m_resolvedDirty, and resolveTemplates().
Referenced by PANEL_TEMPLATE_FIELDNAMES::ImportSettingsFrom(), EESCHEMA_JOBS_HANDLER::JobExportBom(), DIALOG_SYMBOL_FIELDS_TABLE::LoadFieldNames(), SCH_SYMBOL::ResolveTextVar(), SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS(), DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataToWindow(), and PANEL_TEMPLATE_FIELDNAMES::TransferDataToWindow().
const TEMPLATE_FIELDNAMES & TEMPLATES::GetTemplateFieldNames | ( | bool | aGlobal | ) |
Return a specific list (global or project) for read only access.
Definition at line 305 of file template_fieldnames.cpp.
|
protected |
Definition at line 164 of file template_fieldnames.cpp.
References AddTemplateFieldName(), TEMPLATE_FIELDNAME::m_Name, and TEMPLATE_FIELDNAME::Parse().
Referenced by AddTemplateFieldNames().
|
protected |
Flatten project and global templates into a single list.
(Project templates take precedence.)
Definition at line 208 of file template_fieldnames.cpp.
References m_globals, m_project, m_resolved, m_resolvedDirty, and project.
Referenced by GetFieldName(), and GetTemplateFieldNames().
|
private |
Definition at line 193 of file template_fieldnames.h.
Referenced by AddTemplateFieldName(), DeleteAllFieldNameTemplates(), Format(), GetTemplateFieldNames(), and resolveTemplates().
|
private |
Definition at line 194 of file template_fieldnames.h.
Referenced by AddTemplateFieldName(), DeleteAllFieldNameTemplates(), Format(), GetTemplateFieldNames(), and resolveTemplates().
|
private |
Definition at line 197 of file template_fieldnames.h.
Referenced by DeleteAllFieldNameTemplates(), GetFieldName(), GetTemplateFieldNames(), and resolveTemplates().
|
private |
Definition at line 198 of file template_fieldnames.h.
Referenced by AddTemplateFieldName(), DeleteAllFieldNameTemplates(), GetFieldName(), GetTemplateFieldNames(), and resolveTemplates().