From 7db6447a0064084090cd42a3e2f4402eba8974b5 Mon Sep 17 00:00:00 2001 From: Nathan Jeffords Date: Wed, 6 Mar 2013 20:02:00 -0800 Subject: [PATCH] dropped the I infront of the journal view model interfaces --- apps/openmw/mwgui/journalbooks.cpp | 16 +++++------ apps/openmw/mwgui/journalbooks.hpp | 4 +-- apps/openmw/mwgui/journalviewmodel.cpp | 40 +++++++++++++------------- apps/openmw/mwgui/journalviewmodel.hpp | 14 ++++----- apps/openmw/mwgui/journalwindow.cpp | 4 +-- apps/openmw/mwgui/journalwindow.hpp | 4 +-- apps/openmw/mwgui/windowmanagerimp.cpp | 2 +- 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/apps/openmw/mwgui/journalbooks.cpp b/apps/openmw/mwgui/journalbooks.cpp index d0e0c23c68..de6ddfffbc 100644 --- a/apps/openmw/mwgui/journalbooks.cpp +++ b/apps/openmw/mwgui/journalbooks.cpp @@ -56,7 +56,7 @@ namespace { } - void operator () (IJournalViewModel::IEntry const & Entry) + void operator () (JournalViewModel::Entry const & Entry) { typesetter->add_content (Entry.body ()); @@ -77,7 +77,7 @@ namespace { } - void operator () (IJournalViewModel::IJournalEntry const & Entry) + void operator () (JournalViewModel::JournalEntry const & Entry) { if (add_header) { @@ -102,7 +102,7 @@ namespace { } - void operator () (IJournalViewModel::ITopicEntry const & Entry) + void operator () (JournalViewModel::TopicEntry const & Entry) { typesetter->write (body_style, Entry.source ()); typesetter->write (body_style, 0, 3);// begin @@ -123,7 +123,7 @@ namespace { } - void operator () (IJournalViewModel::utf8_span topicName) + void operator () (JournalViewModel::utf8_span topicName) { typesetter->write (body_style, topicName); typesetter->sectionBreak (10); @@ -137,7 +137,7 @@ namespace { } - void operator () (IJournalViewModel::utf8_span topicName) + void operator () (JournalViewModel::utf8_span topicName) { typesetter->write (body_style, topicName); typesetter->sectionBreak (10); @@ -151,7 +151,7 @@ namespace { } - void operator () (IJournalViewModel::topic_id topicId, IJournalViewModel::utf8_span name) + void operator () (JournalViewModel::topic_id topicId, JournalViewModel::utf8_span name) { BookTypesetter::Style* link = typesetter->createHotStyle (body_style, MyGUI::Colour::Black, linkHot, linkActive, topicId); @@ -167,7 +167,7 @@ namespace { } - void operator () (IJournalViewModel::quest_id id, IJournalViewModel::utf8_span name) + void operator () (JournalViewModel::quest_id id, JournalViewModel::utf8_span name) { BookTypesetter::Style* style = typesetter->createHotStyle (body_style, MyGUI::Colour::Black, linkHot, linkActive, id); @@ -179,7 +179,7 @@ namespace typedef TypesetBook::ptr book; -JournalBooks::JournalBooks (IJournalViewModel::ptr Model) : +JournalBooks::JournalBooks (JournalViewModel::ptr Model) : Model (Model) { } diff --git a/apps/openmw/mwgui/journalbooks.hpp b/apps/openmw/mwgui/journalbooks.hpp index 1d2079f0bd..e1f0352598 100644 --- a/apps/openmw/mwgui/journalbooks.hpp +++ b/apps/openmw/mwgui/journalbooks.hpp @@ -9,9 +9,9 @@ namespace MWGui struct JournalBooks { typedef TypesetBook::ptr book; - IJournalViewModel::ptr Model; + JournalViewModel::ptr Model; - JournalBooks (IJournalViewModel::ptr Model); + JournalBooks (JournalViewModel::ptr Model); book createEmptyJournalBook (); book createJournalBook (); diff --git a/apps/openmw/mwgui/journalviewmodel.cpp b/apps/openmw/mwgui/journalviewmodel.cpp index d27295f3a1..f69a2995ca 100644 --- a/apps/openmw/mwgui/journalviewmodel.cpp +++ b/apps/openmw/mwgui/journalviewmodel.cpp @@ -15,7 +15,7 @@ using namespace MWGui; -namespace MWGui { struct JournalViewModel; } +namespace MWGui { struct JournalViewModelImpl; } static void injectMonthName (std::ostream & os, int month); @@ -148,7 +148,7 @@ private: std::locale mLocale; }; -struct MWGui::JournalViewModel : IJournalViewModel +struct MWGui::JournalViewModelImpl : JournalViewModel { typedef KeywordSearch keyword_search_t; @@ -157,12 +157,12 @@ struct MWGui::JournalViewModel : IJournalViewModel std::locale mLocale; - JournalViewModel () + JournalViewModelImpl () { mKeywordSearchLoaded = false; } - virtual ~JournalViewModel () + virtual ~JournalViewModelImpl () { } @@ -214,10 +214,10 @@ struct MWGui::JournalViewModel : IJournalViewModel { typedef t_iterator iterator_t; - iterator_t itr; - JournalViewModel const * Model; + iterator_t itr; + JournalViewModelImpl const * Model; - BaseEntry (JournalViewModel const * Model, iterator_t itr) : + BaseEntry (JournalViewModelImpl const * Model, iterator_t itr) : Model (Model), itr (itr), loaded (false) {} @@ -292,14 +292,14 @@ struct MWGui::JournalViewModel : IJournalViewModel } template - struct JournalEntry : BaseEntry + struct JournalEntryImpl : BaseEntry { - using BaseEntry ::itr; + using BaseEntry ::itr; mutable std::string timestamp_buffer; - JournalEntry (JournalViewModel const * Model, iterator_t itr) : - BaseEntry (Model, itr) + JournalEntryImpl (JournalViewModelImpl const * Model, iterator_t itr) : + BaseEntry (Model, itr) {} std::string getText () const @@ -326,7 +326,7 @@ struct MWGui::JournalViewModel : IJournalViewModel } }; - void visitJournalEntries (quest_id questId, boost::function visitor) const + void visitJournalEntries (quest_id questId, boost::function visitor) const { MWBase::Journal * journal = MWBase::Environment::get().getJournal(); @@ -339,14 +339,14 @@ struct MWGui::JournalViewModel : IJournalViewModel for (MWDialogue::Topic::TEntryIter j = quest->begin (); j != quest->end (); ++j) { if (i->mInfoId == *j) - visitor (JournalEntry (this, i)); + visitor (JournalEntryImpl (this, i)); } } } else { for(MWBase::Journal::TEntryIter i = journal->begin(); i != journal->end (); ++i) - visitor (JournalEntry (this, i)); + visitor (JournalEntryImpl (this, i)); } } @@ -376,13 +376,13 @@ struct MWGui::JournalViewModel : IJournalViewModel } - struct topicEntry : BaseEntry + struct TopicEntryImpl : BaseEntry { MWDialogue::Topic const & Topic; mutable std::string source_buffer; - topicEntry (JournalViewModel const * Model, MWDialogue::Topic const & Topic, iterator_t itr) : + TopicEntryImpl (JournalViewModelImpl const * Model, MWDialogue::Topic const & Topic, iterator_t itr) : BaseEntry (Model, itr), Topic (Topic) {} @@ -401,14 +401,14 @@ struct MWGui::JournalViewModel : IJournalViewModel }; - void visitTopicEntries (topic_id topicId, boost::function visitor) const + void visitTopicEntries (topic_id topicId, boost::function visitor) const { typedef MWDialogue::Topic::TEntryIter iterator_t; MWDialogue::Topic const & Topic = * reinterpret_cast (topicId); for (iterator_t i = Topic.begin (); i != Topic.end (); ++i) - visitor (topicEntry (this, Topic, i)); + visitor (TopicEntryImpl (this, Topic, i)); } }; @@ -466,7 +466,7 @@ static void injectMonthName (std::ostream & os, int month) #endif } -IJournalViewModel::ptr IJournalViewModel::create () +JournalViewModel::ptr JournalViewModel::create () { - return boost::make_shared (); + return boost::make_shared (); } diff --git a/apps/openmw/mwgui/journalviewmodel.hpp b/apps/openmw/mwgui/journalviewmodel.hpp index 5c38f4965d..ffc301b996 100644 --- a/apps/openmw/mwgui/journalviewmodel.hpp +++ b/apps/openmw/mwgui/journalviewmodel.hpp @@ -16,9 +16,9 @@ namespace MWGui // specifically to the needs of the journal GUI. It isolates /// the journal GUI from the implementation details of the /// game data store. - struct IJournalViewModel + struct JournalViewModel { - typedef boost::shared_ptr ptr; + typedef boost::shared_ptr ptr; typedef intptr_t quest_id; typedef intptr_t topic_id; @@ -26,7 +26,7 @@ namespace MWGui typedef std::pair utf8_span; /// The base interface for both journal entries and topics. - struct IEntry + struct Entry { /// returns the body text for the journal entry /// @@ -42,7 +42,7 @@ namespace MWGui }; /// An interface to topic data. - struct ITopicEntry : IEntry + struct TopicEntry : Entry { /// Returns a pre-formatted span of UTF8 encoded text representing /// the name of the NPC this portion of dialog was heard from. @@ -50,7 +50,7 @@ namespace MWGui }; /// An interface to journal data. - struct IJournalEntry : IEntry + struct JournalEntry : Entry { /// Returns a pre-formatted span of UTF8 encoded text representing /// the in-game date this entry was added to the journal. @@ -74,7 +74,7 @@ namespace MWGui virtual void visitQuestNames (bool active_only, boost::function visitor) const = 0; /// walks over the journal entries related to the specified quest identified by its id - virtual void visitJournalEntries (quest_id questId, boost::function visitor) const = 0; + virtual void visitJournalEntries (quest_id questId, boost::function visitor) const = 0; /// provides the name of the topic specified by its id virtual void visitTopicName (topic_id topicId, boost::function visitor) const = 0; @@ -83,7 +83,7 @@ namespace MWGui virtual void visitTopicNamesStartingWith (int character, boost::function < void (topic_id , utf8_span) > visitor) const = 0; /// walks over the topic entries for the topic specified by its identifier - virtual void visitTopicEntries (topic_id topicId, boost::function visitor) const = 0; + virtual void visitTopicEntries (topic_id topicId, boost::function visitor) const = 0; // create an instance of the default journal view model implementation static ptr create (); diff --git a/apps/openmw/mwgui/journalwindow.cpp b/apps/openmw/mwgui/journalwindow.cpp index 4b9cc5fa4c..d51df5062b 100644 --- a/apps/openmw/mwgui/journalwindow.cpp +++ b/apps/openmw/mwgui/journalwindow.cpp @@ -94,7 +94,7 @@ namespace return getWidget (name); } - JournalWindowImpl (IJournalViewModel::ptr Model) + JournalWindowImpl (JournalViewModel::ptr Model) : WindowBase("openmw_journal.layout"), JournalBooks (Model) { mMainWidget->setVisible(false); @@ -420,7 +420,7 @@ namespace } // glue the implementation to the interface -IJournalWindow * MWGui::JournalWindow::create (IJournalViewModel::ptr Model) +JournalWindow * MWGui::JournalWindow::create (JournalViewModel::ptr Model) { return new JournalWindowImpl (Model); } diff --git a/apps/openmw/mwgui/journalwindow.hpp b/apps/openmw/mwgui/journalwindow.hpp index 8f69a92c71..63770ec1aa 100644 --- a/apps/openmw/mwgui/journalwindow.hpp +++ b/apps/openmw/mwgui/journalwindow.hpp @@ -8,12 +8,12 @@ namespace MWBase { class WindowManager; } namespace MWGui { - struct IJournalViewModel; + struct JournalViewModel; struct JournalWindow { /// construct a new instance of the one JournalWindow implementation - static JournalWindow * create (boost::shared_ptr Model); + static JournalWindow * create (boost::shared_ptr Model); /// destroy this instance of the JournalWindow implementation virtual ~JournalWindow () {}; diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 059f877527..c76faf6f49 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -148,7 +148,7 @@ namespace MWGui mMap = new MapWindow(cacheDir); mStatsWindow = new StatsWindow(); mConsole = new Console(w,h, consoleOnlyScripts); - mJournal = JournalWindow::create(IJournalViewModel::create ()); + mJournal = JournalWindow::create(JournalViewModel::create ()); mMessageBoxManager = new MessageBoxManager(); mInventoryWindow = new InventoryWindow(mDragAndDrop); mTradeWindow = new TradeWindow();