made some journal accessor methods constant

This commit is contained in:
Nathan Jeffords 2013-01-19 16:21:41 -08:00
parent 4c7ae3d1ff
commit f55da17933
2 changed files with 8 additions and 6 deletions

View file

@ -27,17 +27,17 @@ namespace MWDialogue
mEntries.push_back (entry.mInfoId);
}
Topic::TEntryIter Topic::begin()
Topic::TEntryIter Topic::begin() const
{
return mEntries.begin();
}
Topic::TEntryIter Topic::end()
Topic::TEntryIter Topic::end() const
{
return mEntries.end();
}
JournalEntry Topic::getEntry (const std::string& infoId)
JournalEntry Topic::getEntry (const std::string& infoId) const
{
return JournalEntry (mTopic, infoId);
}

View file

@ -34,13 +34,15 @@ namespace MWDialogue
///
/// \note Redundant entries are ignored.
TEntryIter begin();
std::string const & getName () const { return mTopic; }
TEntryIter begin() const;
///< Iterator pointing to the begin of the journal for this topic.
TEntryIter end();
TEntryIter end() const;
///< Iterator pointing past the end of the journal for this topic.
JournalEntry getEntry (const std::string& infoId);
JournalEntry getEntry (const std::string& infoId) const;
};
}