Definition at line 14 of file ResDialogPack.h.
Public Member Functions | |
virtual const char * | getName () const |
const Dialog * | findDialogHard (const std::string &name) |
Try find dialog for current lang or default lang. | |
const Dialog * | findDialogSpeech (const std::string &name) |
Try find dialog for lang=speech or default lang. | |
Protected Member Functions | |
virtual void | unloadRes (Dialog *res) |
|
Try find dialog for current lang or default lang.
Definition at line 77 of file ResDialogPack.cpp. 00078 { 00079 std::string lang = OptionAgent::agent()->getParam("lang"); 00080 const Dialog *dialog = findDialog(name, lang); 00081 if (NULL == dialog) { 00082 dialog = findDialog(name, Dialog::DEFAULT_LANG); 00083 if (NULL == dialog) { 00084 LOG_WARNING(ExInfo("cannot find dialog") 00085 .addInfo("name", name) 00086 .addInfo("lang", lang) 00087 .addInfo("pack", toString())); 00088 } 00089 } 00090 00091 return dialog; 00092 }
|
|
Try find dialog for lang=speech or default lang.
Definition at line 99 of file ResDialogPack.cpp. 00100 { 00101 std::string speech = OptionAgent::agent()->getParam("speech", 00102 OptionAgent::agent()->getParam("lang")); 00103 const Dialog *dialog = findDialog(name, speech); 00104 if (NULL == dialog || dialog->isSpeechless()) { 00105 dialog = findDialog(name, Dialog::DEFAULT_LANG); 00106 if (NULL == dialog) { 00107 LOG_WARNING(ExInfo("cannot find speech") 00108 .addInfo("name", name) 00109 .addInfo("speech", speech) 00110 .addInfo("pack", toString())); 00111 } 00112 } 00113 00114 return dialog; 00115 }
|
|
Implements INamed. Definition at line 23 of file ResDialogPack.h. 00023 { return "dialog_pack"; }
|
|
Implements ResourcePack< Dialog * >. Definition at line 18 of file ResDialogPack.cpp. 00019 {
00020 delete res;
00021 }
|