diff options
author | Sayantika Banik <sayantikabanik122@gmail.com> | 2021-09-08 06:21:36 +0000 |
---|---|---|
committer | Sayantika Banik <sayantikabanik122@gmail.com> | 2021-09-08 06:21:36 +0000 |
commit | 879b3b4798975c7c0c49cef6ece3563c5f2daaeb (patch) | |
tree | e102f2222f1557d9b4f8b1a3e9484ca59b8ad954 /doc/source/dev/examples | |
parent | 9680d760cdb08cc54c18657c77269853670f17e9 (diff) | |
parent | 17c3a6b414a3e642abeb116ff71e97f9b6f2aab5 (diff) | |
download | numpy-879b3b4798975c7c0c49cef6ece3563c5f2daaeb.tar.gz |
Merge branch 'main' of https://github.com/sayantikabanik/numpy
Diffstat (limited to 'doc/source/dev/examples')
-rw-r--r-- | doc/source/dev/examples/.doxyfile | 2 | ||||
-rw-r--r-- | doc/source/dev/examples/doxy_class.hpp | 21 | ||||
-rw-r--r-- | doc/source/dev/examples/doxy_func.h | 11 | ||||
-rw-r--r-- | doc/source/dev/examples/doxy_rst.h | 15 |
4 files changed, 49 insertions, 0 deletions
diff --git a/doc/source/dev/examples/.doxyfile b/doc/source/dev/examples/.doxyfile new file mode 100644 index 000000000..966c1b636 --- /dev/null +++ b/doc/source/dev/examples/.doxyfile @@ -0,0 +1,2 @@ +INPUT += @CUR_DIR +INCLUDE_PATH += @CUR_DIR 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); diff --git a/doc/source/dev/examples/doxy_rst.h b/doc/source/dev/examples/doxy_rst.h new file mode 100644 index 000000000..6ab4a0775 --- /dev/null +++ b/doc/source/dev/examples/doxy_rst.h @@ -0,0 +1,15 @@ +/** + * A comment block contains reST markup. + * @rst + * .. note:: + * + * Thanks to Breathe_, we were able to bring it to Doxygen_ + * + * Some code example:: + * + * int example(int x) { + * return x * 2; + * } + * @endrst + */ +void doxy_reST_example(void); |