#10 Generalization in Get/Set


There should be a generic {get,set}value scheme that applies to every kind of type a wxPGProperty holds. Primitite types are supported via the wxVariant and an extension mechanism handles the rest in different ways (some properties have methods to get/set specific values, others connect their values with pointers to dynamic classes etc.). It is somewhat cumbersome to use custom if-then-else stmts or visiting mechanisms to handle every different case of property.


  • Jaakko Salli

    Jaakko Salli - 2007-11-23
    • assigned_to: nobody --> jmsalli
    • status: open --> closed
  • Jaakko Salli

    Jaakko Salli - 2007-11-23

    Logged In: YES
    Originator: NO

    For the stable branch (1.2.x), I won't change this, and in the development branch (1.3.x), properties already use wxVariant as their internal "generic" value. That is, wxPGProperty::GetValue() returns wxVariant, and that is all you need. There are macros to automatically generate necessary wxVariantData class for arbitrary values, see the docs main page for samples.

    Or maybe I did not fully understand what you had in mind?


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks