|
KiCad PCB EDA Suite
|
Mixin class to add property support to any class. More...
#include <property_holder.h>
Public Member Functions | |
| PROPERTY_HOLDER & | GetPropertyHolder () |
| Get the property holder for this object. | |
| const PROPERTY_HOLDER & | GetPropertyHolder () const |
| template<typename T> | |
| void | SetProperty (const std::string &aKey, T &&aValue) |
| template<typename T> | |
| std::optional< T > | GetProperty (const std::string &aKey) const |
| template<typename T> | |
| T | GetPropertyOr (const std::string &aKey, T &&aDefaultValue) const |
| bool | HasProperty (const std::string &aKey) const |
| bool | RemoveProperty (const std::string &aKey) |
| template<typename T> | |
| bool | HasPropertyOfType (const std::string &aKey) const |
Private Attributes | |
| PROPERTY_HOLDER | m_propertyHolder |
Mixin class to add property support to any class.
Example usage:
Definition at line 438 of file property_holder.h.
|
inline |
Definition at line 456 of file property_holder.h.
References m_propertyHolder, and T.
|
inline |
Get the property holder for this object.
Definition at line 445 of file property_holder.h.
References m_propertyHolder.
|
inline |
Definition at line 446 of file property_holder.h.
References m_propertyHolder.
|
inline |
Definition at line 462 of file property_holder.h.
References m_propertyHolder, and T.
|
inline |
Definition at line 467 of file property_holder.h.
References m_propertyHolder.
|
inline |
Definition at line 478 of file property_holder.h.
References m_propertyHolder, and T.
|
inline |
Definition at line 472 of file property_holder.h.
References m_propertyHolder.
|
inline |
Definition at line 450 of file property_holder.h.
References m_propertyHolder, and T.
|
private |
Definition at line 484 of file property_holder.h.
Referenced by GetProperty(), GetPropertyHolder(), GetPropertyHolder(), GetPropertyOr(), HasProperty(), HasPropertyOfType(), RemoveProperty(), and SetProperty().