title: Documenting namespaces with Doxygen
body: <p>I'm having issues with Doxygen recognizing namespaces and modules.  I believe the issue surrounds whether to place the <code>\addtogroup</code> within the namespace or outside the namespace.</p>
  
  <h2>Example 1, outside the namespace:</h2>
  
  <pre><code>/*!
   *  \addtogroup Records
   *  @{
   */
  
  //! Generic record interfaces and implementations
  namespace Records
  {
  
    //! Describes the record interface  
    class Interface;
  
  } // End namespace Records
  
  /*! @} End of Doxygen Groups*/
  </code></pre>
  
  <h2>Example 2 - within namespace</h2>
  
  <pre><code>//! Generic record interfaces and implementations
  namespace Records
  {
  /*!
   *  \addtogroup Records
   *  @{
   */
  
  
    //! Describes the record interface  
    class Interface;
  
  /*! @} End of Doxygen Groups*/
  
  } // End namespace Records
  </code></pre>
  
  <p>I would like the <code>namespace Records</code> to appear under the Doxygen <em>Namespaces</em> tab and indirectly under the <em>Modules</em> tab.  Clicking on the item in the <em>Namespaces</em> page should produce a page containing <code>Records::Interface</code>.  Clicking on the item in the <em>Modules</em> tab should also produce a page containing <code>Records::Interface</code>.  </p>
  
  <p>In my Doxygen documentation, I have items missing from <em>Namespaces</em> tab that are in <em>Modules</em> and vice-versa, due to my inconsistency resulting from this dilemma.  </p>
  
  <p>So which is the proper method, Example 1 or Example 2?
  {The Doxygen manual is not clear on this topic.}<br>
  <a href="http://www.doxygen.nl/manual/commands.html#cmdaddtogroup" rel="nofollow noreferrer">Doxygen: \addtogroup</a><br>
  <a href="http://www.doxygen.nl/docblocks.html" rel="nofollow noreferrer">Doxygen: documenting namespaces</a></p>