|
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 439 of file property_holder.h.
|
inline |
Definition at line 457 of file property_holder.h.
References m_propertyHolder, and T.
|
inline |
Get the property holder for this object.
Definition at line 446 of file property_holder.h.
References m_propertyHolder.
|
inline |
Definition at line 447 of file property_holder.h.
References m_propertyHolder.
|
inline |
Definition at line 463 of file property_holder.h.
References m_propertyHolder, and T.
|
inline |
Definition at line 468 of file property_holder.h.
References m_propertyHolder.
|
inline |
Definition at line 479 of file property_holder.h.
References m_propertyHolder, and T.
|
inline |
Definition at line 473 of file property_holder.h.
References m_propertyHolder.
|
inline |
Definition at line 451 of file property_holder.h.
References m_propertyHolder, and T.
|
private |
Definition at line 485 of file property_holder.h.
Referenced by GetProperty(), GetPropertyHolder(), GetPropertyHolder(), GetPropertyOr(), HasProperty(), HasPropertyOfType(), RemoveProperty(), and SetProperty().