Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

Labels Class Reference

Inheritance diagram for Labels:

Inheritance graph
[legend]
Collaboration diagram for Labels:

Collaboration graph
[legend]

Detailed Description

Loads localized labels.

Definition at line 13 of file Labels.h.

Public Member Functions

 Labels (const Path &source)
virtual ~Labels ()
void addLabel (const std::string &name, const std::string &lang, const std::string &text)
std::string getLabel (const std::string &name) const
std::string getFormatedLabel (const std::string &name, const StringTool::t_args &args) const


Constructor & Destructor Documentation

Labels::Labels const Path source  ) 
 

Definition at line 41 of file Labels.cpp.

00042 {
00043     m_labels = new ResDialogPack();
00044     m_script->registerFunc("label_text", script_label_text);
00045     scriptInclude(source);
00046 }

Labels::~Labels  )  [virtual]
 

Definition at line 48 of file Labels.cpp.

00049 {
00050     m_labels->removeAll();
00051     delete m_labels;
00052 }


Member Function Documentation

void Labels::addLabel const std::string &  name,
const std::string &  lang,
const std::string &  text
 

Definition at line 55 of file Labels.cpp.

00057 {
00058     m_labels->addRes(name, new Dialog(lang, "", text));
00059 }

std::string Labels::getFormatedLabel const std::string &  name,
const StringTool::t_args args
const
 

Definition at line 76 of file Labels.cpp.

00078 {
00079     std::string result;
00080     const Dialog *dialog = m_labels->findDialogHard(name);
00081     if (dialog) {
00082         result = dialog->getFormatedSubtitle(args);
00083     }
00084     else {
00085         result = "???";
00086     }
00087     return result;
00088 }

std::string Labels::getLabel const std::string &  name  )  const
 

Definition at line 62 of file Labels.cpp.

00063 {
00064     std::string result;
00065     const Dialog *dialog = m_labels->findDialogHard(name);
00066     if (dialog) {
00067         result = dialog->getSubtitle();
00068     }
00069     else {
00070         result = "???";
00071     }
00072     return result;
00073 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:55:31 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2