 |
Blamite Game Engine - Tool (Library)
00368.02.12.23.1347.blamite
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)
17 std::string app_name_label =
"tool";
24 syntax =
"help [command]";
25 description =
"shows a list of commands, or additional information for a specific command";
30 app_name_label = name;
33 int execute(std::vector<std::string> args)
39 BlamStrings::Logger::LogEvent(
"usage: " + app_name_label +
" verb <options..>");
41 for (
int i = 0; i <
commands.size(); i++)
43 BlamStrings::Logger::LogEvent(
" " +
commands.at(i)->GetSyntax());
46 BlamStrings::Logger::LogEvent(
"for additional information on a command, run '" + app_name_label +
" help <command>'");
52 for (
int i = 0; i <
commands.size(); i++)
54 if (
commands.at(i)->GetCommandName() == args.at(0))
63 BlamStrings::Logger::LogEvent(
"information for command: " + matching_command->
GetCommandName());
64 BlamStrings::Logger::LogEvent(
" description: " + matching_command->
GetDescription());
65 BlamStrings::Logger::LogEvent(
" usage: " + matching_command->
GetSyntax());
69 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)
Definition: HelpCommand.hpp:33
Definition: HelpCommand.hpp:14
HelpCommand()
Definition: HelpCommand.hpp:21
void SetApplicationLabelName(std::string name)
Definition: HelpCommand.hpp:28
#define TOOL_LIB_API
Definition: HelpCommand.hpp:11
std::vector< ToolCommand * > commands
Definition: console.cpp:13