X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fonlinehelp%2Fhelpmanager.cpp;h=60a8b7f48ed1cbeb63bb45226d58678706ac9d58;hb=7a6907d2184cf7bf3ce09e83e9d902f9787a3eb0;hp=89cb7cc811c0f916505b13fc7d0b089f497562a5;hpb=9eb0581bed7c5147f8919ab19a7e2ed55e0e1514;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/onlinehelp/helpmanager.cpp b/src/gromacs/onlinehelp/helpmanager.cpp index 89cb7cc811..60a8b7f48e 100644 --- a/src/gromacs/onlinehelp/helpmanager.cpp +++ b/src/gromacs/onlinehelp/helpmanager.cpp @@ -46,8 +46,8 @@ #include #include -#include "gromacs/onlinehelp/helptopicinterface.h" #include "gromacs/onlinehelp/helpwritercontext.h" +#include "gromacs/onlinehelp/ihelptopic.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/stringutil.h" @@ -67,7 +67,7 @@ class HelpManager::Impl { public: //! Container type for keeping the stack of active topics. - typedef std::vector TopicStack; + typedef std::vector TopicStack; //! Initializes a new manager with the given context. explicit Impl(const HelpWriterContext &context) @@ -78,7 +78,7 @@ class HelpManager::Impl //! Whether the active topic is the root topic. bool isAtRootTopic() const { return topicStack_.size() == 1; } //! Returns the active topic. - const HelpTopicInterface ¤tTopic() const + const IHelpTopic ¤tTopic() const { return *topicStack_.back(); } @@ -115,7 +115,7 @@ std::string HelpManager::Impl::currentTopicAsString() const * HelpManager */ -HelpManager::HelpManager(const HelpTopicInterface &rootTopic, +HelpManager::HelpManager(const IHelpTopic &rootTopic, const HelpWriterContext &context) : impl_(new Impl(context)) { @@ -128,14 +128,14 @@ HelpManager::~HelpManager() void HelpManager::enterTopic(const char *name) { - const HelpTopicInterface &topic = impl_->currentTopic(); + const IHelpTopic &topic = impl_->currentTopic(); if (!topic.hasSubTopics()) { GMX_THROW(InvalidInputError( formatString("Help topic '%s' has no subtopics", impl_->currentTopicAsString().c_str()))); } - const HelpTopicInterface *newTopic = topic.findSubTopic(name); + const IHelpTopic *newTopic = topic.findSubTopic(name); if (newTopic == NULL) { if (impl_->isAtRootTopic()) @@ -160,7 +160,7 @@ void HelpManager::enterTopic(const std::string &name) void HelpManager::writeCurrentTopic() const { - const HelpTopicInterface &topic = impl_->currentTopic(); + const IHelpTopic &topic = impl_->currentTopic(); const char *title = topic.title(); HelpWriterContext context(impl_->rootContext_); context.enterSubSection(title != NULL ? title : "");