Creating Your Own Plugin

The MTK distribution comes with an example plugin11.12, which implements a sum of two integer parameters. You can start creating your own new MTK plugin from this template class.

All plugins are created using a single template class, called ObjectBase. In order to implement a new plugin, take the following steps:

i)
Copy the example directory (and all its files) to a new one, whose name will be identical to that you will choose for your new plugin.
ii)
Replace the Example class name inside the implementation and its header files with the name of your new plugin;
iii)
Define the attributes of your new plugin;
iv)
Write plugin constructors, set and get methods, displays and methods;
v)
Write plugin help messages, defined in the header file;
vi)
Use addConstructor, addOption, addDisplay, and addCommand methods, inherited from ObjectBase, to register plugin information into the MTK framework.
And you're done! It is as simple as that!

Guilherme Dutra Gonzaga Jaime 2010-10-27