Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
switches.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 
6 #ifndef BLAM
7 #define BLAM
8 #endif
9 
10 namespace Blam
11 {
15  namespace Switches
16  {
29  {
30  std::string name;
31  std::vector<std::string> options;
32  };
33 
40  BLAM void LoadSwitches(int args_count, char* args[]);
41 
47  BLAM std::vector<CommandSwitch> GetActiveSwitches();
48 
56  BLAM bool IsSwitchPresent(std::string switch_name);
57 
67  BLAM std::vector<std::string> GetSwitchArguments(std::string switch_name);
68  }
69 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:18
Blam::Switches::GetSwitchArguments
BLAM std::vector< std::string > GetSwitchArguments(std::string switch_name)
Retrieves the list of arguments provided for the specified switch.
Definition: switches.cpp:77
Blam::Switches::GetActiveSwitches
BLAM std::vector< CommandSwitch > GetActiveSwitches()
Retrieves the list of loaded command-line switches.
Definition: switches.cpp:55
Blam::Switches::CommandSwitch
Structure representing a command-line switch.
Definition: switches.h:28
Blam::Switches::IsSwitchPresent
BLAM bool IsSwitchPresent(std::string switch_name)
Determines if a given switch has been passed to the engine.
Definition: switches.cpp:60
BLAM
#define BLAM
Definition: switches.h:7
Blam::Switches::CommandSwitch::options
std::vector< std::string > options
Any arguments passed to the switch. Will be empty if no arguments were provided.
Definition: switches.h:31
Blam::Switches::LoadSwitches
BLAM void LoadSwitches(int args_count, char *args[])
Interpret command line switches from application command line.
Definition: switches.cpp:10
Blam::Switches::CommandSwitch::name
std::string name
The name of the switch, excluding the - prefix.
Definition: switches.h:30