Blamite Game Engine - blam!  00272.10.26.20.0001.blamite
The core library for the Blamite Game Engine.
version.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../console.h"
4 
7 #include "version_data.h"
8 
9 namespace Blam::Console
10 {
20  {
21  public:
23  {
24  name = "version";
25  description = "Show engine version information.";
26  aliases = { "ver" };
27 
29  }
30 
32  {
33  delete this;
34  }
35 
36  CommandStatus onCommand(std::vector<std::string> arguments)
37  {
39  Blam::Logger::LogEventForce("minor version 0 cache file language e", WSV_NONE);
40  Blam::Logger::LogEventForce("git commit " + std::string(CURRENT_COMMIT), WSV_NONE);
41  Blam::Logger::LogEventForce("the above message is a placeholder taken from halo 2 pc sapien editor", WSV_ERROR);
42 
43  return CommandStatus::Ok;
44  }
45  };
46 }
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:31
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:19
Blam::Console::VersionCommand::VersionCommand
VersionCommand()
Definition: version.hpp:22
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::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:150
Blam::Console::VersionCommand::onCommand
CommandStatus onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: version.hpp:36
Blam::Globals::Ok
@ Ok
The global was updated successfully.
Definition: globals.h:202