xoreos
0.0.5
|
The global Aurora talk manager, holding the current talk tables. More...
#include <talkman.h>
Classes | |
class | Change |
struct | Table |
Public Member Functions | |
TalkManager () | |
~TalkManager () | |
void | clear () |
void | addTable (const Common::UString &nameMale, const Common::UString &nameFemale, bool isAlt, uint32 priority, Common::ChangeID *changeID=0) |
Add a talk table to the talk manager. More... | |
void | removeTable (Common::ChangeID &changeID) |
Remove a talk table from the talk manager again. More... | |
const Common::UString & | getString (uint32 strRef, LanguageGender gender=kLanguageGenderCurrent) |
const Common::UString & | getSoundResRef (uint32 strRef, LanguageGender gender=kLanguageGenderCurrent) |
Private Types | |
typedef std::list< Table > | Tables |
Private Member Functions | |
void | deleteTable (Table &table) |
const TalkTable * | find (uint32 strRef, LanguageGender gender) const |
const TalkTable * | find (const Tables &tables, uint32 strRef, LanguageGender gender) const |
Private Attributes | |
Tables | _tablesMain |
Tables | _tablesAlt |
Additional Inherited Members | |
Static Public Member Functions inherited from Common::Singleton< TalkManager > | |
static TalkManager & | instance () |
static void | destroy () |
Protected Types inherited from Common::Singleton< TalkManager > | |
typedef TalkManager | SingletonBaseType |
Protected Member Functions inherited from Common::Singleton< TalkManager > | |
Singleton () | |
virtual | ~Singleton () |
The global Aurora talk manager, holding the current talk tables.
|
private |
Aurora::TalkManager::TalkManager | ( | ) |
Definition at line 40 of file talkman.cpp.
Aurora::TalkManager::~TalkManager | ( | ) |
Definition at line 43 of file talkman.cpp.
References clear().
void Aurora::TalkManager::addTable | ( | const Common::UString & | nameMale, |
const Common::UString & | nameFemale, | ||
bool | isAlt, | ||
uint32 | priority, | ||
Common::ChangeID * | changeID = 0 |
||
) |
Add a talk table to the talk manager.
nameMale | Resource name of the male version. |
nameFemale | Resource name of the female version. |
isAlt | Is this an "alternate" talk table instead of a main one? |
priority | The priority this talk table has over other tables. |
changeID | If given, record the collective changes done here. |
Definition at line 78 of file talkman.cpp.
References _tablesAlt, _tablesMain, Common::UString::c_str(), Common::generateIDNumber(), LangMan, Aurora::loadTables(), and Common::ChangeID::setContent().
void Aurora::TalkManager::clear | ( | ) |
Definition at line 47 of file talkman.cpp.
References _tablesAlt, _tablesMain, and deleteTable().
Referenced by ~TalkManager().
|
private |
Definition at line 100 of file talkman.cpp.
References Aurora::TalkManager::Table::tableFemale, and Aurora::TalkManager::Table::tableMale.
Referenced by clear(), and removeTable().
|
private |
Definition at line 177 of file talkman.cpp.
References _tablesAlt, and _tablesMain.
Referenced by getSoundResRef(), and getString().
|
private |
Definition at line 158 of file talkman.cpp.
References Aurora::kLanguageGenderFemale.
const Common::UString & Aurora::TalkManager::getSoundResRef | ( | uint32 | strRef, |
LanguageGender | gender = kLanguageGenderCurrent |
||
) |
Definition at line 144 of file talkman.cpp.
References find(), Aurora::TalkTable::getSoundResRef(), Aurora::kEmptyString, Aurora::kLanguageGenderCurrent, Aurora::kStrRefInvalid, and LangMan.
const Common::UString & Aurora::TalkManager::getString | ( | uint32 | strRef, |
LanguageGender | gender = kLanguageGenderCurrent |
||
) |
Definition at line 130 of file talkman.cpp.
References find(), Aurora::TalkTable::getString(), Aurora::kEmptyString, Aurora::kLanguageGenderCurrent, Aurora::kStrRefInvalid, and LangMan.
void Aurora::TalkManager::removeTable | ( | Common::ChangeID & | changeID | ) |
Remove a talk table from the talk manager again.
Definition at line 108 of file talkman.cpp.
References Aurora::TalkManager::Change::_id, Aurora::TalkManager::Change::_isAlt, _tablesAlt, _tablesMain, Common::ChangeID::clear(), deleteTable(), and Common::ChangeID::getContent().
|
private |
Definition at line 99 of file talkman.h.
Referenced by addTable(), clear(), find(), and removeTable().
|
private |
Definition at line 98 of file talkman.h.
Referenced by addTable(), clear(), find(), and removeTable().