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, bool scriptVerbose, Translation::Storage &translationDataStorage)
 
virtual void clear ()
 
virtual bool isInChoice () const
 
virtual void startDialogue (const MWWorld::Ptr &actor)
 
virtual void addTopic (const std::string &topic)
 
virtual void askQuestion (const std::string &question, int choice)
 
virtual void goodbye ()
 
virtual bool checkServiceRefused ()
 
virtual void say (const MWWorld::Ptr &actor, const std::string &topic) const
 
virtual void keywordSelected (const std::string &keyword)
 
virtual void goodbyeSelected ()
 
virtual void questionAnswered (int answer)
 
virtual void persuade (int type)
 
virtual int getTemporaryDispositionChange () const
 
virtual void applyDispositionChange (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 updateTopics ()
 
void updateGlobals ()
 
bool compile (const std::string &cmd, std::vector< Interpreter::Type_Code > &code)
 
void executeScript (const std::string &script)
 
void executeTopic (const std::string &topic)
 

Private Attributes

std::map< std::string,
ESM::Dialogue
mDialogueMap
 
std::set< std::string > mKnownTopics
 
ModFactionReactionMap mChangedFactionReaction
 
std::set< std::string > mActorKnownTopics
 
Translation::StoragemTranslationDataStorage
 
MWScript::CompilerContext mCompilerContext
 
std::ostream mErrorStream
 
Compiler::StreamErrorHandler mErrorHandler
 
MWWorld::Ptr mActor
 
bool mTalkedTo
 
int mChoice
 
std::string mLastTopic
 
bool mIsInChoice
 
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,
bool  scriptVerbose,
Translation::Storage translationDataStorage 
)

Here is the call graph for this function:

Member Function Documentation

void MWDialogue::DialogueManager::addTopic ( const std::string &  topic)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::applyDispositionChange ( int  delta)
virtual
Note
This change is temporary and gets discarded when dialogue ends.

Implements MWBase::DialogueManager.

void MWDialogue::DialogueManager::askQuestion ( const std::string &  question,
int  choice 
)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

bool MWDialogue::DialogueManager::checkServiceRefused ( )
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 
)
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)
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)
private

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::goodbyeSelected ( )
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

bool MWDialogue::DialogueManager::isInChoice ( ) const
virtual
void MWDialogue::DialogueManager::keywordSelected ( const std::string &  keyword)
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)
virtual

Implements MWBase::DialogueManager.

Here is the call graph for this function:

void MWDialogue::DialogueManager::questionAnswered ( int  answer)
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 
) const
virtual

Implements MWBase::DialogueManager.

Here is the call 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:

void MWDialogue::DialogueManager::startDialogue ( const MWWorld::Ptr actor)
virtual

Implements MWBase::DialogueManager.

Here is the call 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::updateTopics ( )
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> MWDialogue::DialogueManager::mActorKnownTopics
private
ModFactionReactionMap MWDialogue::DialogueManager::mChangedFactionReaction
private
int MWDialogue::DialogueManager::mChoice
private
MWScript::CompilerContext MWDialogue::DialogueManager::mCompilerContext
private
std::map<std::string, ESM::Dialogue> MWDialogue::DialogueManager::mDialogueMap
private
Compiler::StreamErrorHandler MWDialogue::DialogueManager::mErrorHandler
private
std::ostream MWDialogue::DialogueManager::mErrorStream
private
bool MWDialogue::DialogueManager::mIsInChoice
private
std::set<std::string> 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: