Skip to content

Commit 5833ff3

Browse files
authored
CGAL: About namespace internal (#8896)
## Summary of Changes The Developer Manual recommends `namespace CGAL::internal::Pkg`, whereas we have decided that it must be `namespace CGAL::Pkg::internal`. See also Issue #257 ## Release Management * Affected package(s): Developer Manual
2 parents f35ecec + 21d4eec commit 5833ff3

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

Documentation/doc/Documentation/Developer_manual/Chapter_namespaces.txt

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,31 @@ but the better alternative is the usage of `namespace`.
1313

1414
\section Developer_manualNamespaceCGAL Namespace CGAL
1515

16-
All names introduced by \cgal should be in namespace `CGAL`, <I>e.g.</I>:
16+
All names introduced by \cgal should be in namespace `CGAL`, or in a subnamespace
17+
corresponding to a package, <I>e.g.</I>:
1718
\code{.cpp}
1819
#include <something>
1920

2021
namespace CGAL {
2122

22-
class My_new_cgal_class {};
23+
/*!
24+
* This class ...
25+
*/
26+
class Foo {};
27+
28+
29+
namespace Polygon_mesh_processing {
2330

24-
My_new_cgal_class
25-
my_new_function( My_new_cgal_class& );
31+
/*!
32+
* modifies `f` by ...
33+
*/
34+
void
35+
bar( foo & f);
2636

37+
} // namespace Polygon_mesh_processing
2738
} // namespace CGAL
2839
\endcode
40+
2941
Make sure not to have include statements inside the
3042
`namespace CGAL`. Otherwise, all names defined in the file included will be
3143
added to the namespace.
@@ -35,19 +47,15 @@ added to the namespace.
3547
All names introduced by \cgal which are not documented to the user
3648
should be under an `internal` subnamespace of `CGAL`, <I>e.g.</I>:
3749
\code{.cpp}
38-
namespace CGAL { namespace internal {
39-
40-
class My_undocumented_class {};
41-
42-
void my_new_function( My_undocumented_class& );
43-
44-
}} // namespace CGAL::internal
45-
46-
namespace CGAL { namespace internal { namespace Package { namespace tags {
50+
namespace CGAL {
51+
namespace Polygon_mesh_processing {
52+
namespace internal {
4753

48-
class Some_further_class_local_to_Package;
54+
class Baz_used_by_foo {};
4955

50-
}}}} // namespace CGAL::internal::Package::tags
56+
} // namespace internal
57+
} // namespace Polygon_mesh_processing
58+
} // namespace CGAL
5159
\endcode
5260

5361
\section Developer_manualNoteonglobaltemplatefunctions Note on global template functions

0 commit comments

Comments
 (0)