OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
topic.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWDIALOG_TOPIC_H
2 #define GAME_MWDIALOG_TOPIC_H
3 
4 #include <string>
5 #include <vector>
6 
7 #include "journalentry.hpp"
8 
9 namespace ESM
10 {
11  struct JournalEntry;
12 }
13 
14 namespace MWDialogue
15 {
17  class Topic
18  {
19  public:
20 
21  typedef std::vector<Entry> TEntryContainer;
22  typedef TEntryContainer::const_iterator TEntryIter;
23 
24  protected:
25 
26  std::string mTopic;
27  std::string mName;
29 
30  public:
31 
32  Topic();
33 
34  Topic (const std::string& topic);
35 
36  virtual ~Topic();
37 
38  virtual void addEntry (const JournalEntry& entry);
42 
43  void insertEntry (const ESM::JournalEntry& entry);
46 
47  std::string getTopic() const;
48 
49  virtual std::string getName() const;
50 
51  void removeLastAddedResponse (const std::string& actorName);
52 
53  TEntryIter begin() const;
55 
56  TEntryIter end() const;
58  };
59 }
60 
61 #endif
void removeLastAddedResponse(const std::string &actorName)
Definition: topic.cpp:61
TEntryIter begin() const
Iterator pointing to the begin of the journal for this topic.
Definition: topic.cpp:51
TEntryContainer::const_iterator TEntryIter
Definition: topic.hpp:22
virtual std::string getName() const
Definition: topic.cpp:46
A dialogue entry.
Definition: journalentry.hpp:40
Topic()
Definition: topic.cpp:10
std::string getTopic() const
Definition: topic.cpp:41
std::string mName
Definition: topic.hpp:27
TEntryContainer mEntries
Definition: topic.hpp:28
std::vector< Entry > TEntryContainer
Definition: topic.hpp:21
virtual void addEntry(const JournalEntry &entry)
Definition: topic.cpp:21
void insertEntry(const ESM::JournalEntry &entry)
Definition: topic.cpp:36
Collection of seen responses for a topic.
Definition: topic.hpp:17
TEntryIter end() const
Iterator pointing past the end of the journal for this topic.
Definition: topic.cpp:56
virtual ~Topic()
Definition: topic.cpp:18
std::string mTopic
Definition: topic.hpp:26
Definition: journalentry.hpp:13