A few observations and questions regarding iModifiable entries
Andrei Bârsan <[email protected]>
| Newsgroups | gmane.comp.graphics.crystalspace.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, CS developers! I have worked some more on the csEditor framework, and I have a few things about its inner workings that are still not 100% clear to me. The wiki page states that iModifiableParameter only has GetName, GetDescription, GetType and GetConstraint. What about the actual value? The practical example shows that, indeed, csGenmeshMeshObject, a child of iModifiableParameter, implements Set/GetParameterValue functions. I would assume that the interface does, in fact, need those methods. Logically, this would make sense. That's the heart of the parameter - its value - setting and reading it, that is. Also, if one parameter has its own id and value, why do those methods need to take an additional csStringID parameter, in addition to the actual value the parameter needs to receive? I understand that we might need to implement our own Get/SetParameterValue functions for slightly more advanced cases (like the csGenmeshMeshObject example on the wiki), but shouldn't there still be some basic built-in functionality for very simple cases? i.e. not having to actually create a class implementing iModifiableParameter when we just want to edit a plain string, or an integer. And of course, simple situations like this will arise quite often. Should then a set of basic iModifiableParameters be implemented, like an iModifiableString, iModifiableInteger and so on for these lightweight use cases? Another question would be why does iModifiableDescription need to be able to get parameters? (it has GetParameter(...) and GetParameterByIndex(...) methods) Shouldn't the just iModifiable object have a list of parameters? And have the description not know anything about them? Why would iModifiableDescription need to know about the parameters of the object it's describing? Regards, Andrei Bârsan ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/