From 3301430c676e4af6b95d96b6408a66f9d2768653 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 8 Sep 2019 16:15:46 +0200 Subject: First version --- res/sample-doxygen-project-1/main.cpp | 176 ++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 res/sample-doxygen-project-1/main.cpp (limited to 'res/sample-doxygen-project-1/main.cpp') diff --git a/res/sample-doxygen-project-1/main.cpp b/res/sample-doxygen-project-1/main.cpp new file mode 100644 index 0000000..ba501d0 --- /dev/null +++ b/res/sample-doxygen-project-1/main.cpp @@ -0,0 +1,176 @@ +#include + +/*! \brief A sample namespace + * + * This is an extended + * description \p of this + * sample namespace. + * + * ```cpp + * std::cout << "Example code" << std::endl; + * ``` + */ +namespace sample_namespace { + + /*! \brief A sample static variable + * + * This is an extended + * description of this + * static variable. + */ + static int VARIABLE = 42; + +} + +/*! \brief A sample class + * + * This is an extended + * description of this + * sample class. + */ +class Sample { +public: + + /*! \brief A public type + * + * This is an extended description of this typedef. + */ + using Blabla = int; + + /*! \brief A sample inner class. + * + * This is an extended description of this sample inner class. + * + * We have a reference to the class Sample. + * + * Also a [link](#bla) + * + * And inline code: + * + * ```cpp + * auto a = int{}; + * ``` + */ + class InnerClass { + /*! \brief A sample attribute. + * + * This is an extended description of this sample attribute. + */ + void* sample_attribute; + }; + + /*! \brief A sample inner struct. + * + * This is an extended description of this sample inner struct. + */ + struct InnerStruct { + /*! \brief A sample attribute. + * + * This is an extended description of this sample attribute. + */ + void* sample_attribute; + }; + + /*! \brief A sample inner struct. + * + * This is an extended description of this sample inner struct. + */ + enum InnerEnum { + /*! \brief A sample variant. + * + * This is an extended description of this sample variant. + */ + SAMPLE_VARIANT1, + + /*! \brief Another sample variant. + * + * This is an extended description of this sample variant. + */ + SAMPLE_VARIANT2, + + /*! \brief Another other sample variant. + * + * This is an extended description of this sample variant. + */ + SAMPLE_VARIANT3, + }; + + + /*! \brief A sample method. + * + * This is an extended description of this sample method. + * + * \param [in] param1 This is a parameter + * \param [in] param2 This is a parameter + * \param [in] param3 This is a parameter + * + * \pre A precondition. + * \post A postcondition. + */ + int sample_method(char param1, std::string param2) const; + + /*! \brief A sample static function. + * + * This is an extended description of this sample static function. + */ + static int sample_static_func(char param1, std::string param2); + +protected: + + /*! \brief A sample protected method. + * + * This is an extended description of this sample protected method. + */ + int sample_protected_method(char param1, std::string param2) const; + +private: + + /*! \brief A sample attribute. + * + * This is an extended description of this sample attribute. + */ + void* sample_attribute1; + + /*! \brief Another sample attribute. + * + * This is an extended description of this sample attribute. + */ + InnerClass sample_attribute2; + + /*! \brief Another other sample attribute. + * + * This is an extended description of this sample attribute. + */ + InnerStruct sample_attribute3; + + /*! \brief Another other other sample attribute. + * + * This is an extended description of this sample attribute. + */ + InnerEnum sample_attribute4; + +}; + +/*! \brief A sample function. + * + * This is an extended description of this sample function. + * + * \param [in] param1 This is a parameter + * \param [in] param2 This is a parameter + * \param [in] param3 This is a parameter + * + * \pre A precondition. + * \post A postcondition. + */ +int sample_function(char param1, std::string param2, int hello_world) { + std::cout << helloworld << std::endl; +} + +int main(int argc, char** argv) { + std::cout << "Hello World" << std::endl; + std::cout << arga << std::endl; +} + +int add(float a, float b) { return a + b; } +template struct A { typedef T::U dependent; }; +struct Integer { int i; }; Integer i = { i: 0 }; -- cgit v1.2.3