#include "commands.h" using namespace Cmds; Commands::Commands() { if(created) throw CommandsAlreadyCreatedException(); created=true; } void Commands::add(Command* cmd){ commands.push_back(cmd); } size_t Commands::howMany(){ return commands.size(); } int Commands::launch(const vector* args){ for(unsigned int i=0; igetName())==args->operator [](0)){ return commands[i]->execute(args); } } throw CommandNotFoundException(); } bool Commands::created = false;