mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
added interface and container for main journal
This commit is contained in:
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…
Reference in New Issue
Block a user