added interface and container for main journal

actorid
Marc Zinnschlag 14 years ago
parent 5851e0a28c
commit 23464e4035

@ -23,4 +23,14 @@ namespace MWDialogue
{
return 0;
}
Journal::TEntryIter Journal::begin() const
{
return mJournal.begin();
}
Journal::TEntryIter Journal::end() const
{
return mJournal.end();
}
}

@ -2,6 +2,9 @@
#define GAME_MWDIALOG_JOURNAL_H
#include <string>
#include <deque>
#include "journalentry.hpp"
namespace MWWorld
{
@ -12,7 +15,15 @@ namespace MWDialogue
{
class Journal
{
public:
typedef std::deque<JournalEntry> TEntryContainer;
typedef TEntryContainer::const_iterator TEntryIter;
private:
MWWorld::Environment& mEnvironment;
std::deque<JournalEntry> mJournal;
public:
@ -26,6 +37,14 @@ namespace MWDialogue
int getJournalIndex (const std::string& id) const;
///< Get the journal index.
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.
};
}

Loading…
Cancel
Save