KiCad PCB EDA Suite
|
#include <component_class_manager.h>
Public Member Functions | |
COMPONENT_CLASS_MANAGER () | |
COMPONENT_CLASS * | GetEffectiveComponentClass (std::unordered_set< wxString > &classNames) |
Gets an effective component class for the given constituent class names. | |
const COMPONENT_CLASS * | GetNoneComponentClass () const |
Returns the unassigned component class. | |
void | InitNetlistUpdate () |
Prepare the manager for a board update Must be called prior to updating the PCB from the netlist. | |
void | FinishNetlistUpdate () |
Cleans up the manager after a board update Must be called after updating the PCB from the netlist. | |
void | Reset () |
Resets the contents of the manager. | |
const std::unordered_map< wxString, std::unique_ptr< COMPONENT_CLASS > > & | GetClasses () const |
Fetches a read-only map of the fundamental component classes. | |
Static Public Member Functions | |
static wxString | GetFullClassNameForConstituents (std::unordered_set< wxString > &classNames) |
Gets the full effective class name for the given set of constituent classes. | |
static wxString | GetFullClassNameForConstituents (std::vector< wxString > &classNames) |
Gets the full effective class name for the given set of constituent classes. | |
Protected Attributes | |
std::unordered_map< wxString, std::unique_ptr< COMPONENT_CLASS > > | m_classes |
All individual component classes. | |
std::unordered_map< wxString, std::unique_ptr< COMPONENT_CLASS > > | m_effectiveClasses |
Generated effective component classes. | |
std::unordered_map< wxString, std::unique_ptr< COMPONENT_CLASS > > | m_classesCache |
Cache of all individual component classes (for netlist updating) | |
std::unordered_map< wxString, std::unique_ptr< COMPONENT_CLASS > > | m_effectiveClassesCache |
Cache of all generated effective component classes (for netlist updating) | |
std::unique_ptr< COMPONENT_CLASS > | m_noneClass |
The class to represent an unassigned component class. | |
Definition at line 84 of file component_class_manager.h.
COMPONENT_CLASS_MANAGER::COMPONENT_CLASS_MANAGER | ( | ) |
Definition at line 86 of file component_class_manager.cpp.
References m_noneClass.
void COMPONENT_CLASS_MANAGER::FinishNetlistUpdate | ( | ) |
Cleans up the manager after a board update Must be called after updating the PCB from the netlist.
Definition at line 173 of file component_class_manager.cpp.
References m_classesCache, and m_effectiveClassesCache.
Referenced by BOARD_NETLIST_UPDATER::UpdateNetlist().
|
inline |
Fetches a read-only map of the fundamental component classes.
Definition at line 117 of file component_class_manager.h.
References m_classes.
Referenced by DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow().
COMPONENT_CLASS * COMPONENT_CLASS_MANAGER::GetEffectiveComponentClass | ( | std::unordered_set< wxString > & | classNames | ) |
Gets an effective component class for the given constituent class names.
classes | The names of the constituent component classes |
Definition at line 93 of file component_class_manager.cpp.
References COMPONENT_CLASS::GetConstituentClasses(), GetFullClassNameForConstituents(), m_classes, m_classesCache, m_effectiveClasses, m_effectiveClassesCache, and m_noneClass.
Referenced by PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked(), and BOARD_NETLIST_UPDATER::updateComponentClass().
|
static |
Gets the full effective class name for the given set of constituent classes.
Definition at line 181 of file component_class_manager.cpp.
References GetFullClassNameForConstituents().
Referenced by GetEffectiveComponentClass(), GetFullClassNameForConstituents(), and BOARD_NETLIST_UPDATER::updateComponentClass().
|
static |
Gets the full effective class name for the given set of constituent classes.
classNames | a sorted vector of consituent class names |
Definition at line 196 of file component_class_manager.cpp.
|
inline |
Returns the unassigned component class.
Definition at line 102 of file component_class_manager.h.
References m_noneClass.
Referenced by BOARD_NETLIST_UPDATER::addNewFootprint(), and PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked().
void COMPONENT_CLASS_MANAGER::InitNetlistUpdate | ( | ) |
Prepare the manager for a board update Must be called prior to updating the PCB from the netlist.
Definition at line 166 of file component_class_manager.cpp.
References m_classes, m_classesCache, m_effectiveClasses, and m_effectiveClassesCache.
Referenced by BOARD_NETLIST_UPDATER::UpdateNetlist().
void COMPONENT_CLASS_MANAGER::Reset | ( | ) |
Resets the contents of the manager.
|
protected |
All individual component classes.
Definition at line 124 of file component_class_manager.h.
Referenced by GetClasses(), GetEffectiveComponentClass(), and InitNetlistUpdate().
|
protected |
Cache of all individual component classes (for netlist updating)
Definition at line 130 of file component_class_manager.h.
Referenced by FinishNetlistUpdate(), GetEffectiveComponentClass(), and InitNetlistUpdate().
|
protected |
Generated effective component classes.
Definition at line 127 of file component_class_manager.h.
Referenced by GetEffectiveComponentClass(), and InitNetlistUpdate().
|
protected |
Cache of all generated effective component classes (for netlist updating)
Definition at line 133 of file component_class_manager.h.
Referenced by FinishNetlistUpdate(), GetEffectiveComponentClass(), and InitNetlistUpdate().
|
protected |
The class to represent an unassigned component class.
Definition at line 136 of file component_class_manager.h.
Referenced by COMPONENT_CLASS_MANAGER(), GetEffectiveComponentClass(), and GetNoneComponentClass().