I've written some code to allow new model types to be registered by specifying a plugin library in the world file, with syntax:
Upon parsing the plugin statement the function RegisterPlugin will be called, so the plugin library must contain code something like:
Register( "mymodel", Creator<ModelMyModel> ); // Register model with stage so it can be created
The idea is that you should not have to reinstall stage every time you modify a model, you should be able to use a standard stage package and still develop your own models. I should have a similar plugin system ready for interfaces in libstageplugin soon.
To avoid duplicate code, I have shifted the plugin loading code out of LoadControllerModule and into stage.cc so I can reuse it for other plugin systems. I'm not sure if that is the best place to put it, and I hope I have not made any mistakes while making it more generic.
Log in to post a comment.