-
Notifications
You must be signed in to change notification settings - Fork 11
Plugins And Interfaces
Scott Shillcock edited this page Aug 27, 2010
·
1 revision
% cd ~/cm/src/dmz/examples/ % mkdir hello
In the new directory, call the plugingen script and pass the name of the plugin to create. The dmz namespace will automatically be added.
% cd ~/cm/src/dmz/examples/hello % ~/cm/src/lmk/plugingen PluginHelloWorld –t –o
Other plugingen options are:
-i (InputObserverUtil) : Defines an interface for receiving input events (dmzInputObserverUtil.h) -o (ObjectObserverUtil) : Defines an interface for object observing (dmzObjectObserverUtil.h) -t (TimeSlice) : Defines an interface for receiving time slices. (dmzRuntimeTimeSlice.h) -m (Messaging) : Defines an interface for receiving messages (dmzRuntimeMessaging.h) -e (EventObserverUtil) : Defines an interface for event observing (dmzEventObserverUtil.h)
Create a XML configuration file called config.xml with the following content.
<?xml version="1.0" encoding="UTF-8"?>
<dmz>
<plugin-list>
<plugin name="dmzPluginHelloWorld" scope="hello"/>
</plugin-list>
<hello>
<!-- Initialization data for dmzPluginHelloWorld goes here. -->
</hello>
</dmz>
% cd cd ~/cm/src/dmz/examples/hello % lmk –u -b
% cd ~/cm/src/io % ./run.sh config/color/red.xml ~/cm/src/dmz/examples/hello/config.xml
Call the interfacegen utility from inside the directory you want the interface to be generated.
% cd ~/cm/src/dmz/framework/foo/interfaces % $HOME/cm/src/lmk/interfacegen FooModule