Elaztek Developer Hub
Blamite Game Engine - Tool (Library)
A command-line utility that aids in the creation of Blamite Cache (.map) Files.
ToolCommand.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 
6 #ifdef TOOL_LIB_EXPORTS
7 #define TOOL_LIB_API __declspec(dllexport)
8 #else
9 #define TOOL_LIB_API __declspec(dllimport)
10 #endif
11 
16 {
17 protected:
18  std::string command = "";
19  std::string syntax = "";
20  std::string description = "";
21 
22 public:
23 
29  std::string GetCommandName()
30  {
31  return command;
32  }
33 
39  std::string GetSyntax()
40  {
41  return syntax;
42  }
43 
49  std::string GetDescription()
50  {
51  return description;
52  }
53 
62  virtual int execute(std::vector<std::string> args) { return 1; }
63 };
ToolCommand::GetSyntax
std::string GetSyntax()
Retrieves the syntax of the command.
Definition: ToolCommand.hpp:39
ToolCommand::GetCommandName
std::string GetCommandName()
Retrieves the name of the command.
Definition: ToolCommand.hpp:29
ToolCommand::execute
virtual int execute(std::vector< std::string > args)
Executes the command.
Definition: ToolCommand.hpp:62
ToolCommand::GetDescription
std::string GetDescription()
Retrieves the description of the command.
Definition: ToolCommand.hpp:49
TOOL_LIB_API
#define TOOL_LIB_API
Definition: ToolCommand.hpp:9
ToolCommand
Base class representing a Tool command.
Definition: ToolCommand.hpp:15