xoreos  0.0.5
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Aurora::TalkManager Class Reference

The global Aurora talk manager, holding the current talk tables. More...

#include <talkman.h>

Inheritance diagram for Aurora::TalkManager:
Inheritance graph
[legend]
Collaboration diagram for Aurora::TalkManager:
Collaboration graph
[legend]

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::UStringgetString (uint32 strRef, LanguageGender gender=kLanguageGenderCurrent)
 
const Common::UStringgetSoundResRef (uint32 strRef, LanguageGender gender=kLanguageGenderCurrent)
 

Private Types

typedef std::list< TableTables
 

Private Member Functions

void deleteTable (Table &table)
 
const TalkTablefind (uint32 strRef, LanguageGender gender) const
 
const TalkTablefind (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 ()
 

Detailed Description

The global Aurora talk manager, holding the current talk tables.

Definition at line 42 of file talkman.h.

Member Typedef Documentation

◆ Tables

typedef std::list<Table> Aurora::TalkManager::Tables
private

Definition at line 95 of file talkman.h.

Constructor & Destructor Documentation

◆ TalkManager()

Aurora::TalkManager::TalkManager ( )

Definition at line 40 of file talkman.cpp.

◆ ~TalkManager()

Aurora::TalkManager::~TalkManager ( )

Definition at line 43 of file talkman.cpp.

References clear().

Here is the call graph for this function:

Member Function Documentation

◆ addTable()

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.

Parameters
nameMaleResource name of the male version.
nameFemaleResource name of the female version.
isAltIs this an "alternate" talk table instead of a main one?
priorityThe priority this talk table has over other tables.
changeIDIf 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().

Here is the call graph for this function:

◆ clear()

void Aurora::TalkManager::clear ( )

Definition at line 47 of file talkman.cpp.

References _tablesAlt, _tablesMain, and deleteTable().

Referenced by ~TalkManager().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteTable()

void Aurora::TalkManager::deleteTable ( Table table)
private

Definition at line 100 of file talkman.cpp.

References Aurora::TalkManager::Table::tableFemale, and Aurora::TalkManager::Table::tableMale.

Referenced by clear(), and removeTable().

Here is the caller graph for this function:

◆ find() [1/2]

const TalkTable * Aurora::TalkManager::find ( uint32  strRef,
LanguageGender  gender 
) const
private

Definition at line 177 of file talkman.cpp.

References _tablesAlt, and _tablesMain.

Referenced by getSoundResRef(), and getString().

Here is the caller graph for this function:

◆ find() [2/2]

const TalkTable * Aurora::TalkManager::find ( const Tables tables,
uint32  strRef,
LanguageGender  gender 
) const
private

Definition at line 158 of file talkman.cpp.

References Aurora::kLanguageGenderFemale.

◆ getSoundResRef()

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.

Here is the call graph for this function:

◆ getString()

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.

Here is the call graph for this function:

◆ removeTable()

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().

Here is the call graph for this function:

Member Data Documentation

◆ _tablesAlt

Tables Aurora::TalkManager::_tablesAlt
private

Definition at line 99 of file talkman.h.

Referenced by addTable(), clear(), find(), and removeTable().

◆ _tablesMain

Tables Aurora::TalkManager::_tablesMain
private

Definition at line 98 of file talkman.h.

Referenced by addTable(), clear(), find(), and removeTable().


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