Elaztek Developer Hub
Blamite Game Engine - Strings  00386.06.16.23.0646.blamite
A library containing general purpose utilities and classes for use in multiple projects.
BlamStrings::Settings::Switches Namespace Reference

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

Functions

STRINGS_API void ParseSwitches (int args_count, char *args[])
 Parses command-line switches from the initial variables from main(). More...
 
STRINGS_API std::vector< BlamCommandSwitchGetActiveSwitches ()
 Retrieves the list of loaded command-line switches. More...
 
STRINGS_API bool IsSwitchPresent (std::string switch_name)
 Determines if a given switch has been passed to the engine. More...
 
STRINGS_API std::vector< std::string > GetSwitchArguments (std::string switch_name)
 Retrieves the list of arguments provided for the specified switch. More...
 
STRINGS_API std::string GetSwitchValue (std::string switch_name)
 Retrieves the value of a switch. More...
 

Detailed Description

Namespace containing things relating to command-line switches.

Command-line switches refer to arguments or values which are passed into the program at startup using the command line. For instance, you can start the game engine with the console enabled by using blamite.exe -console.

Function Documentation

◆ GetActiveSwitches()

std::vector< BlamCommandSwitch > BlamStrings::Settings::Switches::GetActiveSwitches ( )

Retrieves the list of loaded command-line switches.

Returns
A copy of the loaded command-line switches.

◆ GetSwitchArguments()

std::vector< std::string > BlamStrings::Settings::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 the - 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.
+ Here is the call graph for this function:

◆ GetSwitchValue()

std::string BlamStrings::Settings::Switches::GetSwitchValue ( std::string  switch_name)

Retrieves the value of a switch.

Parameters
switch_name- The name of the switch, without the - prefix.
Returns
The value of the switch. If the switch has no value attached to it, then an empty string is returned.
+ Here is the call graph for this function:

◆ IsSwitchPresent()

bool BlamStrings::Settings::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 the - prefix.
Returns
true if a switch is loaded, otherwise returns false.
+ Here is the call graph for this function:

◆ ParseSwitches()

void BlamStrings::Settings::Switches::ParseSwitches ( int  args_count,
char *  args[] 
)

Parses command-line switches from the initial variables from main().

Parameters
args_count- Number of command line arguments provided.
args- Array containing the command line arguments.
+ Here is the call graph for this function: