B.2 How To Create a New Operator
If you wish to create a ne GAtool, there are only a few steps you have
to take. If you need, consult the Reference
Manual for detailed description of the classes
- Select the type of the tool you wish to implement (GA unom, GA function,
- Implement a new class as a descendant of the base class, or a later descendant,
of the chosen type.
- Override the method Execute(). Implement the actions you wish to do.
The methods BeginExecute() and EndExecute() must
be called at the beginning (respectively end) of the Execute method.
- You can also override the methods BeginExecute() and EndExecute(),
but it is strongly recommended to call the inherited parts.
- If you wish the GA tool to be recognized by GA tables (GA dual tables),
you have to edit the method BuildUnom() (BuildFunc(),
BuildSelector() respectively) in TCustomGATab class (gatabs.cpp)
- If you made the step 5 and you use the TableSetting utility then add the name
of your class into the text file called unoms.names (dbltabs.names,
func.names, selectors.names, tabs.names) - case sensitively.
- You can now freely use your new GAtool.
To create a new GA dual table can be even easier. Please check the
Reference Manual for details.