OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
journalentry.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWDIALOGUE_JOURNALENTRY_H
2 #define GAME_MWDIALOGUE_JOURNALENTRY_H
3 
4 #include <string>
5 
6 namespace ESM
7 {
8  struct JournalEntry;
9 }
10 
11 namespace MWWorld
12 {
13  class Ptr;
14 }
15 
16 namespace MWDialogue
17 {
19  struct Entry
20  {
21  std::string mInfoId;
22  std::string mText;
23  std::string mActorName; // optional
24 
25  Entry();
26 
28  Entry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor);
29 
30  Entry (const ESM::JournalEntry& record);
31 
32  std::string getText() const;
33 
34  void write (ESM::JournalEntry& entry) const;
35  };
36 
40  struct JournalEntry : public Entry
41  {
42  std::string mTopic;
43 
44  JournalEntry();
45 
46  JournalEntry (const std::string& topic, const std::string& infoId, const MWWorld::Ptr& actor);
47 
48  JournalEntry (const ESM::JournalEntry& record);
49 
50  void write (ESM::JournalEntry& entry) const;
51 
52  static JournalEntry makeFromQuest (const std::string& topic, int index);
53 
54  static std::string idFromIndex (const std::string& topic, int index);
55  };
56 
59  {
60  int mDay;
61  int mMonth;
63 
65 
66  StampedJournalEntry (const std::string& topic, const std::string& infoId,
67  int day, int month, int dayOfMonth, const MWWorld::Ptr& actor);
68 
69  StampedJournalEntry (const ESM::JournalEntry& record);
70 
71  void write (ESM::JournalEntry& entry) const;
72 
73  static StampedJournalEntry makeFromQuest (const std::string& topic, int index, const MWWorld::Ptr& actor);
74  };
75 }
76 
77 #endif
Basic quest/dialogue/topic entry.
Definition: journalentry.hpp:19
void write(ESM::JournalEntry &entry) const
Definition: journalentry.cpp:55
std::string mText
Definition: journalentry.hpp:22
std::string mTopic
Definition: journalentry.hpp:42
A dialogue entry.
Definition: journalentry.hpp:40
std::string getText() const
Definition: journalentry.cpp:50
StampedJournalEntry()
Definition: journalentry.cpp:100
void write(ESM::JournalEntry &entry) const
Definition: journalentry.cpp:73
Entry()
Definition: journalentry.cpp:19
void write(ESM::JournalEntry &entry) const
Definition: journalentry.cpp:114
int mDayOfMonth
Definition: journalentry.hpp:62
std::string mActorName
Definition: journalentry.hpp:23
static StampedJournalEntry makeFromQuest(const std::string &topic, int index, const MWWorld::Ptr &actor)
Definition: journalentry.cpp:122
A quest entry with a timestamp.
Definition: journalentry.hpp:58
JournalEntry()
Definition: journalentry.cpp:63
static std::string idFromIndex(const std::string &topic, int index)
Definition: journalentry.cpp:84
std::string mInfoId
Definition: journalentry.hpp:21
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
Definition: journalentry.hpp:13
static JournalEntry makeFromQuest(const std::string &topic, int index)
Definition: journalentry.cpp:79
int mDay
Definition: journalentry.hpp:60
int mMonth
Definition: journalentry.hpp:61