00001
00002
00012
00013
00014 #ifndef QLIB_ACE_COMMAND_H
00015 #define QLIB_ACE_COMMAND_H
00016
00017 namespace qlib {
00018
00019 namespace ace {
00020
00026 template<
00027 typename T,
00028 typename R = int
00029 >
00030 struct Command {
00031 typedef T param_type;
00032 typedef R return_type;
00033
00034 virtual ~Command() {};
00035 virtual R exec(void) = 0;
00036 virtual R exec(T *) = 0;
00037 virtual R operator()(void) {
00038 this->exec();
00039 }
00040 virtual R operator()(T *param) {
00041 this->exec(param);
00042 }
00043 };
00044
00045 };
00046
00047 };
00048
00049
00050 #endif
00051