summaryrefslogtreecommitdiff
path: root/doc/source/dev/examples
diff options
context:
space:
mode:
authorSayed Adel <seiko@imavr.com>2021-08-31 20:16:05 +0200
committerSayed Adel <seiko@imavr.com>2021-08-31 20:22:28 +0200
commit241527a3cb287c1033b3a71a7cc14c40f22ec607 (patch)
tree1543635e52fbee0e9dba133ea222fc3516c222c7 /doc/source/dev/examples
parentdefd9fe389fda06b940cf4b186ea25f7047fd294 (diff)
downloadnumpy-241527a3cb287c1033b3a71a7cc14c40f22ec607.tar.gz
DOC: Improve Doxygen Javadoc style examples
Diffstat (limited to 'doc/source/dev/examples')
-rw-r--r--doc/source/dev/examples/doxy_class.hpp21
-rw-r--r--doc/source/dev/examples/doxy_func.h11
2 files changed, 32 insertions, 0 deletions
diff --git a/doc/source/dev/examples/doxy_class.hpp b/doc/source/dev/examples/doxy_class.hpp
new file mode 100644
index 000000000..ceba63487
--- /dev/null
+++ b/doc/source/dev/examples/doxy_class.hpp
@@ -0,0 +1,21 @@
+/**
+ * Template to represent limbo numbers.
+ *
+ * Specializations for integer types that are part of nowhere.
+ * It doesn't support with any real types.
+ *
+ * @param Tp Type of the integer. Required to be an integer type.
+ * @param N Number of elements.
+*/
+template<typename Tp, std::size_t N>
+class DoxyLimbo {
+ public:
+ /// Default constructor. Initialize nothing.
+ DoxyLimbo();
+ /// Set Default behavior for copy the limbo.
+ DoxyLimbo(const DoxyLimbo<Tp, N> &l);
+ /// Returns the raw data for the limbo.
+ const Tp *data();
+ protected:
+ Tp p_data[N]; ///< Example for inline comment.
+};
diff --git a/doc/source/dev/examples/doxy_func.h b/doc/source/dev/examples/doxy_func.h
new file mode 100644
index 000000000..792a9d1b7
--- /dev/null
+++ b/doc/source/dev/examples/doxy_func.h
@@ -0,0 +1,11 @@
+/**
+ * This a simple brief.
+ *
+ * And the details goes here.
+ * Multi lines are welcome.
+ *
+ * @param num leave a comment for parameter num.
+ * @param str leave a comment for the second parameter.
+ * @return leave a comment for the returned value.
+ */
+int doxy_javadoc_example(int num, const char *str);