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