Extract Doxygen docs for anonymous namespaces.
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 15 Oct 2012 07:43:09 +0000 (10:43 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Mon, 15 Oct 2012 15:13:40 +0000 (18:13 +0300)
With this, no Doxygen documentation in the source should get ignored.

Also added documentation for anonymous namespace members that were
causing warnings.

Related to #638.

Change-Id: I31af809272123fbc7f77ea9d3b186eddb07935bb

20 files changed:
doxygen/Doxyfile-common.cmakein
doxygen/Doxyfile-full.cmakein
src/gromacs/analysisdata/tests/analysisdata.cpp
src/gromacs/analysisdata/tests/arraydata.cpp
src/gromacs/analysisdata/tests/average.cpp
src/gromacs/analysisdata/tests/histogram.cpp
src/gromacs/mdlib/tests/fft.cpp
src/gromacs/onlinehelp/helptopic.h
src/gromacs/onlinehelp/tests/helpformat.cpp
src/gromacs/onlinehelp/tests/helpmanager.cpp
src/gromacs/options/optionstoragetemplate.h
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/tests/selectionoption.cpp
src/gromacs/trajectoryanalysis/modules/select.cpp
src/gromacs/trajectoryanalysis/tests/select.cpp
src/gromacs/utility/exceptions.cpp
src/gromacs/utility/programinfo.cpp
src/gromacs/utility/stringutil.cpp
src/gromacs/utility/tests/stringutil.cpp
src/testutils/mock_datamodule.cpp

index a009c52ba4eb30ccefe58f27e430a51b421954c9..10686353495149b7e5ecb7f9467c37c93b9681a0 100644 (file)
@@ -10,6 +10,8 @@ EXCLUDE                = @CMAKE_SOURCE_DIR@/src/contrib \
                          @CMAKE_SOURCE_DIR@/src/gromacs/legacyheaders/thread_mpi/atomic \
                          @CMAKE_SOURCE_DIR@/src/gromacs/selection/scanner.cpp @NB_KERNEL_DIRS_TO_IGNORE_IN_DOXYGEN@
 EXCLUDE_SYMBOLS        = YY* yy* _gmx_sel_yy*
+EXCLUDE_SYMBOLS       += TEST TEST_F TEST_P INSTANTIATE_TEST_CASE_P
+EXCLUDE_SYMBOLS       += MOCK_METHOD* MOCK_CONST_METHOD*
 FULL_PATH_NAMES        = YES
 STRIP_FROM_PATH        = @CMAKE_SOURCE_DIR@
 STRIP_FROM_INC_PATH    = @CMAKE_SOURCE_DIR@/src
index 9f3c8e8777ec327df15894e4a4d9d25e0aa2c0df..670a7f46ab1a316d970a5ac6b10a8465c9bd17e8 100644 (file)
@@ -8,6 +8,7 @@ ENABLED_SECTIONS       = libapi internal
 INTERNAL_DOCS          = YES
 EXTRACT_STATIC         = YES
 EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_ANON_NSPACES   = YES
 HIDE_UNDOC_CLASSES     = YES
 WARN_LOGFILE           = doxygen-full.log
 HTML_OUTPUT            = html-full
index a1c10c02daa82a8b112216702f31133c9b562b43..a453e8af30967e0a70fa029fdda0029ec7ca5a47 100644 (file)
@@ -121,12 +121,13 @@ TEST(AnalysisDataInitializationTest, ChecksMultiPointModules)
 }
 
 
+//! Test fixture for gmx::AnalysisData.
 typedef gmx::test::AnalysisDataTestFixture AnalysisDataTest;
 
-// Input data for the tests below.
 using gmx::test::END_OF_FRAME;
 using gmx::test::MPSTOP;
-static const real inputdata[] = {
+//! Input data for gmx::AnalysisData tests.
+const real inputdata[] = {
     1.0,  0.0, 1.0, 2.0, END_OF_FRAME,
     2.0,  1.0, 1.0, 1.0, END_OF_FRAME,
     3.0,  2.0, 0.0, 0.0, END_OF_FRAME
@@ -230,8 +231,8 @@ TEST_F(AnalysisDataTest, LimitedStorageWorks)
     ASSERT_NO_THROW(presentAllData(input, &data));
 }
 
-// Input data for the tests below.
-static const real multipointinputdata[] = {
+//! Input data for multipoint gmx::AnalysisData tests.
+const real multipointinputdata[] = {
     1.0,  0.0, 1.0, 2.0, MPSTOP, 1.1, 2.1, 1.1, MPSTOP, 2.2, 1.2, 0.2, END_OF_FRAME,
     2.0,  1.0, 1.0, 1.0, MPSTOP, 2.1, 1.1, 0.1, MPSTOP, 1.2, 0.2, 1.2, END_OF_FRAME,
     3.0,  2.0, 0.0, 0.0, MPSTOP, 3.1, 2.1, 1.1, MPSTOP, 0.2, 2.2, 1.2, END_OF_FRAME
index f135242947e7afdeeb001551fda0e7b0475a73d1..728546dea6b527c76ad72eedf80bd42891d58e45 100644 (file)
@@ -53,10 +53,12 @@ namespace
  * Tests for gmx::AnalysisArrayData.
  */
 
+//! Test fixture for gmx::AnalysisArrayData.
 typedef gmx::test::AnalysisDataTestFixture AnalysisArrayDataTest;
 
 using gmx::test::END_OF_FRAME;
-static const real inputdata[] = {
+//! Input data for gmx::AnalysisArrayData tests.
+const real inputdata[] = {
     1.0,  0.0, 1.0, 2.0, END_OF_FRAME,
     2.0,  1.0, 1.0, 1.0, END_OF_FRAME,
     3.0,  2.0, 0.0, 0.0, END_OF_FRAME,
index 5dc2dafb60a3364acdb557ca4ec072732417b08b..fb410f8d519fb5d4baa6093c56802ecd6cfd69ed 100644 (file)
@@ -55,11 +55,12 @@ namespace
  * Tests for gmx::AnalysisDataAverageModule.
  */
 
+//! Test fixture for gmx::AnalysisDataAverageModule.
 typedef gmx::test::AnalysisDataTestFixture AverageModuleTest;
 
-// Input data for the tests below.
 using gmx::test::END_OF_FRAME;
-static const real inputdata[] = {
+//! Input data for gmx::AnalysisDataAverageModule tests.
+const real inputdata[] = {
     1.0,  0.0, 1.0, 2.0, END_OF_FRAME,
     2.0,  1.0, 1.0, 1.0, END_OF_FRAME,
     3.0,  2.0, 0.0, 0.0, END_OF_FRAME
index bca838d962ec2d0127bcc65435f2da01cf8a1d70..97a1a494eb211dd0e35064aa3faf1a1ff5b5d416 100644 (file)
@@ -141,12 +141,13 @@ TEST(AnalysisHistogramSettingsTest, InitializesFromRangeWithRoundedRange)
  * Tests for gmx::AnalysisDataSimpleHistogramModule.
  */
 
+//! Test fixture for gmx::AnalysisDataSimpleHistogramModule.
 typedef gmx::test::AnalysisDataTestFixture SimpleHistogramModuleTest;
 
-// Input data for the tests below.
 using gmx::test::END_OF_FRAME;
 using gmx::test::MPSTOP;
-static const real simpleinputdata[] = {
+//! Input data for gmx::AnalysisDataSimpleHistogramModule tests.
+const real simpleinputdata[] = {
     1.0,  0.7, MPSTOP, 1.1, MPSTOP, 2.3, MPSTOP, 2.9, END_OF_FRAME,
     2.0,  1.3, MPSTOP, 2.2, END_OF_FRAME,
     3.0,  3.3, MPSTOP, 1.2, MPSTOP, 1.3, END_OF_FRAME
@@ -198,10 +199,11 @@ TEST_F(SimpleHistogramModuleTest, ComputesCorrectlyWithAll)
  * Tests for gmx::AnalysisDataWeightedHistogramModule.
  */
 
+//! Test fixture for gmx::AnalysisDataWeightedHistogramModule.
 typedef gmx::test::AnalysisDataTestFixture WeightedHistogramModuleTest;
 
-// Input data for the tests below (both weighted and bin average modules).
-static const real weightedinputdata[] = {
+//! Input data for both weighted histogram and bin average module tests.
+const real weightedinputdata[] = {
     1.0,  0.7, 0.5, MPSTOP, 1.1, 1.0, MPSTOP, 2.3, 1.0, MPSTOP, 2.9, 2.0, END_OF_FRAME,
     2.0,  1.3, 1.0, MPSTOP, 2.2, 3.0, END_OF_FRAME,
     3.0,  3.3, 0.5, MPSTOP, 1.2, 2.0, MPSTOP, 1.3, 1.0, END_OF_FRAME
@@ -253,6 +255,7 @@ TEST_F(WeightedHistogramModuleTest, ComputesCorrectlyWithAll)
  * Tests for gmx::AnalysisDataBinAverageModule.
  */
 
+//! Test fixture for gmx::AnalysisDataBinAverageModule.
 typedef gmx::test::AnalysisDataTestFixture BinAverageModuleTest;
 
 TEST_F(BinAverageModuleTest, ComputesCorrectly)
@@ -298,10 +301,11 @@ TEST_F(BinAverageModuleTest, ComputesCorrectlyWithAll)
  * corresponding facilities in gmx::test::AnalysisDataTestFixture.
  */
 
+//! Test fixture for gmx::AbstractAverageHistogram.
 typedef gmx::test::AnalysisDataTestFixture AbstractAverageHistogramTest;
 
-// Input data for average histogram tests.
-static const real averageinputdata[] = {
+//! Input data for gmx::AbstractAverageHistogram tests.
+const real averageinputdata[] = {
     1.0, 2.0, 1.0, END_OF_FRAME,
     1.5, 1.0, 1.0, END_OF_FRAME,
     2.0, 3.0, 2.0, END_OF_FRAME,
@@ -321,6 +325,7 @@ class MockAverageHistogram : public gmx::AbstractAverageHistogram
 {
     public:
         MockAverageHistogram() {}
+        //! Creates a histogram module with defined bin parameters.
         explicit MockAverageHistogram(const gmx::AnalysisHistogramSettings &settings)
             : AbstractAverageHistogram(settings)
         {
index 7f46120236b36cc847989cbcbab1986fa8128bc9..6c03ece003a3c43e61623e9b58fe7374ffe5fe5a 100644 (file)
@@ -48,7 +48,8 @@
 namespace
 {
 
-static const real inputdata[] = { //print ",\n".join([",".join(["%4s"%(random.randint(-99,99)/10.,) for i in range(25)]) for j in range(20)])
+//! Input data for FFT tests.
+const real inputdata[] = { //print ",\n".join([",".join(["%4s"%(random.randint(-99,99)/10.,) for i in range(25)]) for j in range(20)])
         -3.5, 6.3, 1.2, 0.3, 1.1,-5.7, 5.8,-1.9,-6.3,-1.4, 7.4, 2.4,-9.9,-7.2, 5.4, 6.1,-1.9,-7.6, 1.4,-3.5, 0.7, 5.6,-4.2,-1.1,-4.4,
         -6.3,-7.2, 4.6,-3.0,-0.9, 7.2, 2.5,-3.6, 6.1,-3.2,-2.1, 6.5,-0.4,-9.0, 2.3, 8.4, 4.0,-5.2,-9.0, 4.7,-3.7,-2.0,-9.5,-3.9,-3.6,
          7.1, 0.8,-0.6, 5.2,-9.3,-4.5, 5.9, 2.2,-5.8, 5.0, 1.2,-0.1, 2.2, 0.2,-7.7, 1.9,-8.4, 4.4, 2.3,-2.9, 6.7, 2.7, 5.8,-3.6, 8.9,
index bd3f1d5dc25d9e6e5a176de612136330de38b6d2..41b0099249638aa1ea363313007eaf1633ed8a44 100644 (file)
@@ -164,7 +164,7 @@ class AbstractCompositeHelpTopic : public HelpTopicInterface
         }
 
     protected:
-        //! \copydoc AbstractSimpleHelpTopic::helpText()
+        //! \copydoc gmx::AbstractSimpleHelpTopic::helpText()
         virtual std::string helpText() const = 0;
 
         /*! \brief
index dbe0ac5331bcfb3c5c1c79a1868a13d056566c07..ba6fa0562f9735e231eb2381ede4426fcd98c5d3 100644 (file)
@@ -44,7 +44,9 @@
 namespace
 {
 
+//! Simple test string for wrapping.
 const char g_wrapText[] = "A quick brown fox jumps over the lazy dog";
+//! Test string for wrapping with embedded line breaks.
 const char g_wrapText2[] = "A quick brown fox jumps\nover the lazy dog";
 
 /********************************************************************
index 6bd66c677efec47d5519f15c156f62470a4d2d34..5eed058804f5a1287b5393a4b75e32c409b85b4d 100644 (file)
@@ -82,6 +82,7 @@ HelpTestBase::HelpTestBase()
  * Tests for HelpManager
  */
 
+//! Test fixture for gmx::HelpManager.
 typedef HelpTestBase HelpManagerTest;
 
 TEST_F(HelpManagerTest, HandlesRootTopic)
index c777c4950cc822f60fdf8438dccb679359221b6a..2aa56c1824249a2b3805e86fde464598af9dd812 100644 (file)
@@ -118,7 +118,7 @@ class OptionStorageTemplate : public AbstractOptionStorage
 
 
         virtual void clearSet();
-        /*! \copydoc AbstractOptionStorage::convertValue()
+        /*! \copydoc gmx::AbstractOptionStorage::convertValue()
          *
          * Derived classes should call addValue() after they have converted
          * \p value to the storage type.  It is allowed to call addValue()
index 91123a6288d4ea09451b6960ce7a3a6f75e5fd05..b7dbfdd01224ebf341b3859e64adb85e752884f3 100644 (file)
@@ -118,6 +118,16 @@ SelectionCollection::Impl::clearSymbolTable()
 namespace
 {
 
+/*! \brief
+ * Reads a single selection line from stdin.
+ *
+ * \param[in]  infile        File to read from (typically File::standardInput()).
+ * \param[in]  bInteractive  Whether to print interactive prompts.
+ * \param[out] line          The read line in stored here.
+ * \returns true if something was read, false if at end of input.
+ *
+ * Handles line continuation, reading also the continuing line(s) in one call.
+ */
 bool promptLine(File *infile, bool bInteractive, std::string *line)
 {
     if (bInteractive)
@@ -149,9 +159,20 @@ bool promptLine(File *infile, bool bInteractive, std::string *line)
     {
         fprintf(stderr, "\n");
     }
-    return line;
+    return true;
 }
 
+/*! \brief
+ * Helper function for tokenizing the input and pushing them to the parser.
+ *
+ * \param     scanner       Tokenizer data structure.
+ * \param     parserState   Parser data structure.
+ * \param[in] bInteractive  Whether to operate in interactive mode.
+ *
+ * Repeatedly reads tokens using \p scanner and pushes them to the parser with
+ * \p parserState until there is no more input, or until enough input is given
+ * (only in interactive mode).
+ */
 int runParserLoop(yyscan_t scanner, _gmx_sel_yypstate *parserState,
                   bool bInteractive)
 {
@@ -167,6 +188,9 @@ int runParserLoop(yyscan_t scanner, _gmx_sel_yypstate *parserState,
             {
                 break;
             }
+            // Empty commands cause the interactive parser to print out
+            // status information. This avoids producing those unnecessarily,
+            // e.g., from "resname RA;;".
             if (prevToken == CMD_SEP && token == CMD_SEP)
             {
                 continue;
index 3deb155dd6a49a0c77087b39987f906848dbe27f..5838c8ab9773402512060bd78efa4d054e15e8f4 100644 (file)
@@ -86,6 +86,7 @@ void SelectionOptionTestBase::setManager()
  * Tests for SelectionOption
  */
 
+//! Test fixture for gmx::SelectionOption.
 typedef SelectionOptionTestBase SelectionOptionTest;
 
 TEST_F(SelectionOptionTest, ParsesSimpleSelection)
index 93a686524f7df093ee20e2d69f4442bfb28e5d50..639ad5f05bc0066bd71c5be6c896ee046b073ed0 100644 (file)
@@ -85,6 +85,11 @@ class IndexFileWriterModule : public AnalysisDataModuleInterface
 
         //! Sets the file name to write the index file to.
         void setFileName(const std::string &fnm);
+        /*! \brief
+         * Adds information about a group to be printed.
+         *
+         * Must be called for each group present in the input data.
+         */
         void addGroup(const std::string &name, bool bDynamic);
 
         virtual int flags() const;
@@ -189,6 +194,8 @@ IndexFileWriterModule::pointsAdded(const AnalysisDataPointSetRef &points)
     if (points.firstColumn() == 0)
     {
         ++currentGroup_;
+        GMX_RELEASE_ASSERT(currentGroup_ < static_cast<int>(groups_.size()),
+                           "Too few groups initialized");
         if (bFirstFrame || groups_[currentGroup_].bDynamic)
         {
             if (!bFirstFrame || currentGroup_ > 0)
index b358291035e86a097d4eec511aa06b77450fd4ad..174648dfd47adf9daff5499ec2fc6e6d0400f047 100644 (file)
@@ -60,6 +60,7 @@ using gmx::test::CommandLine;
  * Tests for gmx::analysismodules::Select.
  */
 
+//! Test fixture for the select analysis module.
 typedef gmx::test::TrajectoryAnalysisModuleTestFixture<gmx::analysismodules::Select>
         SelectModuleTest;
 
index fc4ea3340099761c75cdff1e7b15019e487d1d51..11cd78e5b6063c2835f3e62f59bdd3368fe1de88 100644 (file)
@@ -217,6 +217,16 @@ int NotImplementedError::errorCode() const
 namespace
 {
 
+/*! \brief
+ * Prints error information for an exception object.
+ *
+ * \param[in] fp      File to write the information out to (typically stderr).
+ * \param[in] ex      Exception object to print.
+ * \param[in] indent  Indentation for the information.
+ *
+ * If the exception contains nested exceptions, information from them is
+ * recursively printed.
+ */
 void printExceptionMessage(FILE *fp, const std::exception &ex, int indent)
 {
     const boost::exception *boostEx = dynamic_cast<const boost::exception *>(&ex);
index 4acaee132dcc0435c746c939c2fed161eb8be27e..3c86fa88b1ed15af50a6031adb52e883e79514ad 100644 (file)
@@ -62,9 +62,11 @@ namespace gmx
 
 namespace
 {
+//! Mutex for updates to the global program info objects.
 tMPI::mutex g_programInfoMutex;
 //! Partially filled program info, needed to support set_program_name().
 boost::scoped_ptr<ProgramInfo> g_partialProgramInfo;
+//! Global program info; stores the object initialized with ProgramInfo::init().
 boost::scoped_ptr<ProgramInfo> g_programInfo;
 } // namespace
 
index 61ba3a0c37194d704f4d2c7f5b5e5c4b5dc59d2f..1212e56b98671ab950cc37e5c0ca217d76a123aa 100644 (file)
@@ -131,6 +131,16 @@ std::string concatenateStrings(const char *const *sarray, size_t count)
 namespace
 {
 
+/*! \brief
+ * Common implementation for string replacement functions.
+ *
+ * \param[in] input  Input string.
+ * \param[in] from   String to find.
+ * \param[in] to     String to use to replace \p from.
+ * \param[in] bWholeWords  Whether to only consider matches to whole words.
+ * \returns   \p input with all occurrences of \p from replaced with \p to.
+ * \throws    std::bad_alloc if out of memory.
+ */
 std::string
 replaceInternal(const std::string &input, const char *from, const char *to,
                 bool bWholeWords)
index b1c317076440385f2c26eeea479193309cfc19d7..d8d0bf22b215f178cf99730cb39914f31420ce92 100644 (file)
@@ -114,6 +114,7 @@ TEST(FormatStringTest, HandlesLongStrings)
  * Tests for concatenateStrings()
  */
 
+//! Test fixture for gmx::concatenateStrings().
 typedef gmx::test::StringTestBase ConcatenateStringsTest;
 
 TEST_F(ConcatenateStringsTest, HandlesDifferentStringEndings)
@@ -190,6 +191,7 @@ const char g_wrapTextLongWord[]
 //! Test string for wrapping with extra whitespace.
 const char g_wrapTextWhitespace[] = " A quick brown   fox jumps  \n over the lazy dog";
 
+//! Test fixture for gmx::TextLineWrapper.
 typedef gmx::test::StringTestBase TextLineWrapperTest;
 
 TEST_F(TextLineWrapperTest, HandlesEmptyStrings)
index d01695e586b7f290bbab55ba12150cd91521db70..19ec7d2242ac824a493d0a972436ae94bb12c0dc 100644 (file)
@@ -215,6 +215,12 @@ MockAnalysisDataModule::Impl::finishReferenceFrame(
 namespace
 {
 
+/*! \brief
+ * Helper function for checking the data frame header against static data.
+ *
+ * \param[in] header    Frame header to check.
+ * \param[in] refFrame  Data to check against.
+ */
 void checkHeader(const AnalysisDataFrameHeader &header,
                  const AnalysisDataTestInputFrame &refFrame)
 {
@@ -223,6 +229,13 @@ void checkHeader(const AnalysisDataFrameHeader &header,
     EXPECT_FLOAT_EQ(refFrame.dx(), header.dx());
 }
 
+/*! \brief
+ * Helper function for checking a point set against static data.
+ *
+ * \param[in] points       Point set to check.
+ * \param[in] refPoints    Data to check against.
+ * \param[in] columnOffset Offset of first column of \p points in \p refPoints.
+ */
 void checkPoints(const AnalysisDataPointSetRef &points,
                  const AnalysisDataTestInputPointSet &refPoints,
                  int columnOffset)
@@ -236,6 +249,12 @@ void checkPoints(const AnalysisDataPointSetRef &points,
     }
 }
 
+/*! \brief
+ * Helper function for checking a full frame against static data.
+ *
+ * \param[in] frame     Frame to check.
+ * \param[in] refFrame  Data to check against.
+ */
 void checkFrame(const AnalysisDataFrameRef &frame,
                 const AnalysisDataTestInputFrame &refFrame)
 {