|
KiCad PCB EDA Suite
|
#include <template_fieldnames.h>
Public Types | |
| enum class | SCOPE { PROJECT , GLOBAL } |
Public Member Functions | |
| TEMPLATES () | |
| void | Format (OUTPUTFORMATTER *out, SCOPE aScope) const |
| Serialize this object out as text into the given OUTPUTFORMATTER. | |
| void | AddTemplateFieldName (const TEMPLATE_FIELDNAME &aFieldName, SCOPE aScope) |
| Insert or append a wanted symbol field name into the field names template. | |
| void | AddTemplateFieldNames (const wxString &aSerializedFieldNames, SCOPE aScope) |
| Add a serialized list of template field names. | |
| void | DeleteFieldNameTemplates (SCOPE aScope) |
| Delete the contents of a scope. | |
| const std::vector< TEMPLATE_FIELDNAME > & | GetResolvedTemplateFieldNames () |
| Return the resolved project and global template field name list for read only access. | |
| const std::vector< TEMPLATE_FIELDNAME > & | GetTemplateFieldNames (SCOPE aScope) |
| 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, SCOPE aScope) |
Private Attributes | |
| std::vector< TEMPLATE_FIELDNAME > | m_globals |
| std::vector< TEMPLATE_FIELDNAME > | m_project |
| std::vector< TEMPLATE_FIELDNAME > | m_resolved |
| bool | m_resolvedDirty |
Definition at line 162 of file template_fieldnames.h.
|
strong |
| Enumerator | |
|---|---|
| PROJECT | |
| GLOBAL | |
Definition at line 165 of file template_fieldnames.h.
|
inline |
Definition at line 171 of file template_fieldnames.h.
References m_resolvedDirty.
| void TEMPLATES::AddTemplateFieldName | ( | const TEMPLATE_FIELDNAME & | aFieldName, |
| SCOPE | aScope ) |
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. |
| aScope | indicates whether to add to the global or project table. |
Definition at line 273 of file template_fieldnames.cpp.
References GetDefaultFieldName(), m_globals, TEMPLATE_FIELDNAME::m_Name, m_project, m_resolvedDirty, MANDATORY_FIELDS, and UNTRANSLATED.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), parse(), and SETTINGS_MANAGER::SyncGlobalFieldNameTemplatesToProjects().
| void TEMPLATES::AddTemplateFieldNames | ( | const wxString & | aSerializedFieldNames, |
| SCOPE | aScope ) |
Add a serialized list of template field names.
Definition at line 304 of file template_fieldnames.cpp.
References parse(), and TO_UTF8.
Referenced by EESCHEMA_SETTINGS::migrateFieldNameTemplates().
| void TEMPLATES::DeleteFieldNameTemplates | ( | SCOPE | aScope | ) |
Delete the contents of a scope.
Definition at line 318 of file template_fieldnames.cpp.
References m_globals, m_project, m_resolved, and m_resolvedDirty.
Referenced by SETTINGS_MANAGER::SyncGlobalFieldNameTemplatesToProjects().
| void TEMPLATES::Format | ( | OUTPUTFORMATTER * | out, |
| SCOPE | aScope ) const |
Serialize this object out as text into the given OUTPUTFORMATTER.
Definition at line 183 of file template_fieldnames.cpp.
References m_globals, m_project, and OUTPUTFORMATTER::Print().
| 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 353 of file template_fieldnames.cpp.
References m_resolved, m_resolvedDirty, and resolveTemplates().
Referenced by SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::ApplyData(), and FOOTPRINT_FIELDS_EDITOR_GRID_DATA_MODEL::applyDataToFootprint().
| const std::vector< TEMPLATE_FIELDNAME > & TEMPLATES::GetResolvedTemplateFieldNames | ( | ) |
Return the resolved project and global template field name list for read only access.
Definition at line 335 of file template_fieldnames.cpp.
References m_resolved, m_resolvedDirty, and resolveTemplates().
Referenced by BOOST_AUTO_TEST_CASE(), hasTemplate(), EESCHEMA_JOBS_HANDLER::JobExportBom(), and DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow().
| const std::vector< TEMPLATE_FIELDNAME > & TEMPLATES::GetTemplateFieldNames | ( | SCOPE | aScope | ) |
Return a specific list (global or project) for read only access.
Definition at line 344 of file template_fieldnames.cpp.
References m_globals, and m_project.
Referenced by PANEL_TEMPLATE_FIELDNAMES::ImportSettingsFrom(), and EESCHEMA_SETTINGS::migrateFieldNameTemplates().
|
protected |
Definition at line 201 of file template_fieldnames.cpp.
References AddTemplateFieldName(), TEMPLATE_FIELDNAME::m_Name, TEMPLATE_FIELDNAME::Parse(), and T.
Referenced by AddTemplateFieldNames().
|
protected |
Flatten project and global templates into a single list.
(Project templates take precedence.)
Definition at line 245 of file template_fieldnames.cpp.
References m_globals, m_project, m_resolved, m_resolvedDirty, and project.
Referenced by GetFieldName(), and GetResolvedTemplateFieldNames().
|
private |
Definition at line 226 of file template_fieldnames.h.
Referenced by AddTemplateFieldName(), DeleteFieldNameTemplates(), Format(), GetTemplateFieldNames(), and resolveTemplates().
|
private |
Definition at line 227 of file template_fieldnames.h.
Referenced by AddTemplateFieldName(), DeleteFieldNameTemplates(), Format(), GetTemplateFieldNames(), and resolveTemplates().
|
private |
Definition at line 230 of file template_fieldnames.h.
Referenced by DeleteFieldNameTemplates(), GetFieldName(), GetResolvedTemplateFieldNames(), and resolveTemplates().
|
private |
Definition at line 231 of file template_fieldnames.h.
Referenced by AddTemplateFieldName(), DeleteFieldNameTemplates(), GetFieldName(), GetResolvedTemplateFieldNames(), resolveTemplates(), and TEMPLATES().