Reputation: 1455
So I have a #define
that creates a "MY_ENUM" (minimal version)
#define MY_ENUM(ename, ...) \
namespace ename { \
enum ename { __VA_ARGS__, COUNT }; \
static std::string _Strings[COUNT]; \
static inline size_t size() {return COUNT;} \
}
This generates useful enums that can be created as:
/**
* @brief List of elements
*/
MY_ENUM(enuElements, Element1, Element2, Element3, Element4, Element5, Element6)
But generating the doc with doxygen doesn't seem to work => it mixes one enum with the following and some don't even appear.
I set:
MACRO_EXPANSION = YES
SKIP_FUNCTION_MACROS = NO
PREDEFINED = MY_ENUM(x) =
For what I have read, the answer is a proper setting of PREDEFINED
but I haven't achieved, does anyone know how to create a document with this kind of defines?
Edit
Doxygen Version : 1.8.0
About why I think the clue is in PREDEFINED
(but I might as well be wrong):
Upvotes: 1
Views: 166
Reputation: 9067
With the following code:
/// \file
#define MY_ENUM(ename, ...) \
namespace ename { \
enum ename { __VA_ARGS__, COUNT }; \
static std::string _Strings[COUNT]; \
static inline size_t size() {return COUNT;} \
}
/**
* @brief List of elements
*/
MY_ENUM(enuElements, Element1, Element2, Element3, Element4, Element5, Element6)
The setting (besides the default settings):
MACRO_EXPANSION = YES
and doxygen 1.9.1 I got:
Upvotes: 1