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

  1. Select the type of the tool you wish to implement (GA unom, GA function, GA selector).
  2. Implement a new class as a descendant of the base class, or a later descendant, of the chosen type.
  3. 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.
  4. You can also override the methods BeginExecute() and EndExecute(), but it is strongly recommended to call the inherited parts.
  5. 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)
  6. 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.
  7. 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.

Programmer's Guide Project Antares