 |
Blamite Game Engine - Tool (Library)
A command-line utility that aids in the creation of Blamite Cache (.map) Files.
|
Go to the documentation of this file.
3 #include <Strings/components/logger/logger.h>
5 #include "../ToolCommand.hpp"
6 #include "../console.h"
8 #ifdef TOOL_LIB_EXPORTS
9 #define TOOL_LIB_API __declspec(dllexport)
11 #define TOOL_LIB_API __declspec(dllimport)
22 std::string app_name_label =
"tool";
28 syntax =
"help [command]";
29 description =
"shows a list of commands, or additional information for a specific command";
41 app_name_label = name;
44 int execute(std::vector<std::string> args)
50 BlamStrings::Logger::LogEvent(
"usage: " + app_name_label +
" verb <options..>");
52 for (
int i = 0; i <
commands.size(); i++)
54 BlamStrings::Logger::LogEvent(
" " +
commands.at(i)->GetSyntax());
57 BlamStrings::Logger::LogEvent(
"for additional information on a command, run '" + app_name_label +
" help <command>'");
63 for (
int i = 0; i <
commands.size(); i++)
65 if (
commands.at(i)->GetCommandName() == args.at(0))
74 BlamStrings::Logger::LogEvent(
"information for command: " + matching_command->
GetCommandName());
75 BlamStrings::Logger::LogEvent(
" description: " + matching_command->
GetDescription());
76 BlamStrings::Logger::LogEvent(
" usage: " + matching_command->
GetSyntax());
80 BlamStrings::Logger::LogEvent(
"command not found: '" + args.at(0) +
"', run '" + app_name_label +
" help' for a list of commands");
int execute(std::vector< std::string > args)
Executes the command.
Definition: HelpCommand.hpp:44
Class for the Help command.
Definition: HelpCommand.hpp:19
HelpCommand()
Definition: HelpCommand.hpp:25
void SetApplicationLabelName(std::string name)
Updates the application name label.
Definition: HelpCommand.hpp:39
#define TOOL_LIB_API
Definition: HelpCommand.hpp:11
std::vector< ToolCommand * > commands
Definition: console.cpp:26