00001 #ifndef ALGORITHMVI_H
00002 #define ALGORITHMVI_H
00003
00004
00005 #include <string>
00006
00007 00009
00010 \c algorithms are "executable" classes that runs with the method \c run().<br>
00011 \c algorithms should inherit from algorithmVI.<br>
00012 <ul>
00013 <li> the main virtual method \c run() executes the following methods: \c initialize(),
00014 \c execute() and \c finalize().
00015 <li> the methods \c initialize(), \c execute(), \c and \c finalize() are pure virtual.
00016 They have to be implemented in the derived classes.
00017 <li> the method \c command() allows to execute the following name commands: "run",
00018 "initialize","execute","finalize", each command executes the method of its
00019 name. This is useful dealing with composites, in particular it is used by
00020 the serverVI template class.
00021 </ul>
00022 */
00023
00024
00025
00026
00027 class algorithmVI
00028
00029 {
00030 public:
00031
00033 algorithmVI(){}
00035 virtual ~algorithmVI() {}
00036
00038
00039 virtual void run();
00040
00042 virtual void initialize() = 0;
00044 virtual void execute() = 0;
00046 virtual void finalize() = 0;
00047
00049
00050 virtual void command(std::string com);
00051
00052 };
00053 #endif