Commands.h 360 B

123456789101112131415161718
  1. #ifndef COMMANDS_H
  2. #define COMMANDS_H
  3. #include "utils/SplitString.h"
  4. namespace Commands {
  5. typedef StringBuffer<32> Name;
  6. typedef StringBuffer<256> Raw;
  7. typedef SplitString<256> Arguments;
  8. typedef void (*Command)(const Arguments&);
  9. void init();
  10. void add(const Name& name, Command command);
  11. void execute(const Raw& raw);
  12. }
  13. #endif