MercuryThemeManager Class Reference

#include <MercuryTheme.h>

Collaboration diagram for MercuryThemeManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ~MercuryThemeManager ()
void ReloadAllThemes ()
bool GetMetric (const MString &sKey, const MString &sValue, MString &sData, int ttl=100)
MString GetMetricS (const MString &sKey, const MString &sValue, const MString &Default="")
int GetMetricI (const MString &sKey, const MString &sValue, int Default=0)
float GetMetricF (const MString &sKey, const MString &sValue, float Default=0)
bool GetMetricB (const MString &sKey, const MString &sValue, bool Default=false)
bool GetPathToFile (const MString &File, MString &Path)
MString GetPathToFile (const MString &Name)
MString GetPathToGraphic (const MString &Name)
MString GetPathToModel (const MString &Name)

Private Attributes

MVector< MercuryTheme > * m_vThemes

Detailed Description

Mercury Theme Manager - use this to obtain metrics and in-game data so that you don't have to hard code as much

Definition at line 30 of file MercuryTheme.h.


Constructor & Destructor Documentation

MercuryThemeManager::~MercuryThemeManager (  )  [inline]

Definition at line 33 of file MercuryTheme.h.


Member Function Documentation

void MercuryThemeManager::ReloadAllThemes (  ) 

Reload all themes in the order found in Mercury.ini, under section [Options], value Themes. The first theme is the primary in search order. The default theme should be last.

Definition at line 19 of file MercuryTheme.cpp.

bool MercuryThemeManager::GetMetric ( const MString sKey,
const MString sValue,
MString sData,
int  ttl = 100 
)

Get a specific metric value from metrics, it returns the data via sData, and returns true if the value was found, false otherwise.

Definition at line 39 of file MercuryTheme.cpp.

MString MercuryThemeManager::GetMetricS ( const MString sKey,
const MString sValue,
const MString Default = "" 
)

Get a specific value from metrics and return it as a string, using default as the default return

Definition at line 75 of file MercuryTheme.cpp.

int MercuryThemeManager::GetMetricI ( const MString sKey,
const MString sValue,
int  Default = 0 
)

Get a specific value from metrics and return it as a integer, using default as the default return

Definition at line 85 of file MercuryTheme.cpp.

float MercuryThemeManager::GetMetricF ( const MString sKey,
const MString sValue,
float  Default = 0 
)

Get a specific value from metrics and return it as a floating point number, using default as the default return

Definition at line 90 of file MercuryTheme.cpp.

bool MercuryThemeManager::GetMetricB ( const MString sKey,
const MString sValue,
bool  Default = false 
)

Get a specific value from metrics and return it as a boolean, using default as the default return

Definition at line 95 of file MercuryTheme.cpp.

bool MercuryThemeManager::GetPathToFile ( const MString File,
MString Path 
)

Get path to a file, in any theme. This will check to see if any of the themes have the file in order. If the file exists, it will put the path to the file (including the file) in Path and return true, else it will return false.

Definition at line 100 of file MercuryTheme.cpp.

MString MercuryThemeManager::GetPathToFile ( const MString Name  ) 

Get path to file in the File/ folder

Definition at line 119 of file MercuryTheme.cpp.

MString MercuryThemeManager::GetPathToGraphic ( const MString Name  ) 

Get the path to a specific graphic, check all themes for the graphic, and if none is found, return the path to the default missing image.

Definition at line 128 of file MercuryTheme.cpp.

MString MercuryThemeManager::GetPathToModel ( const MString Name  ) 

Get the path to a specific model, check all themes for the graphic, and if none is found, return the path to the default missing model.

Definition at line 140 of file MercuryTheme.cpp.


Member Data Documentation

MVector< MercuryTheme >* MercuryThemeManager::m_vThemes [private]

Definition at line 60 of file MercuryTheme.h.


The documentation for this class was generated from the following files:
Hosted by SourceForge.net Logo