doxygen.hh
Go to the documentation of this file.
1 #ifndef DOXYGEN_DOC_HH
2 #define DOXYGEN_DOC_HH
3 
4 #include <boost/preprocessor/repetition.hpp>
5 #include <boost/preprocessor/punctuation/comma_if.hpp>
6 
7 #include <boost/mpl/void.hpp>
8 
9 #ifndef DOXYGEN_DOC_MAX_NUMBER_OF_ARGUMENTS_IN_CONSTRUCTOR
10 #define DOXYGEN_DOC_MAX_NUMBER_OF_ARGUMENTS_IN_CONSTRUCTOR 10
11 #endif
12 
13 namespace doxygen {
15 
16 template <typename _class>
18  static inline const char* run() { return ""; }
19  static inline const char* attribute(const char*) { return ""; }
20 };
21 
22 template <typename _class>
23 inline const char* class_doc() {
25 }
26 
27 template <typename _class>
28 inline const char* class_attrib_doc(const char* name) {
30 }
31 
32 template <typename FuncPtr>
33 inline const char* member_func_doc(FuncPtr) {
34  return "";
35 }
36 
37 template <typename FuncPtr>
38 inline void_ member_func_args(FuncPtr) {
39  return void_();
40 }
41 
42 #define DOXYGEN_DOC_DECLARE_CONSTRUCTOR(z, nargs, unused) \
43  template <typename Class BOOST_PP_COMMA_IF(nargs) \
44  BOOST_PP_ENUM_PARAMS(nargs, class Arg)> \
45  struct constructor_##nargs##_impl { \
46  static inline const char* doc() { return ""; } \
47  static inline void_ args() { return void_(); } \
48  }; \
49  \
50  template <typename Class BOOST_PP_COMMA_IF(nargs) \
51  BOOST_PP_ENUM_PARAMS(nargs, class Arg)> \
52  inline const char* constructor_doc() { \
53  return constructor_##nargs##_impl<Class BOOST_PP_COMMA_IF( \
54  nargs) BOOST_PP_ENUM_PARAMS(nargs, Arg)>::doc(); \
55  }
56 
59 #undef DOXYGEN_DOC_DECLARE_CONSTRUCTOR
60 /*
61 template <typename Class>
62 inline const char* constructor_doc ()
63 {
64  return "";
65 }
66 */
67 
68 template <typename Class>
69 struct destructor_doc_impl {
70  static inline const char* run() { return ""; }
71 };
72 
73 template <typename Class>
74 inline const char* destructor_doc() {
76 }
77 
78 /* TODO class attribute can be handled by
79 
80 template <typename Class, typename AttributeType>
81 const char* attribute_doc (AttributeType Class::* ptr)
82 {
83  // Body looks like
84  // if (ptr == &Class::attributeName)
85  // return "attrib documentation";
86  return "undocumented";
87 }
88 */
89 
90 } // namespace doxygen
91 
92 #endif // DOXYGEN_DOC_HH
#define DOXYGEN_DOC_MAX_NUMBER_OF_ARGUMENTS_IN_CONSTRUCTOR
Definition: doxygen.hh:10
static const char * attribute(const char *)
Definition: doxygen.hh:19
#define DOXYGEN_DOC_DECLARE_CONSTRUCTOR(z, nargs, unused)
Definition: doxygen.hh:42
const char * destructor_doc()
Definition: doxygen.hh:74
const char * member_func_doc(FuncPtr)
Definition: doxygen.hh:33
BOOST_PP_REPEAT(DOXYGEN_DOC_MAX_NUMBER_OF_ARGUMENTS_IN_CONSTRUCTOR, DOXYGEN_DOC_DECLARE_CONSTRUCTOR, ~) template< typename Class > struct destructor_doc_impl
Definition: doxygen.hh:57
boost::mpl::void_ void_
Definition: doxygen.hh:14
const char * class_doc()
Definition: doxygen.hh:23
const char * class_attrib_doc(const char *name)
Definition: doxygen.hh:28
static const char * run()
Definition: doxygen.hh:18
void_ member_func_args(FuncPtr)
Definition: doxygen.hh:38


hpp-fcl
Author(s):
autogenerated on Fri Jun 2 2023 02:39:01