00001 /* ${copyright}$ */ 00002 /* $Id: SheppCommand.H 581 2006-03-15 18:55:45Z eduardo $ */ 00007 #ifndef __SHEPP_COMMAND_H__ 00008 #define __SHEPP_COMMAND_H__ 00009 00010 #include <string> 00011 using std::string; 00012 00014 class SheppCommand { 00015 public: 00017 bool operator<(const SheppCommand &cmd) const { 00018 return name < cmd.name; 00019 } 00020 00022 SheppCommand() 00023 { 00024 init(); 00025 } 00026 00028 SheppCommand(string name, rl_icpfunc_t *function, string brief) 00029 { 00030 this->name = name; 00031 this->function = function; 00032 this->brief = brief; 00033 } 00034 00036 void reset(string name, rl_icpfunc_t *function, string brief) 00037 { 00038 this->name = name; 00039 this->function = function; 00040 this->brief = brief; 00041 } 00042 00044 string name; 00045 00047 rl_icpfunc_t *function; 00048 00050 string brief; 00051 protected: 00053 void init() 00054 { 00055 name = ""; 00056 function = NULL; 00057 brief = ""; 00058 } 00059 }; 00060 00061 #endif //__SHEPP_COMMAND_H__