From: John P. <jpa...@et...> - 2000-08-23 02:04:13
|
>Of course, I could put some sort of interface functionality into a base class, >something like a map of strings to strings. Base::setParam("name", value)? >The interface spec in SOMEClassInfo would have the names, descriptions, and > types. We'll see. Dynamic scriptable interfaces. I thought of this. I was actually going to go down to the C++ level and look at vtables in order to dynamically resolve methods. In theory all I would need was an object reference (the data), find the class it was associated to and do a vtable lookup. In practice this is hard to do which brought me to the same conclusion you have stated here - using an interface. This is sort of how Java does it. The other way (which is actually the same way but with automation built in) is to use the SWIG toolset. This is a nice way to get C++ objects into scripting languages. Check it out at www.swig.org. On another note. I was just recently at the San Jose Linux World discussing Bonobo (the GNOME object model) with one of the Helix Code developers. Bonobo is built over Corba and from what I heard pretty fast once things are binded. The thing I wanted to find out was if we were reinventing the wheel here. My conclusion was that what we have is a fast and simple object model that fits very easily into any C++ project (I in fact want to test it with the plugin system for Half-Life bots to see if I can extend HL to run more than one type of bot AI at a time). All the other object models out there are more or less for application development and tend to trade off speed and simplicity for other factors. That is of course except Piers XPLC which has similar but different goals than us. Of course we make trade-offs too. Such things as in-process objects can cause an application to crash miserably if a SOMEObject is coded bad where as Bonobo is out of process (each object resides in its own process and communicates through ipc). Well just some things to think about as we figure out our goals. Hopefully in the future we can add bridges that allow for SOMEObject to be loaded from other object models and visa versa. Imagine gecko (Netscapes rendering engine) embedded as a SOMEObject making it easy for people to use it without learning XPCOM. John Palmieri |