KiCad PCB EDA Suite
|
#include <property.h>
Public Types | |
using | BASE_TYPE = typename std::decay< T >::type |
Public Member Functions | |
template<typename SetType , typename GetType > | |
PROPERTY (const wxString &aName, void(Base::*aSetter)(SetType), GetType(Base::*aGetter)(), PROPERTY_DISPLAY aDisplay=PT_DEFAULT, ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType=ORIGIN_TRANSFORMS::NOT_A_COORD) | |
template<typename SetType , typename GetType > | |
PROPERTY (const wxString &aName, void(Base::*aSetter)(SetType), GetType(Base::*aGetter)() const, PROPERTY_DISPLAY aDisplay=PT_DEFAULT, ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType=ORIGIN_TRANSFORMS::NOT_A_COORD) | |
size_t | OwnerHash () const override |
Return type-id of the Owner class. | |
size_t | BaseHash () const override |
Return type-id of the Base class. | |
size_t | TypeHash () const override |
Return type-id of the property type. | |
bool | Writeable (INSPECTABLE *aObject) const override |
const wxString & | Name () const |
virtual const wxPGChoices & | Choices () const |
Return a limited set of possible values (e.g. | |
virtual void | SetChoices (const wxPGChoices &aChoices) |
Set the possible values for for the property. | |
virtual bool | HasChoices () const |
Return true if this PROPERTY has a limited set of possible values. | |
bool | Available (INSPECTABLE *aObject) const |
Return true if aObject offers this PROPERTY. | |
PROPERTY_BASE & | SetAvailableFunc (std::function< bool(INSPECTABLE *)> aFunc) |
Set a callback function to determine whether an object provides this property. | |
PROPERTY_BASE & | SetWriteableFunc (std::function< bool(INSPECTABLE *)> aFunc) |
PROPERTY_DISPLAY | Display () const |
PROPERTY_BASE & | SetDisplay (PROPERTY_DISPLAY aDisplay) |
ORIGIN_TRANSFORMS::COORD_TYPES_T | CoordType () const |
PROPERTY_BASE & | SetCoordType (ORIGIN_TRANSFORMS::COORD_TYPES_T aType) |
bool | IsHiddenFromPropertiesManager () const |
PROPERTY_BASE & | SetIsHiddenFromPropertiesManager (bool aHide=true) |
bool | IsHiddenFromRulesEditor () const |
PROPERTY_BASE & | SetIsHiddenFromRulesEditor (bool aHide=true) |
bool | IsHiddenFromLibraryEditors () const |
PROPERTY_BASE & | SetIsHiddenFromLibraryEditors (bool aIsHidden=true) |
bool | IsHiddenFromDesignEditors () const |
PROPERTY_BASE & | SetIsHiddenFromDesignEditors (bool aIsHidden=true) |
wxString | Group () const |
PROPERTY_BASE & | SetGroup (const wxString &aGroup) |
PROPERTY_BASE & | SetValidator (PROPERTY_VALIDATOR_FN &&aValidator) |
VALIDATOR_RESULT | Validate (const wxAny &&aValue, EDA_ITEM *aItem) |
Static Public Member Functions | |
static VALIDATOR_RESULT | NullValidator (const wxAny &&aValue, EDA_ITEM *aItem) |
Protected Member Functions | |
PROPERTY (const wxString &aName, SETTER_BASE< Owner, T > *s, GETTER_BASE< Owner, T > *g, PROPERTY_DISPLAY aDisplay, ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType) | |
virtual | ~PROPERTY () |
virtual void | setter (void *obj, wxAny &v) override |
virtual wxAny | getter (const void *obj) const override |
Set method. | |
template<typename T > | |
void | set (void *aObject, T aValue) |
template<typename T > | |
T | get (const void *aObject) const |
Protected Attributes | |
std::unique_ptr< SETTER_BASE< Owner, T > > | m_setter |
Get method. | |
std::unique_ptr< GETTER_BASE< Owner, T > > | m_getter |
Owner class type-id. | |
const size_t | m_ownerHash |
Base class type-id. | |
const size_t | m_baseHash |
Property value type-id. | |
const size_t | m_typeHash |
Private Attributes | |
const wxString | m_name |
Permanent identifier for this property. | |
PROPERTY_DISPLAY | m_display |
The display style controls how properties are edited in the properties manager GUI. | |
ORIGIN_TRANSFORMS::COORD_TYPES_T | m_coordType |
The coordinate type controls how distances are mapped to the user coordinate system. | |
bool | m_hideFromPropertiesManager |
bool | m_hideFromLibraryEditors |
bool | m_hideFromDesignEditors |
bool | m_hideFromRulesEditor |
wxString | m_group |
Optional group identifier. | |
std::function< bool(INSPECTABLE *)> | m_availFunc |
Eval to determine if prop is available. | |
std::function< bool(INSPECTABLE *)> | m_writeableFunc |
Eval to determine if prop is read-only. | |
PROPERTY_VALIDATOR_FN | m_validator |
Definition at line 443 of file property.h.
using PROPERTY< Owner, T, Base >::BASE_TYPE = typename std::decay<T>::type |
Definition at line 446 of file property.h.
|
inline |
Definition at line 449 of file property.h.
|
inline |
Definition at line 459 of file property.h.
|
inlineprotected |
Definition at line 489 of file property.h.
|
inlineprotectedvirtual |
Definition at line 497 of file property.h.
|
inlineinherited |
Return true if aObject offers this PROPERTY.
Definition at line 249 of file property.h.
Referenced by BOOST_AUTO_TEST_CASE(), and PROPERTY_MANAGER::IsAvailableFor().
|
inlineoverridevirtual |
Return type-id of the Base class.
Implements PROPERTY_BASE.
Definition at line 473 of file property.h.
References PROPERTY< Owner, T, Base >::m_baseHash.
|
inlinevirtualinherited |
Return a limited set of possible values (e.g.
enum). Check with HasChoices() if a particular PROPERTY provides such set.
Reimplemented in PROPERTY_ENUM< Owner, T, Base >.
Definition at line 223 of file property.h.
References empty().
Referenced by BOOST_AUTO_TEST_CASE(), PCB_PROPERTIES_PANEL::createPGProperty(), and PGPropertyFactory().
|
inlineinherited |
Definition at line 292 of file property.h.
Referenced by PGPropertyFactory().
|
inlineinherited |
Definition at line 289 of file property.h.
Referenced by PGPropertyFactory().
|
inlineprotectedinherited |
Definition at line 390 of file property.h.
Referenced by INSPECTABLE::Get().
|
inlineoverrideprotectedvirtual |
Set method.
Implements PROPERTY_BASE.
Reimplemented in PROPERTY_ENUM< Owner, T, Base >.
Definition at line 511 of file property.h.
References res.
|
inlineinherited |
Definition at line 327 of file property.h.
|
inlinevirtualinherited |
Return true if this PROPERTY has a limited set of possible values.
Reimplemented in PROPERTY_ENUM< Owner, T, Base >.
Definition at line 241 of file property.h.
Referenced by BOOST_AUTO_TEST_CASE(), PCB_PROPERTIES_PANEL::createPGProperty(), PCBEXPR_UCODE::CreateVarRef(), PROPERTIES_PANEL::getItemValue(), and PGPropertyFactory().
|
inlineinherited |
Definition at line 320 of file property.h.
|
inlineinherited |
Definition at line 313 of file property.h.
|
inlineinherited |
Definition at line 299 of file property.h.
Referenced by PROPERTIES_PANEL::extractValueAndWritability().
|
inlineinherited |
Definition at line 306 of file property.h.
|
inlineinherited |
Definition at line 217 of file property.h.
Referenced by PROPERTY_MANAGER::AddProperty(), PCB_PROPERTIES_PANEL::createPGProperty(), GENERATOR_TOOL::GENERATOR_TOOL(), PROPERTY_MANAGER::GetProperty(), PROPERTY_MANAGER::IsAvailableFor(), PROPERTY_MANAGER::IsWriteableFor(), PGPropertyFactory(), SCHEMATIC::SCHEMATIC(), and SCH_SYMBOL::SyncOtherUnits().
|
inlinestaticinherited |
Definition at line 341 of file property.h.
|
inlineoverridevirtual |
Return type-id of the Owner class.
Implements PROPERTY_BASE.
Definition at line 468 of file property.h.
References PROPERTY< Owner, T, Base >::m_ownerHash.
|
inlineprotectedinherited |
Definition at line 348 of file property.h.
References EDA_ANGLE_VARIANT_DATA::Angle(), COLOR4D_VARIANT_DATA::Color(), STD_OPTIONAL_INT_VARIANT_DATA::Value(), and STD_OPTIONAL_DOUBLE_VARIANT_DATA::Value().
Referenced by INSPECTABLE::Set().
|
inlineinherited |
Set a callback function to determine whether an object provides this property.
Definition at line 257 of file property.h.
Referenced by BOARD_ITEM_DESC::BOARD_ITEM_DESC(), DIMENSION_DESC::DIMENSION_DESC(), EDA_SHAPE_DESC::EDA_SHAPE_DESC(), PAD_DESC::PAD_DESC(), PCB_SHAPE_DESC::PCB_SHAPE_DESC(), PCB_TUNING_PATTERN_DESC::PCB_TUNING_PATTERN_DESC(), SCH_ITEM_DESC::SCH_ITEM_DESC(), SCH_PIN_DESC::SCH_PIN_DESC(), SCH_SYMBOL_DESC::SCH_SYMBOL_DESC(), and ZONE_DESC::ZONE_DESC().
|
inlinevirtualinherited |
Set the possible values for for the property.
Reimplemented in PROPERTY_ENUM< Owner, T, Base >.
Definition at line 232 of file property.h.
Referenced by SCH_PROPERTIES_PANEL::updateFontList(), and PCB_PROPERTIES_PANEL::updateLists().
|
inlineinherited |
Definition at line 293 of file property.h.
|
inlineinherited |
Definition at line 290 of file property.h.
|
inlineinherited |
Definition at line 328 of file property.h.
Referenced by PROPERTY_MANAGER::AddProperty().
|
inlineinherited |
Definition at line 321 of file property.h.
Referenced by SCH_ITEM_DESC::SCH_ITEM_DESC().
|
inlineinherited |
Definition at line 314 of file property.h.
Referenced by BOARD_CONNECTED_ITEM_DESC::BOARD_CONNECTED_ITEM_DESC(), BOARD_ITEM_DESC::BOARD_ITEM_DESC(), FOOTPRINT_DESC::FOOTPRINT_DESC(), and PAD_DESC::PAD_DESC().
|
inlineinherited |
Definition at line 300 of file property.h.
Referenced by BOARD_CONNECTED_ITEM_DESC::BOARD_CONNECTED_ITEM_DESC(), BOARD_ITEM_DESC::BOARD_ITEM_DESC(), EDA_ITEM_DESC::EDA_ITEM_DESC(), and FOOTPRINT_DESC::FOOTPRINT_DESC().
|
inlineinherited |
Definition at line 307 of file property.h.
Referenced by BOARD_CONNECTED_ITEM_DESC::BOARD_CONNECTED_ITEM_DESC(), EDA_SHAPE_DESC::EDA_SHAPE_DESC(), EDA_TEXT_DESC::EDA_TEXT_DESC(), and PCB_SHAPE_DESC::PCB_SHAPE_DESC().
|
inlineoverrideprotectedvirtual |
Implements PROPERTY_BASE.
Reimplemented in PROPERTY_ENUM< Owner, T, Base >.
Definition at line 499 of file property.h.
References PROPERTY< Owner, T, Base >::m_setter.
|
inlineinherited |
Definition at line 330 of file property.h.
Referenced by PAD_DESC::PAD_DESC(), and ZONE_DESC::ZONE_DESC().
|
inlineinherited |
Definition at line 268 of file property.h.
Referenced by DIMENSION_DESC::DIMENSION_DESC(), PAD_DESC::PAD_DESC(), SCH_PIN_DESC::SCH_PIN_DESC(), and ZONE_DESC::ZONE_DESC().
|
inlineoverridevirtual |
Return type-id of the property type.
Implements PROPERTY_BASE.
Definition at line 478 of file property.h.
References PROPERTY< Owner, T, Base >::m_typeHash.
|
inlineinherited |
Definition at line 336 of file property.h.
|
inlineoverridevirtual |
Reimplemented from PROPERTY_BASE.
Definition at line 483 of file property.h.
References PROPERTY< Owner, T, Base >::m_setter, and PROPERTY_BASE::Writeable().
|
privateinherited |
Eval to determine if prop is available.
Definition at line 432 of file property.h.
|
protected |
Property value type-id.
Definition at line 528 of file property.h.
Referenced by PROPERTY< Owner, T, Base >::BaseHash().
|
privateinherited |
The coordinate type controls how distances are mapped to the user coordinate system.
Definition at line 420 of file property.h.
|
privateinherited |
The display style controls how properties are edited in the properties manager GUI.
Definition at line 417 of file property.h.
|
protected |
Owner class type-id.
Definition at line 522 of file property.h.
|
privateinherited |
Optional group identifier.
Definition at line 430 of file property.h.
|
privateinherited |
Definition at line 425 of file property.h.
|
privateinherited |
Definition at line 423 of file property.h.
|
privateinherited |
Definition at line 422 of file property.h.
|
privateinherited |
Definition at line 427 of file property.h.
|
privateinherited |
Permanent identifier for this property.
Property names are an API contract; changing them after release will impact the Custom DRC Rules system as well as the automatic API binding system. Never rename properties; instead deprecate them and hide them from the GUI.
Definition at line 414 of file property.h.
|
protected |
Base class type-id.
Definition at line 525 of file property.h.
Referenced by PROPERTY< Owner, T, Base >::OwnerHash().
|
protected |
Get method.
Definition at line 519 of file property.h.
Referenced by PROPERTY< Owner, T, Base >::setter(), and PROPERTY< Owner, T, Base >::Writeable().
|
protected |
Definition at line 531 of file property.h.
Referenced by PROPERTY< Owner, T, Base >::TypeHash().
|
privateinherited |
Definition at line 436 of file property.h.
|
privateinherited |
Eval to determine if prop is read-only.
Definition at line 434 of file property.h.