1 #ifndef MWGUI_JOURNALVIEWMODEL_HPP
2 #define MWGUI_JOURNALVIEWMODEL_HPP
8 #include <boost/function.hpp>
9 #include <boost/shared_ptr.hpp>
21 typedef boost::shared_ptr <JournalViewModel>
Ptr;
26 typedef std::pair <Utf8Point, Utf8Point>
Utf8Span;
41 virtual void visitSpans (boost::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, boost::function <
void (
const std::string&,
bool)> visitor)
const = 0;
91 #endif // MWGUI_JOURNALVIEWMODEL_HPP
virtual void visitQuestNames(bool active_only, boost::function< void(const std::string &, bool)> visitor) const =0
walks the active and optionally completed, quests providing the name and completed status ...
virtual Utf8Span timestamp() const =0
intptr_t QuestId
Definition: journalviewmodel.hpp:23
An interface to topic data.
Definition: journalviewmodel.hpp:45
virtual void visitSpans(boost::function< void(TopicId, size_t, size_t)> visitor) const =0
static Ptr create()
Definition: journalviewmodel.cpp:357
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
virtual void unload()=0
called prior to journal closing
Definition: journalviewmodel.hpp:19
boost::shared_ptr< JournalViewModel > Ptr
Definition: journalviewmodel.hpp:21
std::pair< Utf8Point, Utf8Point > Utf8Span
Definition: journalviewmodel.hpp:26
intptr_t TopicId
Definition: journalviewmodel.hpp:24
virtual void visitTopicEntries(TopicId topicId, boost::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 visitJournalEntries(const std::string &questName, boost::function< void(JournalEntry const &)> visitor) const =0
virtual void visitTopicNamesStartingWith(char character, boost::function< void(const std::string &) > visitor) const =0
walks over the topics whose names start with the specified character providing the topics name ...
virtual void visitTopicName(TopicId topicId, boost::function< void(Utf8Span)> visitor) const =0
provides the name of the topic specified by its id