Blamite Game Engine - blam!  00296.01.12.21.0102.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 
12 namespace Blam
13 {
26  namespace Placeholders
27  {
31  struct Placeholder
32  {
33  std::string id;
34  std::string value_raw;
35  std::string value_parsed;
36  bool reserved;
38  };
39 
47  BLAM int LoadPlaceholders();
48 
54  BLAM int GetCount();
55 
62  BLAM Placeholder GetAt(int i);
63 
70  BLAM std::string ApplyPlaceholders(std::string string);
71  }
72 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:18
Blam::Placeholders::Placeholder::id
std::string id
The ID of the placeholder.
Definition: placeholders.h:33
Blam::Placeholders::Placeholder::value_parsed
std::string value_parsed
The value of the placeholder after having environment variables expanded.
Definition: placeholders.h:35
Blam::Placeholders::Placeholder::reserved
bool reserved
Whether or not the placeholder's value is reserved and unmodifiable.
Definition: placeholders.h:36
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:37
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::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:31
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:34