1 #ifndef MWGUI_JOURNALVIEWMODEL_HPP
2 #define MWGUI_JOURNALVIEWMODEL_HPP
21 typedef std::shared_ptr <JournalViewModel>
Ptr;
26 typedef std::pair <Utf8Point, Utf8Point>
Utf8Span;
41 virtual void visitSpans (std::function <
void (
TopicId,
size_t,
size_t)> visitor)
const = 0;
62 virtual void load () = 0;
65 virtual void unload () = 0;
68 virtual bool isEmpty ()
const = 0;
71 virtual void visitQuestNames (
bool active_only, std::function <
void (
const std::string&,
bool)> visitor)
const = 0;
91 #endif // MWGUI_JOURNALVIEWMODEL_HPP
virtual Utf8Span timestamp() const =0
intptr_t QuestId
Definition: journalviewmodel.hpp:23
An interface to topic data.
Definition: journalviewmodel.hpp:45
static Ptr create()
Definition: journalviewmodel.cpp:356
The base interface for both journal entries and topics.
Definition: journalviewmodel.hpp:29
uint8_t const * Utf8Point
Definition: journalviewmodel.hpp:25
virtual void load()=0
called prior to journal opening
virtual bool isEmpty() const =0
returns true if their are no journal entries to display
virtual Utf8Span source() const =0
virtual Utf8Span body() const =0
std::shared_ptr< JournalViewModel > Ptr
Definition: journalviewmodel.hpp:21
virtual void unload()=0
called prior to journal closing
Definition: journalviewmodel.hpp:19
std::pair< Utf8Point, Utf8Point > Utf8Span
Definition: journalviewmodel.hpp:26
uint32_t UnicodeChar
Definition: utf8stream.hpp:11
intptr_t TopicId
Definition: journalviewmodel.hpp:24
virtual void visitJournalEntries(const std::string &questName, std::function< void(JournalEntry const &)> visitor) const =0
virtual void visitTopicName(TopicId topicId, std::function< void(Utf8Span)> visitor) const =0
provides the name of the topic specified by its id
virtual void visitTopicEntries(TopicId topicId, std::function< void(TopicEntry const &)> visitor) const =0
walks over the topic entries for the topic specified by its identifier
An interface to journal data.
Definition: journalviewmodel.hpp:53
virtual void visitQuestNames(bool active_only, std::function< void(const std::string &, bool)> visitor) const =0
walks the active and optionally completed, quests providing the name and completed status ...
virtual void visitTopicNamesStartingWith(Utf8Stream::UnicodeChar character, std::function< void(const std::string &) > visitor) const =0
walks over the topics whose names start with the character
virtual void visitSpans(std::function< void(TopicId, size_t, size_t)> visitor) const =0