21#ifndef PCBNEW_COMPONENT_CLASS_H
22#define PCBNEW_COMPONENT_CLASS_H
A lightweight representation of a component class.
void SetUsageContext(const USAGE aUsageContext)
Sets the assignment context in which this component class is being used.
USAGE
The assignment context in which this component class is used.
bool operator!=(const COMPONENT_CLASS &aComponent) const
Tests two component classes for inequality based on full class name.
USAGE GetUsageContext() const
Gets the assignment context in which this component class is being used.
void AddConstituentClass(COMPONENT_CLASS *componentClass)
Adds a constituent component class to an effective component class.
bool ContainsClassName(const wxString &className) const
Determines if this (effective) component class contains a specific constituent class.
USAGE m_usageContext
The assignment context in which this component class is being used.
std::vector< COMPONENT_CLASS * > m_constituentClasses
The COMPONENT_CLASS objects contributing to this complete component class.
const wxString & GetName() const
Fetches the full name of this component class.
COMPONENT_CLASS(const wxString &name, const USAGE aUsageContext)
Construct a new component class.
const std::vector< COMPONENT_CLASS * > & GetConstituentClasses() const
Fetches a vector of the constituent classes for this (effective) class.
wxString m_name
The full name of the component class.
bool operator==(const COMPONENT_CLASS &aComponent) const
Tests two component classes for equality based on full class name.
const COMPONENT_CLASS * GetConstituentClass(const wxString &className) const
Returns a named constituent class of this component class, or nullptr if not found.
wxString GetHumanReadableName() const
Gets the consolidated name of this component class (which may be an aggregate).
bool IsEmpty() const
Determines if this (effective) component class is empty (i.e. no classes defined)