![]() |
KiCad PCB EDA Suite
|
#include <property.h>
Public Member Functions | |
PROPERTY_BASE (const wxString &aName, PROPERTY_DISPLAY aDisplay=DEFAULT) | |
< Used to generate unique IDs. Must come up front so it's initialized before ctor. More... | |
virtual | ~PROPERTY_BASE () |
const wxString & | Name () const |
virtual const wxPGChoices & | Choices () const |
Return a limited set of possible values (e.g. More... | |
virtual void | SetChoices (const wxPGChoices &aChoices) |
Set the possible values for for the property. More... | |
virtual bool | HasChoices () const |
Return true if this PROPERTY has a limited set of possible values. More... | |
bool | Available (INSPECTABLE *aObject) const |
Return true if aObject offers this PROPERTY. More... | |
void | SetAvailableFunc (std::function< bool(INSPECTABLE *)> aFunc) |
Set a callback function to determine whether an object provides this property. More... | |
virtual size_t | OwnerHash () const =0 |
Return type-id of the Owner class. More... | |
virtual size_t | BaseHash () const =0 |
Return type-id of the Base class. More... | |
virtual size_t | TypeHash () const =0 |
Return type-id of the property type. More... | |
virtual bool | IsReadOnly () const =0 |
PROPERTY_DISPLAY | GetDisplay () const |
Protected Member Functions | |
template<typename T > | |
void | set (void *aObject, T aValue) |
template<typename T > | |
T | get (void *aObject) |
virtual void | setter (void *aObject, wxAny &aValue)=0 |
virtual wxAny | getter (void *aObject) const =0 |
Private Attributes | |
const wxString | m_name |
const PROPERTY_DISPLAY | m_display |
std::function< bool(INSPECTABLE *)> | m_availFunc |
Eval to determine if prop is available. More... | |
Friends | |
class | INSPECTABLE |
Definition at line 172 of file property.h.
|
inline |
< Used to generate unique IDs. Must come up front so it's initialized before ctor.
Definition at line 178 of file property.h.
|
inlinevirtual |
Definition at line 185 of file property.h.
|
inline |
Return true if aObject offers this PROPERTY.
Definition at line 224 of file property.h.
References m_availFunc.
Referenced by BOOST_AUTO_TEST_CASE().
|
pure virtual |
Return type-id of the Base class.
Implemented in PROPERTY< Owner, T, Base >.
Referenced by PROPERTY_MANAGER::ReplaceProperty().
|
inlinevirtual |
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 198 of file property.h.
References empty().
Referenced by BOOST_AUTO_TEST_CASE().
|
inlineprotected |
Definition at line 268 of file property.h.
References getter().
Referenced by PROPERTY_MANAGER::CLASS_DESC::collectPropsRecur(), and INSPECTABLE::Get().
|
inline |
|
protectedpure virtual |
Implemented in PROPERTY_ENUM< Owner, T, Base >, and PROPERTY< Owner, T, Base >.
Referenced by INSPECTABLE::Get(), and get().
|
inlinevirtual |
Return true if this PROPERTY has a limited set of possible values.
Reimplemented in PROPERTY_ENUM< Owner, T, Base >.
Definition at line 216 of file property.h.
Referenced by BOOST_AUTO_TEST_CASE(), and PCB_EXPR_UCODE::CreateVarRef().
|
pure virtual |
Implemented in PROPERTY< Owner, T, Base >.
|
inline |
Definition at line 189 of file property.h.
References m_name.
Referenced by PROPERTY_MANAGER::AddProperty(), and PROPERTY_MANAGER::GetProperty().
|
pure virtual |
Return type-id of the Owner class.
Implemented in PROPERTY< Owner, T, Base >.
Referenced by PROPERTY_MANAGER::AddProperty(), INSPECTABLE::Get(), PROPERTY_MANAGER::ReplaceProperty(), and INSPECTABLE::Set().
|
inlineprotected |
Definition at line 261 of file property.h.
References setter().
Referenced by INSPECTABLE::Set().
|
inline |
Set a callback function to determine whether an object provides this property.
Definition at line 232 of file property.h.
References m_availFunc.
|
inlinevirtual |
Set the possible values for for the property.
Reimplemented in PROPERTY_ENUM< Owner, T, Base >.
Definition at line 207 of file property.h.
|
protectedpure virtual |
Implemented in PROPERTY_ENUM< Owner, T, Base >, and PROPERTY< Owner, T, Base >.
Referenced by INSPECTABLE::Set(), and set().
|
pure virtual |
Return type-id of the property type.
Implemented in PROPERTY< Owner, T, Base >.
Referenced by PCB_EXPR_UCODE::CreateVarRef().
|
friend |
Definition at line 287 of file property.h.
|
private |
Eval to determine if prop is available.
Definition at line 285 of file property.h.
Referenced by Available(), and SetAvailableFunc().
|
private |
Definition at line 283 of file property.h.
Referenced by GetDisplay().
|
private |
Definition at line 282 of file property.h.
Referenced by Name().