OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
journalimp.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWDIALOG_JOURNAL_H
2 #define GAME_MWDIALOG_JOURNAL_H
3 
4 #include "../mwbase/journal.hpp"
5 
6 #include "journalentry.hpp"
7 #include "quest.hpp"
8 
9 namespace MWDialogue
10 {
12  class Journal : public MWBase::Journal
13  {
17 
18  private:
19 
20  Quest& getQuest (const std::string& id);
21 
22  Topic& getTopic (const std::string& id);
23 
24  bool isThere (const std::string& topicId, const std::string& infoId = "") const;
25 
26  public:
27 
28  Journal();
29 
30  virtual void clear();
31 
32  virtual void addEntry (const std::string& id, int index, const MWWorld::Ptr& actor);
35 
36  virtual void setJournalIndex (const std::string& id, int index);
38 
39  virtual int getJournalIndex (const std::string& id) const;
41 
42  virtual void addTopic (const std::string& topicId, const std::string& infoId, const MWWorld::Ptr& actor);
44 
45  virtual void removeLastAddedTopicResponse (const std::string& topicId, const std::string& actorName);
48 
49  virtual TEntryIter begin() const;
53 
54  virtual TEntryIter end() const;
56 
57  virtual TQuestIter questBegin() const;
59 
60  virtual TQuestIter questEnd() const;
62 
63  virtual TTopicIter topicBegin() const;
67 
68  virtual TTopicIter topicEnd() const;
70 
71  virtual int countSavedGameRecords() const;
72 
73  virtual void write (ESM::ESMWriter& writer, Loading::Listener& progress) const;
74 
75  virtual void readRecord (ESM::ESMReader& reader, uint32_t type);
76  };
77 }
78 
79 #endif
virtual void clear()
Definition: journalimp.cpp:71
std::map< std::string, MWDialogue::Quest > TQuestContainer
Definition: journal.hpp:40
Definition: esmreader.hpp:21
virtual TEntryIter end() const
Iterator pointing past the end of the main journal.
Definition: journalimp.cpp:138
Interface for the player's journal (implemented in MWDialogue)
Definition: journal.hpp:28
std::deque< MWDialogue::StampedJournalEntry > TEntryContainer
Definition: journal.hpp:38
bool isThere(const std::string &topicId, const std::string &infoId="") const
Definition: journalimp.cpp:51
virtual void setJournalIndex(const std::string &id, int index)
Set the journal index without adding an entry.
Definition: journalimp.cpp:97
virtual int countSavedGameRecords() const
Definition: journalimp.cpp:163
TEntryContainer mJournal
Definition: journalimp.hpp:14
std::map< std::string, MWDialogue::Topic > TTopicContainer
Definition: journal.hpp:42
Definition: loadinglistener.hpp:8
virtual void addEntry(const std::string &id, int index, const MWWorld::Ptr &actor)
Definition: journalimp.cpp:78
virtual TEntryIter begin() const
Definition: journalimp.cpp:133
virtual void readRecord(ESM::ESMReader &reader, uint32_t type)
Definition: journalimp.cpp:229
TQuestContainer mQuests
Definition: journalimp.hpp:15
Definition: esmwriter.hpp:17
virtual void removeLastAddedTopicResponse(const std::string &topicId, const std::string &actorName)
Definition: journalimp.cpp:113
A quest in progress or a completed quest.
Definition: quest.hpp:14
The player's journal.
Definition: journalimp.hpp:12
virtual TQuestIter questBegin() const
Iterator pointing to the first quest (sorted by topic ID)
Definition: journalimp.cpp:143
TQuestContainer::const_iterator TQuestIter
Definition: journal.hpp:41
virtual void write(ESM::ESMWriter &writer, Loading::Listener &progress) const
Definition: journalimp.cpp:178
TEntryContainer::const_iterator TEntryIter
Definition: journal.hpp:39
Quest & getQuest(const std::string &id)
Definition: journalimp.cpp:21
Collection of seen responses for a topic.
Definition: topic.hpp:17
virtual TQuestIter questEnd() const
Iterator pointing past the last quest.
Definition: journalimp.cpp:148
Journal()
Definition: journalimp.cpp:68
virtual TTopicIter topicBegin() const
Definition: journalimp.cpp:153
TTopicContainer::const_iterator TTopicIter
Definition: journal.hpp:43
virtual void addTopic(const std::string &topicId, const std::string &infoId, const MWWorld::Ptr &actor)
Definition: journalimp.cpp:104
virtual int getJournalIndex(const std::string &id) const
Get the journal index.
Definition: journalimp.cpp:123
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
Topic & getTopic(const std::string &id)
Definition: journalimp.cpp:36
virtual TTopicIter topicEnd() const
Iterator pointing past the last topic.
Definition: journalimp.cpp:158
TTopicContainer mTopics
Definition: journalimp.hpp:16