Skip to content
Daniel Stoeckel edited this page Feb 20, 2015 · 1 revision

Writing BALL Plugins

BALL offers a flexible and easily extensible plugin system that allows to dynamically add new functionality to running BALL programs during runtime. Why is this desirable?

  • Creating a plugin which needs a special external library does not impose any new dependencies on the library itself.
  • Existing programs can be extended without touching the programs source code.
  • Creating plugins allows to hook non LGPL code into BALL and thus helps to avoid legal issues.

So what is actually needed to create a plugin? In order to add a completely new plugin to BALL one needs 3 classes:

  • PluginInterface: This is a purely virtual class that specifies the operations a plugin has to offer. There are some important interfaces which have already been predefined:
    • BALLPlugin: Every BALL plugin must implement at least this interface. It comprises methods that can be used to query some basic information about the plugin
    • VIEWPlugin: A plugin that wants to interface with BALLView should implement this interface.
  • PluginHandler: A PluginHandler takes care of the proper initialization and deletion of a plugin.
  • The plugin itsself: The actual plugin that implements the desired interfaces.

TODO:continue

Clone this wiki locally