Added comments

This commit is contained in:
2024-12-06 22:05:41 +01:00
parent d2cbdc2910
commit b3f75ae3d8
15 changed files with 128 additions and 12 deletions

View File

@ -12,6 +12,7 @@
namespace fsh {
// Ovaj singleton odrzava podatke o komanadama
class CommandRegistry {
public:
static CommandRegistry& instance() {
@ -27,6 +28,7 @@ namespace fsh {
Command& operator[](const std::string n) { return get(n); }
private:
// Nove komande bi registrovali ovde:
CommandRegistry() {
cmds["wc"] = Command::register_cmd<CmdWc>();
cmds["date"] = Command::register_cmd<CmdDate>();
@ -40,4 +42,4 @@ namespace fsh {
std::unordered_map<std::string, std::unique_ptr<Command> > cmds;
};
} // namespace fsh
}