i'm trying to reimplement a set of GLIB classes in C++ using GLIBMM. Most of them are buggy and need to be expanded a lot and since the entire project is done in C++ i preferred to port the code before correcting it.
Unfortunately i'm not a GLIB expert and even if i've spent many days around the official documentation i'm still in trouble in understanding some concepts, expecially around Properties.
As far as i have understood, properties are a full replacement (and maybe more) for setters and getters. Basically, instead of using specialized methods for each attribute, a common set/get_property method is used for all of them, accessing the property with a name (or ID) and using a container like GValue to hold multiple kind of data.
The only advantage i can see in this is the ability to access properties with names contained in strings (which may come for example from a configuration file) but i'm surely missing something. Moreover this seems to be true in GLIB but not in Glib::ObjectBase which says that you should prefer a specialized property_(*) getter/setter instead of property_set/get_value.
Reading the documentation about Glib::Property i'm not sure how a full properties implementation in C++ should like, i presume the lack of experience with GLIB is making it harder.
I'd like to move every property as an attribute with std get/set methods but i don't want to make a lot of changes discovering too late that the previous approch was times better :)
Can someone explain me what a property is (if compared with a C++ class attribute)? Can you provide me an example of a working property with signal/slots? Can someone put some light over the advantages of the two ways?
Thank you!