summaryrefslogtreecommitdiff
path: root/gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h
diff options
context:
space:
mode:
authorJosh Morman <mormjb@gmail.com>2020-04-23 15:03:55 -0400
committerJosh Morman <mormjb@gmail.com>2020-06-04 10:05:48 -0400
commit999c0e723240ee783bca17942f77a9d05bbfc168 (patch)
tree3661aeb0ef10bad228df014a20e5b0a63627c833 /gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h
parenta4e6d4d55b35ac36dd5915dec5145073d8ec3b9a (diff)
utils: add functionality to generate bindings
This currently exists in two places 1) Bindtool (longevity TBD) which calls blocktool to parse the public header file in the include directory 2) Modtool - binding of headers added to add and bind. rm, update, info, etc still TODO
Diffstat (limited to 'gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h')
-rw-r--r--gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h
new file mode 100644
index 0000000000..746b3babcd
--- /dev/null
+++ b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h
@@ -0,0 +1,18 @@
+#ifndef PYDOC_MACROS_H
+#define PYDOC_MACROS_H
+
+#define __EXPAND(x) x
+#define __COUNT(_1, _2, _3, _4, _5, _6, _7, COUNT, ...) COUNT
+#define __VA_SIZE(...) __EXPAND(__COUNT(__VA_ARGS__, 7, 6, 5, 4, 3, 2, 1))
+#define __CAT1(a, b) a ## b
+#define __CAT2(a, b) __CAT1(a, b)
+#define __DOC1(n1) __doc_##n1
+#define __DOC2(n1, n2) __doc_##n1##_##n2
+#define __DOC3(n1, n2, n3) __doc_##n1##_##n2##_##n3
+#define __DOC4(n1, n2, n3, n4) __doc_##n1##_##n2##_##n3##_##n4
+#define __DOC5(n1, n2, n3, n4, n5) __doc_##n1##_##n2##_##n3##_##n4##_##n5
+#define __DOC6(n1, n2, n3, n4, n5, n6) __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6
+#define __DOC7(n1, n2, n3, n4, n5, n6, n7) __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7
+#define DOC(...) __EXPAND(__EXPAND(__CAT2(__DOC, __VA_SIZE(__VA_ARGS__)))(__VA_ARGS__))
+
+#endif //PYDOC_MACROS_H \ No newline at end of file