Apply formating to all files. CLeanup

This commit is contained in:
IlyaShurupov 2023-10-22 17:07:28 +03:00 committed by Ilya Shurupov
parent b4ae5dde77
commit 91fb72bd49
928 changed files with 14515 additions and 21479 deletions

View file

@ -1,36 +1,34 @@
#pragma once
#include "CommandLine.hpp"
#include "Map.hpp"
namespace tp {
class CmdLineInterpreter {
public:
typedef bool (*CommandFunction)(void* customData, const CommandLine& args);
private:
struct Command {
CommandLine* args;
CommandFunction function;
void* customData = nullptr;
};
Map<String, Command> mCommands;
String mName = "InterpName";
public:
CmdLineInterpreter();
~CmdLineInterpreter();
void setName(const String& name) { mName = name; }
[[nodiscard]] const String& getName() const { return mName; }
void help(const CommandLine& args) const;
void addCommand(const String& id, CommandLine* args, CommandFunction function, void* customData = nullptr);
void run();
bool processCommand(int1* command);
};
#pragma once
#include "CommandLine.hpp"
#include "Map.hpp"
namespace tp {
class CmdLineInterpreter {
public:
typedef bool (*CommandFunction)(void* customData, const CommandLine& args);
private:
struct Command {
CommandLine* args;
CommandFunction function;
void* customData = nullptr;
};
Map<String, Command> mCommands;
String mName = "InterpName";
public:
CmdLineInterpreter();
~CmdLineInterpreter();
void setName(const String& name) { mName = name; }
[[nodiscard]] const String& getName() const { return mName; }
void help(const CommandLine& args) const;
void addCommand(const String& id, CommandLine* args, CommandFunction function, void* customData = nullptr);
void run();
bool processCommand(int1* command);
};
}