Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
placeholders.h
Go to the documentation of this file.
1 #pragma once
2 
3 //external includes
4 #include <string>
5 
6 #define PLACEHOLDERS_FILE_NAME "placeholders.xml"
7 
8 #ifndef BLAM
9 #define BLAM
10 #endif
11 
29 {
33  struct Placeholder
34  {
35  std::string id = "";
36  std::string value_raw = "";
37  std::string value_parsed = "";
38  bool reserved = false;
39  bool parse_env_var = false;
40  };
41 
49  BLAM int LoadPlaceholders();
50 
56  BLAM int GetCount();
57 
64  BLAM Placeholder GetAt(int i);
65 
72  BLAM std::string ApplyPlaceholders(std::string string);
73 }
Blam::Placeholders::Placeholder::value_parsed
std::string value_parsed
The value of the placeholder after having environment variables expanded.
Definition: placeholders.h:37
Blam::Placeholders::Placeholder::reserved
bool reserved
Whether or not the placeholder's value is reserved and unmodifiable.
Definition: placeholders.h:38
BLAM
#define BLAM
Definition: placeholders.h:9
Blam::Placeholders::Placeholder::parse_env_var
bool parse_env_var
Whether or not to parse environment variables from the placeholder.
Definition: placeholders.h:39
Blam::Placeholders::ApplyPlaceholders
BLAM std::string ApplyPlaceholders(std::string string)
Replaces any and all placeholder tags in the specified string with their evaulated values.
Definition: placeholders.cpp:22
Blam::Placeholders
Namespace containing things related to the Placeholders system.
Definition: placeholders.h:28
Blam::Placeholders::GetAt
BLAM Placeholder GetAt(int i)
Retrieves the placeholder at the specified index.
Definition: placeholders.cpp:43
Blam::Placeholders::LoadPlaceholders
BLAM int LoadPlaceholders()
Load placeholder data from placeholders.xml.
Definition: placeholders.cpp:67
Blam::Placeholders::Placeholder
Structure to contain Placeholder data.
Definition: placeholders.h:33
Blam::Placeholders::GetCount
BLAM int GetCount()
Retrieves the amount of placeholders loaded.
Definition: placeholders.cpp:38
Blam::Placeholders::Placeholder::value_raw
std::string value_raw
The raw value of the placeholder.
Definition: placeholders.h:36