1 #ifndef __COMMAND_COMMAND_H
2 #define __COMMAND_COMMAND_H
14 * Main class for handling user passed parameters from command line.
16 class Command : protected Grouped {
19 * Default constructor.
21 * @param argc from the main function
22 * @param argv from the main function
23 * @param params initializer_list containing Parameter handlers
24 * responsible for correctly handle user data.
26 Command(unsigned int argc, char *argv[], std::initializer_list<Parameter *> params)
27 : Grouped(params, "Command") {
29 for (unsigned int i = 1; i < argc; i++) {
30 this->understand(argv[i]);
34 catch(const std::invalid_argument & exception) {
38 catch(const std::logic_error & exception) {
45 * Destructor. Releases allocated memory.
53 #endif /* __COMMAND_COMMAND_H */