OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MWDialogue::DialogueManager Class Reference

#include <dialoguemanagerimp.hpp>

Inheritance diagram for MWDialogue::DialogueManager:
Collaboration diagram for MWDialogue::DialogueManager:

Public Member Functions

 DialogueManager (const Compiler::Extensions &extensions, Translation::Storage &translationDataStorage)
 
virtual void clear ()
 
virtual bool isInChoice () const
 
virtual bool startDialogue (const MWWorld::Ptr &actor, ResponseCallback *callback)
 
std::list< std::string > getAvailableTopics ()
 
virtual void addTopic (const std::string &topic)
 
virtual void addChoice (const std::string &text, int choice)
 
const std::vector< std::pair
< std::string, int > > & 
getChoices ()
 
virtual bool isGoodbye ()
 
virtual void goodbye ()
 
virtual bool checkServiceRefused (ResponseCallback *callback)
 
virtual void say (const MWWorld::Ptr &actor, const std::string &topic)
 
virtual void keywordSelected (const std::string &keyword, ResponseCallback *callback)
 
virtual void goodbyeSelected ()
 
virtual void questionAnswered (int answer, ResponseCallback *callback)
 
virtual void persuade (int type, ResponseCallback *callback)
 
virtual int getTemporaryDispositionChange () const
 
virtual void applyBarterDispositionChange (int delta)
 
virtual int countSavedGameRecords () const
 
virtual void write (ESM::ESMWriter &writer, Loading::Listener &progress) const
 
virtual void readRecord (ESM::ESMReader &reader, uint32_t type)
 
virtual void modFactionReaction (const std::string &faction1, const std::string &faction2, int diff)
 Changes faction1's opinion of faction2 by diff. More...
 
virtual void setFactionReaction (const std::string &faction1, const std::string &faction2, int absolute)
 
virtual int getFactionReaction (const std::string &faction1, const std::string &faction2) const
 
virtual void clearInfoActor (const MWWorld::Ptr &actor) const
 Removes the last added topic response for the given actor from the journal. More...
 
- Public Member Functions inherited from MWBase::DialogueManager
 DialogueManager ()
 
virtual ~DialogueManager ()
 

Private Types

typedef std::map< std::string,
std::map< std::string, int > > 
ModFactionReactionMap
 

Private Member Functions

void parseText (const std::string &text)
 
void updateActorKnownTopics ()
 
void updateGlobals ()
 
bool compile (const std::string &cmd, std::vector< Interpreter::Type_Code > &code, const MWWorld::Ptr &actor)
 
void executeScript (const std::string &script, const MWWorld::Ptr &actor)
 
void executeTopic (const std::string &topic, ResponseCallback *callback)
 
const ESM::DialoguesearchDialogue (const std::string &id)
 

Private Attributes

std::set< std::string,
Misc::StringUtils::CiComp
mKnownTopics
 
ModFactionReactionMap mChangedFactionReaction
 
std::set< std::string,
Misc::StringUtils::CiComp
mActorKnownTopics
 
Translation::StoragemTranslationDataStorage
 
MWScript::CompilerContext mCompilerContext
 
std::ostream mErrorStream
 
Compiler::StreamErrorHandler mErrorHandler
 
MWWorld::Ptr mActor
 
bool mTalkedTo
 
int mChoice
 
std::string mLastTopic
 
bool mIsInChoice
 
bool mGoodbye
 
std::vector< std::pair
< std::string, int > > 
mChoices
 
float mTemporaryDispositionChange
 
float mPermanentDispositionChange
 

Member Typedef Documentation

typedef std::map<std::string, std::map<std::string, int> > MWDialogue::DialogueManager::ModFactionReactionMap
private

Constructor & Destructor Documentation

MWDialogue::DialogueManager::DialogueManager ( const Compiler::Extensions extensions,
Translation::Storage translationDataStorage 
)

Here is the call graph for this function:

Member Function Documentation

void MWDialogue::DialogueManager::addChoice ( const std::string &  text,
int  choice 
)
virtual
void MWDialogue::DialogueManager::addTopic ( const std::string &  topic)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::applyBarterDispositionChange ( int  delta)
virtual
Note
Controlled by an option, gets discarded when dialogue ends by default

Implements MWBase::DialogueManager.

Here is the call graph for this function:

bool MWDialogue::DialogueManager::checkServiceRefused ( ResponseCallback callback)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::clear ( )
virtual
void MWDialogue::DialogueManager::clearInfoActor ( const MWWorld::Ptr actor) const
virtual

Removes the last added topic response for the given actor from the journal.

Implements MWBase::DialogueManager.

Here is the call graph for this function:

bool MWDialogue::DialogueManager::compile ( const std::string &  cmd,
std::vector< Interpreter::Type_Code > &  code,
const MWWorld::Ptr actor 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

int MWDialogue::DialogueManager::countSavedGameRecords ( ) const
virtual
void MWDialogue::DialogueManager::executeScript ( const std::string &  script,
const MWWorld::Ptr actor 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWDialogue::DialogueManager::executeTopic ( const std::string &  topic,
ResponseCallback callback 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

std::list< std::string > MWDialogue::DialogueManager::getAvailableTopics ( )
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

const std::vector< std::pair< std::string, int > > & MWDialogue::DialogueManager::getChoices ( )
virtual
int MWDialogue::DialogueManager::getFactionReaction ( const std::string &  faction1,
const std::string &  faction2 
) const
virtual
Returns
faction1's opinion of faction2

Implements MWBase::DialogueManager.

Here is the call graph for this function:

Here is the caller graph for this function:

int MWDialogue::DialogueManager::getTemporaryDispositionChange ( ) const
virtual
void MWDialogue::DialogueManager::goodbye ( )
virtual
void MWDialogue::DialogueManager::goodbyeSelected ( )
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

bool MWDialogue::DialogueManager::isGoodbye ( )
virtual
bool MWDialogue::DialogueManager::isInChoice ( ) const
virtual
void MWDialogue::DialogueManager::keywordSelected ( const std::string &  keyword,
ResponseCallback callback 
)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::modFactionReaction ( const std::string &  faction1,
const std::string &  faction2,
int  diff 
)
virtual

Changes faction1's opinion of faction2 by diff.

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::parseText ( const std::string &  text)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWDialogue::DialogueManager::persuade ( int  type,
ResponseCallback callback 
)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::questionAnswered ( int  answer,
ResponseCallback callback 
)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::readRecord ( ESM::ESMReader reader,
uint32_t  type 
)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::say ( const MWWorld::Ptr actor,
const std::string &  topic 
)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

const ESM::Dialogue * MWDialogue::DialogueManager::searchDialogue ( const std::string &  id)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWDialogue::DialogueManager::setFactionReaction ( const std::string &  faction1,
const std::string &  faction2,
int  absolute 
)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

bool MWDialogue::DialogueManager::startDialogue ( const MWWorld::Ptr actor,
ResponseCallback callback 
)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::updateActorKnownTopics ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWDialogue::DialogueManager::updateGlobals ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWDialogue::DialogueManager::write ( ESM::ESMWriter writer,
Loading::Listener progress 
) const
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

Member Data Documentation

MWWorld::Ptr MWDialogue::DialogueManager::mActor
private
std::set<std::string, Misc::StringUtils::CiComp> MWDialogue::DialogueManager::mActorKnownTopics
private
ModFactionReactionMap MWDialogue::DialogueManager::mChangedFactionReaction
private
int MWDialogue::DialogueManager::mChoice
private
std::vector<std::pair<std::string, int> > MWDialogue::DialogueManager::mChoices
private
MWScript::CompilerContext MWDialogue::DialogueManager::mCompilerContext
private
Compiler::StreamErrorHandler MWDialogue::DialogueManager::mErrorHandler
private
std::ostream MWDialogue::DialogueManager::mErrorStream
private
bool MWDialogue::DialogueManager::mGoodbye
private
bool MWDialogue::DialogueManager::mIsInChoice
private
std::set<std::string, Misc::StringUtils::CiComp> MWDialogue::DialogueManager::mKnownTopics
private
std::string MWDialogue::DialogueManager::mLastTopic
private
float MWDialogue::DialogueManager::mPermanentDispositionChange
private
bool MWDialogue::DialogueManager::mTalkedTo
private
float MWDialogue::DialogueManager::mTemporaryDispositionChange
private
Translation::Storage& MWDialogue::DialogueManager::mTranslationDataStorage
private

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