Design-time properties (partly off-topic)

2005-03-29 09:43:05 PM
Sorry if this post is partly off-topic, but I'm not sure where else to post
I've been using BCB for quite a while now and I'm very impressed with the
ease of use the Object Inspector provides.
I've been thinking about setting up a similar type of system for a
game-engine I'm currently writing but one that is compiler-independent,
because of that I cannot use Borland's __published members. I want to be
able to use the properties at design time for tools but also to call them
through a scripting language.
I want to be able to call something like this with a script:
SetProperty( "Object Name", "Property Name", value )
With 'Object Name' being the unique name of the object, not the class type,
in fact, it must be able to be any type of class from my engine.
This would also save a lot of code because I wouldn't have to write a unique
access function for every function I want to access as a script, and it
provides ease of use because I use only two script functions to get and set
all values in my engine, and thirdly I can use the same system for my tools.
After lots of thinking I came up with a method using macros, but this method
is not fast and the executable increases in size rapidly because the macro's
are quite big.
I was wondering wether there are existing methods of doing this? C++ doesn't
support this by standard but I asume there are common clever ways of doing
this. Perhaps someone can point me a link or reference on the net?