#pragma once #include "libcommon/string.h" #include #include #include class SubcommandDispatcher { typedef std::function Handler; public: void addSubcommand(const std::wstring &command, Handler handler); void dispatch(const std::wstring &command, const std::vector &arguments); private: std::unordered_map m_commands; };