1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/apps/openmw/mwdialogue/journalimp.hpp

62 lines
1.8 KiB
C++
Raw Normal View History

2012-08-11 12:02:51 +02:00
#ifndef GAME_MWDIALOG_JOURNAL_H
2011-04-04 11:16:56 +02:00
#define GAME_MWDIALOG_JOURNAL_H
#include "../mwbase/journal.hpp"
#include "journalentry.hpp"
2011-04-26 20:08:37 +02:00
#include "quest.hpp"
2011-04-04 11:23:15 +02:00
2011-04-04 11:16:56 +02:00
namespace MWDialogue
{
2011-04-26 20:08:37 +02:00
/// \brief The player's journal
class Journal : public MWBase::Journal
2011-04-04 11:16:56 +02:00
{
TEntryContainer mJournal;
2011-04-26 20:08:37 +02:00
TQuestContainer mQuests;
2011-04-26 20:48:36 +02:00
TTopicContainer mTopics;
2011-04-26 20:08:37 +02:00
Quest& getQuest (const std::string& id);
2011-04-04 11:16:56 +02:00
public:
Journal();
2011-04-04 11:23:15 +02:00
2013-05-15 17:54:18 +02:00
virtual void clear();
virtual void addEntry (const std::string& id, int index);
2011-04-04 11:23:15 +02:00
///< Add a journal entry.
virtual void setJournalIndex (const std::string& id, int index);
2011-04-04 11:23:15 +02:00
///< Set the journal index without adding an entry.
virtual int getJournalIndex (const std::string& id) const;
2011-04-04 11:23:15 +02:00
///< Get the journal index.
virtual void addTopic (const std::string& topicId, const std::string& infoId);
2011-04-26 20:48:36 +02:00
virtual TEntryIter begin() const;
///< Iterator pointing to the begin of the main journal.
///
/// \note Iterators to main journal entries will never become invalid.
virtual TEntryIter end() const;
///< Iterator pointing past the end of the main journal.
2011-04-26 20:08:37 +02:00
virtual TQuestIter questBegin() const;
2011-04-26 20:08:37 +02:00
///< Iterator pointing to the first quest (sorted by topic ID)
virtual TQuestIter questEnd() const;
2011-04-26 20:08:37 +02:00
///< Iterator pointing past the last quest.
2011-04-26 20:48:36 +02:00
virtual TTopicIter topicBegin() const;
2011-04-26 20:48:36 +02:00
///< Iterator pointing to the first topic (sorted by topic ID)
///
/// \note The topic ID is identical with the user-visible topic string.
virtual TTopicIter topicEnd() const;
2011-04-26 20:48:36 +02:00
///< Iterator pointing past the last topic.
2011-04-04 11:16:56 +02:00
};
}
#endif