Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Documenting namespaces that span multiple files doxygen

Consider I have 2 header files.

// HEADER 1
/**
 * Doc  for Foo here?
 */
namespace Foo {
  class This {...};
}

&&

// HEADER 2
/**
 * Doc for Foo here?
 */
namespace Foo {
  class That {...};
}

How should I handle this when documenting with Doxygen?

like image 250
rhubarb Avatar asked Aug 19 '10 19:08

rhubarb


1 Answers

Maybe neither.

For example, imagine you have "<root>/utility/header1.hpp" which has its contents in namespace utility and "<root>/utility/header2.hpp" which does also.

You could add a file: "<root>/utility.hpp" which documents the utility namespace. You could put this at the top #error Documentation only. to make sure it's not accidentally included.

But I would recommend at least making some out-of-the-way file to keep it in a sane place (and not mixed in randomly with some class.)

like image 161
GManNickG Avatar answered Oct 15 '22 15:10

GManNickG