You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwdialogue/topic.hpp

51 lines
1.1 KiB
C++

#ifndef GAME_MWDIALOG_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;
std::string mName;
TEntryContainer mEntries; // info-IDs
public:
Topic();
Topic (const std::string& topic);
virtual ~Topic();
virtual void addEntry (const JournalEntry& entry);
///< Add entry
///
/// \note Redundant entries are ignored.
virtual std::string getName () const;
TEntryIter begin() const;
///< Iterator pointing to the begin of the journal for this topic.
TEntryIter end() const;
///< Iterator pointing past the end of the journal for this topic.
JournalEntry getEntry (const std::string& infoId) const;
};
}
#endif