#pragma once #include "FileSystem.hpp" #include class Interpreter { struct Command { const char* description = nullptr; ui32 numArguments = 0; bool(*callback)(FileSystem&, const std::vector&) = nullptr; }; public: Interpreter(); bool interpret(const std::string& command); void printHelp(); void dumpToFile(const std::string& name) const; private: void reportError(const std::string& string) const; private: std::map mCommands; std::string mError; public: FileSystem mFileSystem; enum LoggingPolicy { DEFAULT, DEBUG, NONE } logType = DEFAULT; };