OpenMW
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
dialoguemanager.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWBASE_DIALOGUEMANAGER_H
2 #define GAME_MWBASE_DIALOGUEMANAGER_H
3 
4 #include <string>
5 
6 #include <stdint.h>
7 
8 namespace Loading
9 {
10  class Listener;
11 }
12 
13 namespace ESM
14 {
15  class ESMReader;
16  class ESMWriter;
17 }
18 
19 namespace MWWorld
20 {
21  class Ptr;
22 }
23 
24 namespace MWBase
25 {
28  {
31 
34 
35  public:
36 
38 
39  virtual void clear() = 0;
40 
41  virtual ~DialogueManager() {}
42 
43  virtual bool isInChoice() const = 0;
44 
45  virtual void startDialogue (const MWWorld::Ptr& actor) = 0;
46 
47  virtual void addTopic (const std::string& topic) = 0;
48 
49  virtual void askQuestion (const std::string& question,int choice) = 0;
50 
51  virtual void goodbye() = 0;
52 
53  virtual void say(const MWWorld::Ptr &actor, const std::string &topic) const = 0;
54 
55  //calbacks for the GUI
56  virtual void keywordSelected (const std::string& keyword) = 0;
57  virtual void goodbyeSelected() = 0;
58  virtual void questionAnswered (int answer) = 0;
59 
60  virtual bool checkServiceRefused () = 0;
61 
62  virtual void persuade (int type) = 0;
63  virtual int getTemporaryDispositionChange () const = 0;
64 
66  virtual void applyDispositionChange (int delta) = 0;
67 
68  virtual int countSavedGameRecords() const = 0;
69 
70  virtual void write (ESM::ESMWriter& writer, Loading::Listener& progress) const = 0;
71 
72  virtual void readRecord (ESM::ESMReader& reader, uint32_t type) = 0;
73 
75  virtual void modFactionReaction (const std::string& faction1, const std::string& faction2, int diff) = 0;
76 
77  virtual void setFactionReaction (const std::string& faction1, const std::string& faction2, int absolute) = 0;
78 
80  virtual int getFactionReaction (const std::string& faction1, const std::string& faction2) const = 0;
81 
83  virtual void clearInfoActor (const MWWorld::Ptr& actor) const = 0;
84  };
85 }
86 
87 #endif
Interface for dialogue manager (implemented in MWDialogue)
Definition: dialoguemanager.hpp:27
virtual bool checkServiceRefused()=0
Definition: esmreader.hpp:21
virtual void clear()=0
virtual void applyDispositionChange(int delta)=0
virtual int countSavedGameRecords() const =0
virtual void write(ESM::ESMWriter &writer, Loading::Listener &progress) const =0
virtual void clearInfoActor(const MWWorld::Ptr &actor) const =0
Removes the last added topic response for the given actor from the journal.
Definition: loadinglistener.hpp:8
virtual void startDialogue(const MWWorld::Ptr &actor)=0
Definition: esmwriter.hpp:17
DialogueManager()
Definition: dialoguemanager.hpp:37
virtual void say(const MWWorld::Ptr &actor, const std::string &topic) const =0
virtual int getTemporaryDispositionChange() const =0
virtual void setFactionReaction(const std::string &faction1, const std::string &faction2, int absolute)=0
virtual bool isInChoice() const =0
virtual void goodbye()=0
virtual void questionAnswered(int answer)=0
DialogueManager & operator=(const DialogueManager &)
not implemented
virtual void readRecord(ESM::ESMReader &reader, uint32_t type)=0
virtual void keywordSelected(const std::string &keyword)=0
virtual void goodbyeSelected()=0
virtual ~DialogueManager()
Definition: dialoguemanager.hpp:41
virtual void askQuestion(const std::string &question, int choice)=0
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual int getFactionReaction(const std::string &faction1, const std::string &faction2) const =0
virtual void modFactionReaction(const std::string &faction1, const std::string &faction2, int diff)=0
Changes faction1's opinion of faction2 by diff.
virtual void persuade(int type)=0
virtual void addTopic(const std::string &topic)=0