Left: | ||
Right: |
LEFT | RIGHT |
---|---|
(no file at all) | |
1 #include <iostream> | 1 #include <iostream> |
2 | 2 |
3 #include "Command.h" | 3 #include "Command.h" |
4 | 4 |
5 Command::Command(const std::string& name) : name(name) | 5 Command::Command(const std::string& name) : name(name) |
6 { | 6 { |
7 } | 7 } |
8 | 8 |
9 Command::~Command() | 9 Command::~Command() |
10 { | 10 { |
11 } | 11 } |
12 | 12 |
13 void Command::ShowUsage() const | |
14 { | |
15 std::cout << "Usage: " << GetUsage() << std::endl; | |
16 } | |
17 | |
13 NoSuchCommandError::NoSuchCommandError(const std::string& commandName) | 18 NoSuchCommandError::NoSuchCommandError(const std::string& commandName) |
14 : std::runtime_error("No such command: " + commandName) | 19 : std::runtime_error("No such command: " + commandName) |
15 { | 20 { |
16 } | 21 } |
LEFT | RIGHT |