mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-04 11:09:41 +00:00
added interface and container for main journal
This commit is contained in:
parent
5851e0a28c
commit
23464e4035
2 changed files with 29 additions and 0 deletions
|
@ -23,4 +23,14 @@ namespace MWDialogue
|
||||||
{
|
{
|
||||||
return 0;
|
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
|
#define GAME_MWDIALOG_JOURNAL_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <deque>
|
||||||
|
|
||||||
|
#include "journalentry.hpp"
|
||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
{
|
{
|
||||||
|
@ -12,7 +15,15 @@ namespace MWDialogue
|
||||||
{
|
{
|
||||||
class Journal
|
class Journal
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
typedef std::deque<JournalEntry> TEntryContainer;
|
||||||
|
typedef TEntryContainer::const_iterator TEntryIter;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
MWWorld::Environment& mEnvironment;
|
MWWorld::Environment& mEnvironment;
|
||||||
|
std::deque<JournalEntry> mJournal;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -26,6 +37,14 @@ namespace MWDialogue
|
||||||
|
|
||||||
int getJournalIndex (const std::string& id) const;
|
int getJournalIndex (const std::string& id) const;
|
||||||
///< Get the journal index.
|
///< 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 a new issue