2016-03-11 14:49:24 +00:00
|
|
|
#ifndef COMMANDS_H
|
|
|
|
#define COMMANDS_H
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <command.h>
|
|
|
|
#include "cmds.h"
|
|
|
|
using std::string;
|
|
|
|
using std::vector;
|
|
|
|
|
|
|
|
class Commands
|
|
|
|
{
|
|
|
|
vector<Command*> commands;
|
|
|
|
static bool created;
|
|
|
|
Commands(Commands&);
|
|
|
|
public:
|
|
|
|
Commands();
|
|
|
|
void add(Command*);
|
2016-03-11 15:13:04 +00:00
|
|
|
size_t howMany();
|
2016-03-11 14:49:24 +00:00
|
|
|
int launch(const vector<string>* args);
|
|
|
|
};
|
|
|
|
|
|
|
|
class CommandsAlreadyCreatedException{};
|
|
|
|
class CommandNotFoundException{};
|
|
|
|
|
|
|
|
#endif // COMMANDS_H
|