KiCad PCB EDA Suite
CLASS_E_DESC Struct Reference

Public Member Functions

 CLASS_E_DESC ()
 

Detailed Description

Definition at line 184 of file test_property.cpp.

Constructor & Destructor Documentation

◆ CLASS_E_DESC()

CLASS_E_DESC::CLASS_E_DESC ( )
inline

Definition at line 186 of file test_property.cpp.

187  {
188  wxArrayInt values;
189  values.Add( enum_glob::TEST1 );
190  values.Add( enum_glob::TEST3 );
191  wxArrayString labels;
192  labels.Add( "T1" );
193  labels.Add( "T3" );
194  wxPGChoices newChoices( labels, values );
195 
197  auto prop = new PROPERTY_ENUM<E, enum_glob, D>( "enumGlob",
199  prop->SetChoices( newChoices );
200  propMgr.ReplaceProperty( TYPE_HASH( D ), "enumGlob", prop );
201  }
static PROPERTY_MANAGER & Instance()
Definition: property_mgr.h:61
#define TYPE_HASH(x)
Macro to generate unique identifier for a type
Definition: property.h:53
enum_glob getGlobEnum() const
void setGlobEnum(enum_glob val)
void ReplaceProperty(size_t aBase, const wxString &aName, PROPERTY_BASE *aNew)
Replaces an existing property for a specific type.
Provides class metadata.
Definition: property_mgr.h:58

References D::getGlobEnum(), PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::ReplaceProperty(), D::setGlobEnum(), TEST1, TEST3, and TYPE_HASH.


The documentation for this struct was generated from the following file: