OpenMW
apps/openmw/mwbase/journal.hpp
Go to the documentation of this file.
00001 #ifndef GAME_MWBASE_JOURNAL_H
00002 #define GAME_MWBASE_JOURNAL_H
00003 
00004 #include <string>
00005 #include <deque>
00006 #include <map>
00007 
00008 #include "../mwdialogue/journalentry.hpp"
00009 #include "../mwdialogue/topic.hpp"
00010 #include "../mwdialogue/quest.hpp"
00011 
00012 namespace MWBase
00013 {
00015     class Journal
00016     {
00017             Journal (const Journal&);
00019 
00020             Journal& operator= (const Journal&);
00022 
00023         public:
00024 
00025             typedef std::deque<MWDialogue::StampedJournalEntry> TEntryContainer;
00026             typedef TEntryContainer::const_iterator TEntryIter;
00027             typedef std::map<std::string, MWDialogue::Quest> TQuestContainer; // topc, quest
00028             typedef TQuestContainer::const_iterator TQuestIter;
00029             typedef std::map<std::string, MWDialogue::Topic> TTopicContainer; // topic-id, topic-content
00030             typedef TTopicContainer::const_iterator TTopicIter;
00031 
00032         public:
00033 
00034             Journal() {}
00035 
00036             virtual void clear() = 0;
00037 
00038             virtual ~Journal() {}
00039 
00040             virtual void addEntry (const std::string& id, int index) = 0;
00042 
00043             virtual void setJournalIndex (const std::string& id, int index) = 0;
00045 
00046             virtual int getJournalIndex (const std::string& id) const = 0;
00048 
00049             virtual void addTopic (const std::string& topicId, const std::string& infoId) = 0;
00050 
00051             virtual TEntryIter begin() const = 0;
00055 
00056             virtual TEntryIter end() const = 0;
00058 
00059             virtual TQuestIter questBegin() const = 0;
00061 
00062             virtual TQuestIter questEnd() const = 0;
00064 
00065             virtual TTopicIter topicBegin() const = 0;
00069 
00070             virtual TTopicIter topicEnd() const = 0;
00072     };
00073 }
00074 
00075 #endif