2011-04-26 18:39:59 +00:00
|
|
|
#ifndef GAME_MMDIALOG_TOPIC_H
|
|
|
|
#define GAME_MWDIALOG_TOPIC_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "journalentry.hpp"
|
|
|
|
|
|
|
|
namespace MWDialogue
|
|
|
|
{
|
|
|
|
/// \brief Collection of seen responses for a topic
|
|
|
|
class Topic
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
typedef std::vector<std::string> TEntryContainer;
|
|
|
|
typedef TEntryContainer::const_iterator TEntryIter;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
std::string mTopic;
|
|
|
|
TEntryContainer mEntries; // info-IDs
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Topic();
|
|
|
|
|
|
|
|
Topic (const std::string& topic);
|
|
|
|
|
|
|
|
virtual ~Topic();
|
|
|
|
|
2012-07-03 10:30:50 +00:00
|
|
|
virtual void addEntry (const JournalEntry& entry);
|
2011-04-26 18:39:59 +00:00
|
|
|
///< Add entry
|
|
|
|
///
|
|
|
|
/// \note Redundant entries are ignored.
|
|
|
|
|
|
|
|
TEntryIter begin();
|
|
|
|
///< Iterator pointing to the begin of the journal for this topic.
|
|
|
|
|
|
|
|
TEntryIter end();
|
|
|
|
///< Iterator pointing past the end of the journal for this topic.
|
|
|
|
|
|
|
|
JournalEntry getEntry (const std::string& infoId);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|