20#ifndef PROJECT_COMPONENT_CLASS_SETTINGS_H
21#define PROJECT_COMPONENT_CLASS_SETTINGS_H
24#include <unordered_map>
53 const wxString& aSecondaryData )
55 m_conditions[aCondition] = { aPrimaryData, aSecondaryData };
59 const std::unordered_map<CONDITION_TYPE, std::pair<wxString, wxString>>&
GetConditions()
const
67 m_componentClass = aComponentClass;
76 m_conditionsOperator = aOperator;
83 static wxString GetConditionName(
const CONDITION_TYPE aCondition );
86 static CONDITION_TYPE GetConditionType(
const wxString& aCondition );
89 wxString GetAssignmentInDRCLanguage()
const;
96 std::unordered_map<CONDITION_TYPE, std::pair<wxString, wxString>>
m_conditions;
118 m_enableSheetComponentClasses = aEnabled;
130 return m_componentClassAssignments;
136 m_componentClassAssignments.push_back( aAssignment );
bool operator==(const wxAuiPaneInfo &aLhs, const wxAuiPaneInfo &aRhs)
wxString m_componentClass
The name of the component class for this assignment rule.
void SetConditionsOperation(const CONDITIONS_OPERATOR aOperator)
Sets the boolean operation in use for all conditions.
CONDITION_TYPE
A condition match type.
const std::unordered_map< CONDITION_TYPE, std::pair< wxString, wxString > > & GetConditions() const
Gets all conditions.
std::unordered_map< CONDITION_TYPE, std::pair< wxString, wxString > > m_conditions
Map of condition types to primary and secondary data fields for the condition.
void SetCondition(const CONDITION_TYPE aCondition, const wxString &aPrimaryData, const wxString &aSecondaryData)
Sets the given condition type with the assocated match data.
CONDITIONS_OPERATOR
Whether conditions are applied with OR or AND logic.
void SetComponentClass(const wxString &aComponentClass)
Sets the resulting component class for matching footprints.
CONDITIONS_OPERATOR GetConditionsOperator() const
Gets the boolean operation in use for all conditions.
const wxString & GetComponentClass() const
Gets the resulting component class for matching footprints.
COMPONENT_CLASS_SETTINGS stores data for component classes, including rules for automatic generation ...
bool GetEnableSheetComponentClasses() const
Gets whether component classes should be generated for components in hierarchical sheets.
void ClearComponentClassAssignments()
Clear all dynamic component class assignments.
void SetEnableSheetComponentClasses(bool aEnabled)
Sets whether component classes should be generated for components in hierarchical sheets.
std::vector< COMPONENT_CLASS_ASSIGNMENT_DATA > m_componentClassAssignments
All dynamic component class assignment rules.
bool operator!=(const COMPONENT_CLASS_SETTINGS &aOther) const
void AddComponentClassAssignment(const COMPONENT_CLASS_ASSIGNMENT_DATA &aAssignment)
const std::vector< COMPONENT_CLASS_ASSIGNMENT_DATA > & GetComponentClassAssignments() const
Gets all dynamic component class assignments.
bool m_enableSheetComponentClasses
Toggle generation of component classes for hierarchical sheets.
NESTED_SETTINGS is a JSON_SETTINGS that lives inside a JSON_SETTINGS.
@ REFERENCE
Field Reference of part, i.e. "IC21".