Skip to content

Commit

Permalink
Use Doxygen @cond command
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjseitz authored and jdorn-gt committed Aug 23, 2024
1 parent 1e35eea commit 3b5766f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion doc/cpp/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2090,7 +2090,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = GTIRB_DOXYGEN=1 GTIRB_DEPRECATED_UTILS
PREDEFINED = GTIRB_DEPRECATED_UTILS

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down
14 changes: 6 additions & 8 deletions include/gtirb/Allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,23 @@
#include <utility>
#include <vector>

// Hide the GTIRB_DEPRECATED_UTILS macro from docs
#ifndef GTIRB_DOXYGEN
/// @cond INTERNAL
#ifndef GTIRB_WRAP_UTILS_IN_NAMESPACE
#define GTIRB_DEPRECATED_UTILS \
[[deprecated("Define GTIRB_WRAP_UTILS_IN_NAMESPACE and access via the " \
"gtirb namespace to suppress this error.")]]
#else
#define GTIRB_DEPRECATED_UTILS
#endif
#endif
/// @endcond

namespace gtirb {

// We want clients to use the names in the gtirb namespace, so we exclude
// the allocator namespace when generating documentation.
#ifndef GTIRB_DOXYGEN
/// @cond INTERNAL
namespace allocator {
#endif
/// @endcond

/// Returns the next power of two (in 64-bits) that is strictly greater than A.
/// Returns zero on overflow.
Expand Down Expand Up @@ -357,10 +356,9 @@ template <typename T> class GTIRB_DEPRECATED_UTILS SpecificBumpPtrAllocator {
}
};

// Exclude allocator namespace from generated documentation.
#ifndef GTIRB_DOXYGEN
/// @cond INTERNAL
} // namespace allocator
#endif
/// @endcond

#ifdef GTIRB_WRAP_UTILS_IN_NAMESPACE

Expand Down
14 changes: 6 additions & 8 deletions include/gtirb/Casting.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,23 @@
#include <cassert>
#include <type_traits>

// Hide the GTIRB_DEPRECATED_UTILS macro from docs
#ifndef GTIRB_DOXYGEN
/// @cond INTERNAL
#ifndef GTIRB_WRAP_UTILS_IN_NAMESPACE
#define GTIRB_DEPRECATED_UTILS \
[[deprecated("Define GTIRB_WRAP_UTILS_IN_NAMESPACE and access via the " \
"gtirb namespace to suppress this error.")]]
#else
#define GTIRB_DEPRECATED_UTILS
#endif
#endif
/// @endcond

namespace gtirb {

// We want clients to use the names in the gtirb namespace, so we exclude
// the allocator namespace when generating documentation.
#ifndef GTIRB_DOXYGEN
/// @cond INTERNAL
namespace casting {
#endif
/// @endcond

/// \file Casting.hpp
/// \ingroup casting
Expand Down Expand Up @@ -547,10 +546,9 @@ dyn_cast_or_null(Y* Val) {
return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
}

// Exclude allocator namespace from generated documentation.
#ifndef GTIRB_DOXYGEN
/// @cond INTERNAL
} // namespace casting
#endif
/// @endcond

#ifdef GTIRB_WRAP_UTILS_IN_NAMESPACE

Expand Down

0 comments on commit 3b5766f

Please sign in to comment.