TEXTRES Class Reference

Class for text resource lookup. More...

#include <mi32/textres.h>

List of all members.

Static Public Member Functions

static ERRVALUE AddFile (const FILEPATH &filepath)
static MISTRING GetString (const char *name, TEXTRES_NAMESET nameset, bool UseNameIfNotFound)
static MISTRING GetString (const char *name, TEXTRES_NAMESET nameset=TEXTRES_NAMESET_General)
static MISTRING GetString (int num)
static bool HasEntry (const char *name, TEXTRES_NAMESET nameset=TEXTRES_NAMESET_General)
static bool Initialize (bool AllowReplace=false)
static ERRVALUE LoadX (void(*PutResFunc)(void *, const char *), void *PutResData)
static void Terminate ()
static ERRVALUE ValidateFile (const FILEPATH &filepath)

Detailed Description

Class for text resource lookup.


Member Function Documentation

static ERRVALUE TEXTRES::AddFile ( const FILEPATH filepath  )  [static]

Add specified file to text resource set.

Parameters:
filepath Path to file, must be in proper XML or binary format
static MISTRING TEXTRES::GetString ( const char *  name,
TEXTRES_NAMESET  nameset,
bool  UseNameIfNotFound 
) [static]

Get text string using name.

Returns:
String.
Parameters:
name Item name
UseNameIfNotFound Return specified name if not found
static MISTRING TEXTRES::GetString ( const char *  name,
TEXTRES_NAMESET  nameset = TEXTRES_NAMESET_General 
) [static]

Get text string using name.

Returns:
String, will be "Unknown text item 'name'" if not found.
Parameters:
name Item name
static MISTRING TEXTRES::GetString ( int  num  )  [static]

Get text string using number (TEXTID, HELPID or ERRVALUE).

If number has no associated text returned string will be blank if number is positive or "Unknown error [number]" if negative.

Returns:
String.
Parameters:
num TEXTID, HELPID or ERRVALUE
static bool TEXTRES::HasEntry ( const char *  name,
TEXTRES_NAMESET  nameset = TEXTRES_NAMESET_General 
) [static]

Determine if entry exists for specified name.

Returns:
true if entry exists, false if not.
Parameters:
name Item name
static bool TEXTRES::Initialize ( bool  AllowReplace = false  )  [static]

Initialize text resource system.

Normally called by application startup code. Must be called before using other TEXTRES methods.

Returns:
true if successful, false if not.
Parameters:
AllowReplace Allow file to be replaced while process running
static ERRVALUE TEXTRES::LoadX ( void(*)(void *, const char *)  PutResFunc,
void *  PutResData 
) [static]

Load X resources.

Parameters:
PutResFunc Function to call to 'put' single X resource line (usually XrmPutLineResource)
PutResData Data to pass to function (usually pointer to X resource database)
static void TEXTRES::Terminate (  )  [static]

Terminate text resource system.

Normally called by application termination code.

static ERRVALUE TEXTRES::ValidateFile ( const FILEPATH filepath  )  [static]

Validate specified file.

Parameters:
filepath Path to file

The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:33:54 2012 for TNTsdk 2012 by  doxygen 1.6.1