Blamite Game Engine - Blam (Core)
version.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../console.h"
5 #include "version_data.h"
7 
8 namespace Blam::Console
9 {
19  {
20  public:
22  {
23  name = "version";
24  description = "Show engine version information.";
25  aliases = { "ver" };
26 
28  }
29 
31  {
32  delete this;
33  }
34 
35  CommandStatus onCommand(std::vector<std::string> arguments)
36  {
38  Blam::Logger::LogEventForce("minor version 0 cache file language e", WSV_NONE);
39  Blam::Logger::LogEventForce("git commit " + std::string(CURRENT_COMMIT), WSV_NONE);
40  Blam::Logger::LogEventForce("the above message is a placeholder taken from halo 2 pc sapien editor", WSV_ERROR);
41 
42  return CommandStatus::Ok;
43  }
44  };
45 }
Blam::Console::ConsoleCommand::aliases
std::vector< std::string > aliases
A list of aliases for the command. Executing any of these instead of the command name will behave the...
Definition: console.h:75
Blam::Console::ConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:73
Blam::Console::ConsoleCommand::type
CommandType type
The type of command this is. See Blam::Console::CommandType for more information.
Definition: console.h:77
Blam::Console::CommandStatus
CommandStatus
Indicates the return state of a console command.
Definition: console.h:28
logger.h
Blam::Console::VersionCommand::~VersionCommand
~VersionCommand()
Definition: version.hpp:30
version_data.h
Console
@ Console
Console widget.
Definition: render_stack.h:77
Blam::Console::Builtin
@ Builtin
A command that is hard-coded into the engine.
Definition: console.h:41
Blam::Console::ConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:70
WSV_ERROR
#define WSV_ERROR
Macro for 'Error' log seveirty. Original pre-enum value was 2.
Definition: logger.h:17
Blam::Console::VersionCommand
Class for the version command.
Definition: version.hpp:18
Blam::Console::VersionCommand::VersionCommand
VersionCommand()
Definition: version.hpp:21
WSV_NONE
#define WSV_NONE
Macro for 'None' log seveirty. Original pre-enum value was 0.
Definition: logger.h:15
CURRENT_COMMIT
#define CURRENT_COMMIT
Definition: version_data.h:14
Blam::EngineDefs::GetVersionBuildString
BLAM std::string GetVersionBuildString(VersionStringDisplayMode display_mode)
Retrieves the build string of the engine.
Definition: engine_definitions.cpp:11
engine_definitions.h
Blam::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5
Blam::Console::Ok
@ Ok
The command was run without error.
Definition: console.h:30
Blam::Console::ConsoleCommand
Class used to represent a console command.
Definition: console.h:50
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message, LogSeverity severity)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:137
Blam::Console::VersionCommand::onCommand
CommandStatus onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: version.hpp:35