Elaztek Developer Hub
Blamite Game Engine - Strings  00367.02.08.23.1815.blamite
A library containing general purpose utilities and classes for use in multiple projects.
switches.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 
6 #ifdef STRINGS_EXPORTS
7 #define STRINGS_API __declspec(dllexport)
8 #else
9 #define STRINGS_API __declspec(dllimport)
10 #endif
11 
24 {
25  std::string name = "unknown";
26  std::string value = "";
27 };
28 
37 {
44  STRINGS_API void ParseSwitches(int args_count, char* args[]);
45 
51  STRINGS_API std::vector<BlamCommandSwitch> GetActiveSwitches();
52 
60  STRINGS_API bool IsSwitchPresent(std::string switch_name);
61 
71  STRINGS_API std::vector<std::string> GetSwitchArguments(std::string switch_name);
72 
81  STRINGS_API std::string GetSwitchValue(std::string switch_name);
82 }
BlamCommandSwitch
Structure representing a command-line switch.
Definition: switches.h:23
BlamStrings::Settings::Switches::ParseSwitches
STRINGS_API void ParseSwitches(int args_count, char *args[])
Parses command-line switches from the initial variables from main().
Definition: switches.cpp:8
BlamStrings::Settings::Switches::GetActiveSwitches
STRINGS_API std::vector< BlamCommandSwitch > GetActiveSwitches()
Retrieves the list of loaded command-line switches.
Definition: switches.cpp:63
BlamStrings::Settings::Switches::GetSwitchArguments
STRINGS_API std::vector< std::string > GetSwitchArguments(std::string switch_name)
Retrieves the list of arguments provided for the specified switch.
Definition: switches.cpp:85
BlamCommandSwitch::value
std::string value
The value provided to the switch. Will be an empty string if no value was provided.
Definition: switches.h:26
BlamCommandSwitch::name
std::string name
The name of the switch, excluding the - prefix.
Definition: switches.h:25
BlamStrings::Settings::Switches
Namespace containing things relating to command-line switches.
Definition: switches.h:36
BlamStrings::Settings::Switches::IsSwitchPresent
STRINGS_API bool IsSwitchPresent(std::string switch_name)
Determines if a given switch has been passed to the engine.
Definition: switches.cpp:68
STRINGS_API
#define STRINGS_API
Definition: switches.h:9
BlamStrings::Settings::Switches::GetSwitchValue
STRINGS_API std::string GetSwitchValue(std::string switch_name)
Retrieves the value of a switch.
Definition: switches.cpp:106