Add subsection depth to HelpWriterContext
[alexxy/gromacs.git] / src / gromacs / onlinehelp / helptopic.cpp
index 8bcaa6ac9443c44fadd5d74544de1e7990559583..1cf1585187ef3837339d3feb0562c1026780b584 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 namespace gmx
 {
 
-/*! \cond libapi */
-void writeBasicHelpTopic(const HelpWriterContext  &context,
-                         const HelpTopicInterface &topic,
-                         const std::string        &text)
-{
-    const char *title = topic.title();
-    if (title != NULL && title[0] != '\0')
-    {
-        context.writeTitle(title);
-    }
-    context.writeTextBlock(text);
-}
-//! \endcond
-
 /********************************************************************
  * AbstractSimpleHelpTopic
  */
@@ -87,7 +73,7 @@ AbstractSimpleHelpTopic::findSubTopic(const char * /* name */) const
 
 void AbstractSimpleHelpTopic::writeHelp(const HelpWriterContext &context) const
 {
-    writeBasicHelpTopic(context, *this, helpText());
+    context.writeTextBlock(helpText());
 }
 
 /********************************************************************
@@ -144,7 +130,7 @@ AbstractCompositeHelpTopic::findSubTopic(const char *name) const
 
 void AbstractCompositeHelpTopic::writeHelp(const HelpWriterContext &context) const
 {
-    writeBasicHelpTopic(context, *this, helpText());
+    context.writeTextBlock(helpText());
     writeSubTopicList(context, "\nAvailable subtopics:");
 }