Skip to content
Mister Mjir edited this page Dec 23, 2019 · 2 revisions

Method

The method struct. This allows an easy way to add and manage commands for Table::handleCommand().

Header (method.h)

#ifndef METHOD
#define METHOD

#include <string>
#include <vector>

#define METHOD_ARGS const std::vector<std::string> &

struct Method
{
  std::string name;
  void (*method)(METHOD_ARGS);
  unsigned int argc;
  std::string info;
  void (*help)();
};

#endif

V 2.2.0

Clone this wiki locally