How to use Factory Editor
[home]


When started, the FactoryEditor will look like this:

By moving your mouse over most widgets and areas,
you should have help ballons popping to help you use the tool.
Start with filling the name of your factory
and some description in the upper area:

Please note that you don't have to begin your name with
'FactoryAction' : this will be added automatically.
Then enter the type of the objects you'll have to exchange
in the bottom combo-box. Each entered type is added to the list.
Don't bother if you have typed something wrong, only types
used in the actions input/output ports you'll later describe will
be saved.
Don't try to be exhaustive, you will be able to complete this
list at any time if you think some new type is needed.
You're now ready to create ans specify actions, which will
have to be repeated for each action you'll want to add
Push the "Add Action" button to create a new tab
in the actions notebook:

You'll be prompted to give a name to your new action:

And a new tab will be generated in the action notebook:

In case of any mistake, you can delete an action by setecting it's
tab in the notebook, then push the "Delete Action" button...
Fill the name of your action
and some description in the upper area:

Please note that you don't have to begin your name with
'Action' : this will be added automatically.
In the "LoadMesh" action we're currently building, there's no
input port (the action just read from file and output a mesh
but do not receive anything as input). We will then directly move to
output ports, but input ports specification is just as output port
specification, except in a different tab of the notebook.
Select the "Output ports" tab of the action description notebook,
and push the "Add Port" button in the bottom area of the action
description:

a new port description area will appear.
Fill the port name and description, and use right mouse key to pop
the type menu. You should see in this menu all the types you entered
in the "Port types" combobox (and may at this stage complete the port
type list by adding new types in the "Port types" combobox if needed).

You may add as many input and output ports as you need.
Select now the "Parameters" tab of your notebook,
and push the "Add Parameter" button in the bottom area of the action
description:

a new parameter description area will appear.
Fill the parameter name and description, and use right mouse key to pop
the type menu.
Please note that the VPE tools handle various types for parameters,
but that the current version of the FactoryAction only handle
the "string" type.

You may add as many parameters as you need.
If you're just designing your action factory, you may skip this step.
If you're satisfied with the design and have successfully tested
it in the MapEditor, then you'll need to fix the required servers as
a last step before generating the C++ wrapper.
Select the "Servers" tab of your notebook,
and push the "Add Server" button in the bottom area of the action
description:

a new server description area will appear.
Fill the server type and description, and note that no 'FactoryObject'
string is prepended to your type string.

Please note that the VPE tools handle several servers per actions,
but that the current version of the FactoryAction only handle one.
Loop over these instructions to define as many actions as you need.
Note that you may individually load/save actions, which is a convenient
way to export them from one factory to another, or to build a library
of actions in which to pick when designing factories. Use the "Load
action" and "Save action" buttons for this :

When asked for a filename for saving, we suggest you choose a name of
the form 'foo.action.xml'.
Finish with saving your factory by pushing the "Save Factory" button.
You will be asked for a filename, and we suggest you choose a name of
the form 'foo.factory.xml'.

If you're sure your factory is OK, you may also decide to generate the
C++ wrapper for implementing it, by pushing the "Generate C++" button.
You'll be asked for a directory name under which a standard directory tree
(see FactoryAction documentation) and files (IDL, headers, sources, Makefiles)
will be generated.

Comments, bugs, fixes to t_chevalier@libertysurf.fr.

[Home]
|