2011-04-04 09:16:56 +00:00
|
|
|
#ifndef GAME_MMDIALOG_JOURNAL_H
|
|
|
|
#define GAME_MWDIALOG_JOURNAL_H
|
|
|
|
|
2011-04-04 09:23:15 +00:00
|
|
|
#include <string>
|
2011-04-19 09:02:22 +00:00
|
|
|
#include <deque>
|
|
|
|
|
|
|
|
#include "journalentry.hpp"
|
2011-04-04 09:23:15 +00:00
|
|
|
|
2011-04-04 09:16:56 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
struct Environment;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWDialogue
|
|
|
|
{
|
|
|
|
class Journal
|
|
|
|
{
|
2011-04-19 09:02:22 +00:00
|
|
|
public:
|
|
|
|
|
2011-04-22 09:16:39 +00:00
|
|
|
typedef std::deque<StampedJournalEntry> TEntryContainer;
|
2011-04-19 09:02:22 +00:00
|
|
|
typedef TEntryContainer::const_iterator TEntryIter;
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2011-04-04 09:16:56 +00:00
|
|
|
MWWorld::Environment& mEnvironment;
|
2011-04-22 09:16:39 +00:00
|
|
|
TEntryContainer mJournal;
|
2011-04-04 09:16:56 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Journal (MWWorld::Environment& environment);
|
2011-04-04 09:23:15 +00:00
|
|
|
|
|
|
|
void addEntry (const std::string& id, int index);
|
|
|
|
///< Add a journal entry.
|
|
|
|
|
|
|
|
void setJournalIndex (const std::string& id, int index);
|
|
|
|
///< Set the journal index without adding an entry.
|
|
|
|
|
|
|
|
int getJournalIndex (const std::string& id) const;
|
|
|
|
///< Get the journal index.
|
2011-04-19 09:02:22 +00:00
|
|
|
|
|
|
|
TEntryIter begin() const;
|
|
|
|
///< Iterator pointing to the begin of the main journal.
|
|
|
|
///
|
|
|
|
/// \note Iterators to main journal entries will never become invalid.
|
|
|
|
|
|
|
|
TEntryIter end() const;
|
|
|
|
///< Iterator pointing past the end of the main journal.
|
2011-04-04 09:16:56 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|