Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
Blam::Switches Namespace Reference

Namespace containing things relating to command-line switches. More...

Classes

struct  CommandSwitch
 Structure representing a command-line switch. More...
 

Functions

BLAM void LoadSwitches (int args_count, char *args[])
 Interpret command line switches from application command line. More...
 
BLAM std::vector< CommandSwitchGetActiveSwitches ()
 Retrieves the list of loaded command-line switches. More...
 
BLAM bool IsSwitchPresent (std::string switch_name)
 Determines if a given switch has been passed to the engine. More...
 
BLAM std::vector< std::string > GetSwitchArguments (std::string switch_name)
 Retrieves the list of arguments provided for the specified switch. More...
 

Detailed Description

Namespace containing things relating to command-line switches.

Function Documentation

◆ GetActiveSwitches()

std::vector< CommandSwitch > Blam::Switches::GetActiveSwitches ( )

Retrieves the list of loaded command-line switches.

Returns
A copy of the loaded command-line switches.

◆ GetSwitchArguments()

std::vector< std::string > Blam::Switches::GetSwitchArguments ( std::string  switch_name)

Retrieves the list of arguments provided for the specified switch.

Parameters
switch_name- The name of the switch, without - prefix.
Returns
The list of arguments for the switch, or returns an empty list if the specified switch has no arguments or wasn't passed. You probably want to use Blam::Switches::IsSwitchPresent first.

◆ IsSwitchPresent()

bool Blam::Switches::IsSwitchPresent ( std::string  switch_name)

Determines if a given switch has been passed to the engine.

Parameters
switch_name- The name of the switch, without - prefix.
Returns
True if a switch is loaded, otherwise returns False.

◆ LoadSwitches()

void Blam::Switches::LoadSwitches ( int  args_count,
char *  args[] 
)

Interpret command line switches from application command line.

Parameters
args_count- Number of command line arguments provided.
args- Array containing the command line arguments.