Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
console.h File Reference
#include <string>
#include <map>
#include <vector>
#include <Windows.h>

Go to the source code of this file.

Classes

struct  BlamConsoleCommand
 Class used to represent a console command. More...
 

Namespaces

 Blam
 Namespace surrounding all major engine components.
 
 Blam::Resources
 
 Blam::Resources::Console
 Namespace for things relating to the debug console.
 
 Blam::Resources::Console::Handlers
 Functions used to handle multiple commands that have similar behavior.
 

Macros

#define CMD_OK   BlamCommandResult::Ok;
 Macro for OK command status. See #Blam::Resources::Console::Ok for more details. More...
 
#define CMD_ERR_INVALID_ARGS   BlamCommandResult::InvalidArguments;
 Macro for Invalid Args command status. See #Blam::Resources::Console::InvalidArguments for more details. More...
 
#define CMD_ERR_WRONG_ARGS_COUNT   BlamCommandResult::WrongArgumentCount;
 Macro for Wrong Arg Count command status. See #Blam::Resources::Console::WrongArgumentCount for more details. More...
 
#define BLAM
 

Enumerations

enum  BlamCommandResult { BlamCommandResult::Ok, BlamCommandResult::InvalidArguments, BlamCommandResult::WrongArgumentCount, BlamCommandResult::Unsupported }
 Indicates the return state of a console command. More...
 
enum  BlamCommandType { BlamCommandType::Builtin, BlamCommandType::Script, BlamCommandType::Global, BlamCommandType::Other }
 Used to indicate the type of command. More...
 

Functions

BLAM BlamCommandResult Blam::Resources::Console::Handlers::BooleanHandler (bool *value, std::vector< std::string > arguments, BlamConsoleCommand *command)
 Handler for boolean commands. More...
 
BLAM std::string Blam::Resources::Console::RegisterCommand (BlamConsoleCommand *command)
 Register a new command object. More...
 
BLAM void Blam::Resources::Console::UnregisterCommand (std::string name)
 Unregisters the console command with the specified name. More...
 
BLAM BlamConsoleCommandBlam::Resources::Console::GetCommand (std::string name)
 Retrieves a command with the specified name. More...
 
BLAM HRESULT Blam::Resources::Console::RunCommandLine (std::string command_line)
 Executed the provided string as a console command. More...
 
BLAM std::map< std::string, BlamConsoleCommand * > Blam::Resources::Console::GetCommandList ()
 Retrieves the list of all loaded console commands. More...
 
BLAM void Blam::Resources::Console::RegisterBuiltinCommands ()
 Registers all hard-coded engine commands. More...
 
BLAM void Blam::Resources::Console::Cleanup ()
 Cleans up all console command data. More...
 

Macro Definition Documentation

◆ BLAM

#define BLAM

◆ CMD_ERR_INVALID_ARGS

#define CMD_ERR_INVALID_ARGS   BlamCommandResult::InvalidArguments;

Macro for Invalid Args command status. See #Blam::Resources::Console::InvalidArguments for more details.

◆ CMD_ERR_WRONG_ARGS_COUNT

#define CMD_ERR_WRONG_ARGS_COUNT   BlamCommandResult::WrongArgumentCount;

Macro for Wrong Arg Count command status. See #Blam::Resources::Console::WrongArgumentCount for more details.

◆ CMD_OK

#define CMD_OK   BlamCommandResult::Ok;

Macro for OK command status. See #Blam::Resources::Console::Ok for more details.

Enumeration Type Documentation

◆ BlamCommandResult

enum BlamCommandResult
strong

Indicates the return state of a console command.

Since we aren't able to properly define HRESULTS that compile with Message Compiler (mc.exe), we are left with this hacky thing. I mean - it works, right?

Enumerator
Ok 

The command was run without error.

InvalidArguments 

Invalid arguments (or argument types) were specified - such as providing a string in place of an int.

WrongArgumentCount 

Too few or too many arguments were provided.

Unsupported 

The command is a legacy command from the original ImGUI-based console that is no longer supported.

◆ BlamCommandType

enum BlamCommandType
strong

Used to indicate the type of command.

Enumerator
Builtin 

A command that is hard-coded into the engine.

Script 

A command that originates from a BlamScript.

Global 

A command that is used to modify a global.

Deprecated:
No longer serves any use as globals can be modified in console without any extra functionality. Will be removed in the future.
Other 

Currently unused.