Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

language.cpp File Reference


Classes

struct  TextNode

Functions

void AddText (char *)
void ClearList ()
char * ctrl_gettext (const char *tag)
void LanguageXMLclose ()
void LanguageXMLend ()
int LanguageXMLfile (const char *)
void LanguageXMLinit ()
void LanguageXMLload ()
int SetValueXML (char **dest, const char *tag)
const char * textmangler (const char *)

Variables

const char * LanguageXMLAbout_Text
const char * LanguageXMLCannot_Connect
const char * LanguageXMLConnect_Server
const char * LanguageXMLDownload_Config
const char * LanguageXMLDownload_Failed
const char * LanguageXMLEnter_Default
const char * LanguageXMLEnter_Extension
const char * LanguageXMLEnter_Host
const char * LanguageXMLEnter_Ip
const char * LanguageXMLEnter_MIME
const char * LanguageXMLEnter_Name
const char * LanguageXMLKill_All
const char * LanguageXMLLast_Change
const char * LanguageXMLLogin_Failed
const char * LanguageXMLNo
const char * LanguageXMLNot_Found
const char * LanguageXMLNot_Save
const char * LanguageXMLReboot_Failed
const char * LanguageXMLReload_Prev
const char * LanguageXMLSend_Config
const char * LanguageXMLServer_Closed
const char * LanguageXMLUpload_Failed
const char * LanguageXMLYes
bool loaded = false
bool loadok = true
TextNodeTextList = NULL
XmlParser xmlFile

Function Documentation

void AddText char *  val  )  [static]
 

Add the ptr to the list for latter deletetion.

void ClearList  )  [static]
 

Delete all alcotatied memory.

char* ctrl_gettext const char *  tag  ) 
 

The do all function for translation. This automaticaly loads the correct language file on the first call. The tag is the english string that is mangled to an xml tag that is used to return the translated vr using the XmlParser class.

void LanguageXMLclose  ) 
 

Close the xml file. This is called before LanguageEnd at the end of the program.

void LanguageXMLend  ) 
 

The cleanup function. This function should be called before exiting the program.

int LanguageXMLfile const char *  filename  )  [static]
 

Load the xml file and set const pointers.

void LanguageXMLinit  ) 
 

Initilize pointers and logic values.

void LanguageXMLload  )  [static]
 

The *hack* to load the correct xml file. This looks for the myserver.xml file and grabs the name of the lanugage file. Then it tries to load that file in the default locations.

int SetValueXML char **  dest,
const char *  tag
[static]
 

Internal function to automaticaly free memory when seting to a new value.

const char * textmangler const char *  Bufferin  )  [static]
 

Convert text into a xml tag. This mangles the english text to make an xml tag. Bufferin is the english string and returns a pointer to an internal string of the xml tag. This uses the frist 20 chars of bufferin with letters to upper case and nonletters to underscore (_).


Variable Documentation

const char* LanguageXMLAbout_Text
 

const char* LanguageXMLCannot_Connect
 

const char* LanguageXMLConnect_Server
 

const char* LanguageXMLDownload_Config
 

const char* LanguageXMLDownload_Failed
 

const char* LanguageXMLEnter_Default
 

const char* LanguageXMLEnter_Extension
 

const char* LanguageXMLEnter_Host
 

const char* LanguageXMLEnter_Ip
 

const char* LanguageXMLEnter_MIME
 

const char* LanguageXMLEnter_Name
 

const char* LanguageXMLKill_All
 

const char* LanguageXMLLast_Change
 

const char* LanguageXMLLogin_Failed
 

const char* LanguageXMLNo
 

const char* LanguageXMLNot_Found
 

const char* LanguageXMLNot_Save
 

const char* LanguageXMLReboot_Failed
 

const char* LanguageXMLReload_Prev
 

const char* LanguageXMLSend_Config
 

const char* LanguageXMLServer_Closed
 

const char* LanguageXMLUpload_Failed
 

const char* LanguageXMLYes
 

bool loaded = false [static]
 

bool loadok = true [static]
 

TextNode* TextList = NULL [static]
 

XmlParser xmlFile [static]
 


Generated on Thu May 1 12:40:59 2008 for MyServer by  doxygen 1.3.9.1