OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
MWGui::JournalViewModel Struct Referenceabstract

#include <journalviewmodel.hpp>

Inheritance diagram for MWGui::JournalViewModel:
Collaboration diagram for MWGui::JournalViewModel:

Classes

struct  Entry
 The base interface for both journal entries and topics. More...
 
struct  JournalEntry
 An interface to journal data. More...
 
struct  TopicEntry
 An interface to topic data. More...
 

Public Types

typedef boost::shared_ptr
< JournalViewModel
Ptr
 
typedef intptr_t QuestId
 
typedef intptr_t TopicId
 
typedef uint8_t const * Utf8Point
 
typedef std::pair< Utf8Point,
Utf8Point
Utf8Span
 

Public Member Functions

virtual void load ()=0
 called prior to journal opening More...
 
virtual void unload ()=0
 called prior to journal closing More...
 
virtual bool isEmpty () const =0
 returns true if their are no journal entries to display More...
 
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 More...
 
virtual void visitJournalEntries (const std::string &questName, boost::function< void(JournalEntry const &)> visitor) const =0
 
virtual void visitTopicName (TopicId topicId, boost::function< void(Utf8Span)> visitor) const =0
 provides the name of the topic specified by its id More...
 
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 More...
 
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 More...
 

Static Public Member Functions

static Ptr create ()
 

Detailed Description

View-Model for the journal GUI

This interface defines an abstract data model suited specifically to the needs of the journal GUI. It isolates the journal GUI from the implementation details of the game data store.

Member Typedef Documentation

typedef boost::shared_ptr<JournalViewModel> MWGui::JournalViewModel::Ptr
typedef uint8_t const* MWGui::JournalViewModel::Utf8Point

Member Function Documentation

JournalViewModel::Ptr MWGui::JournalViewModel::create ( )
static

Here is the caller graph for this function:

virtual bool MWGui::JournalViewModel::isEmpty ( ) const
pure virtual

returns true if their are no journal entries to display

Implemented in MWGui::JournalViewModelImpl.

virtual void MWGui::JournalViewModel::load ( )
pure virtual

called prior to journal opening

Implemented in MWGui::JournalViewModelImpl.

virtual void MWGui::JournalViewModel::unload ( )
pure virtual

called prior to journal closing

Implemented in MWGui::JournalViewModelImpl.

virtual void MWGui::JournalViewModel::visitJournalEntries ( const std::string &  questName,
boost::function< void(JournalEntry const &)>  visitor 
) const
pure virtual

walks over the journal entries related to all quests with the given name If questName is empty, simply visits all journal entries

Implemented in MWGui::JournalViewModelImpl.

virtual void MWGui::JournalViewModel::visitQuestNames ( bool  active_only,
boost::function< void(const std::string &, bool)>  visitor 
) const
pure virtual

walks the active and optionally completed, quests providing the name and completed status

Implemented in MWGui::JournalViewModelImpl.

virtual void MWGui::JournalViewModel::visitTopicEntries ( TopicId  topicId,
boost::function< void(TopicEntry const &)>  visitor 
) const
pure virtual

walks over the topic entries for the topic specified by its identifier

Implemented in MWGui::JournalViewModelImpl.

virtual void MWGui::JournalViewModel::visitTopicName ( TopicId  topicId,
boost::function< void(Utf8Span)>  visitor 
) const
pure virtual

provides the name of the topic specified by its id

Implemented in MWGui::JournalViewModelImpl.

virtual void MWGui::JournalViewModel::visitTopicNamesStartingWith ( char  character,
boost::function< void(const std::string &) >  visitor 
) const
pure virtual

walks over the topics whose names start with the specified character providing the topics name

Implemented in MWGui::JournalViewModelImpl.


The documentation for this struct was generated from the following files: