Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
Blam::Placeholders Namespace Reference

Namespace containing things related to the Placeholders system. More...

Classes

struct  Placeholder
 Structure to contain Placeholder data. More...
 

Functions

BLAM int LoadPlaceholders ()
 Load placeholder data from placeholders.xml. More...
 
BLAM int GetCount ()
 Retrieves the amount of placeholders loaded. More...
 
BLAM Placeholder GetAt (int i)
 Retrieves the placeholder at the specified index. More...
 
BLAM std::string ApplyPlaceholders (std::string string)
 Replaces any and all placeholder tags in the specified string with their evaulated values. More...
 

Detailed Description

Namespace containing things related to the Placeholders system.

Placeholders are a way to store reusable values from a file. You might be thinking, "gee mr halo man that sounds a lot like engine globals" - and while that is true, these aren't meant to be used as part of game scripting. For now.

Currently, it's main purpose is to allow configuration files to reference environment variables from within Windows. Future possibile expansions could include things like:

  • Accessing data from the Registry
  • Reading file contents

Function Documentation

◆ ApplyPlaceholders()

std::string Blam::Placeholders::ApplyPlaceholders ( std::string  string)

Replaces any and all placeholder tags in the specified string with their evaulated values.

Returns
The string with expanded placeholders.

◆ GetAt()

Blam::Placeholders::Placeholder Blam::Placeholders::GetAt ( int  i)

Retrieves the placeholder at the specified index.

Can be used in conjunction with Blam::Placeholders::GetCount in a for loop.

Returns
The placeholder at the specified index.

◆ GetCount()

int Blam::Placeholders::GetCount ( )

Retrieves the amount of placeholders loaded.

Returns
The number of loaded placeholders

◆ LoadPlaceholders()

int Blam::Placeholders::LoadPlaceholders ( )

Load placeholder data from placeholders.xml.

Returns
0
Todo:
Make the return code useful or change return type to void.