summaryrefslogtreecommitdiffstats
path: root/res/sample-doxygen-project-1/main.cpp
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2019-11-23 19:27:21 +0100
committerMinijackson <minijackson@riseup.net>2019-11-23 19:31:58 +0100
commit860b73f1644ecd6548ae403ec483625fb7b625ea (patch)
tree1e0ab5ecf2a77a66e2a176364ecb151a58468426 /res/sample-doxygen-project-1/main.cpp
parent304d9f220cc208dd78fce11b703354ecd8d2168c (diff)
downloadposeidoc-860b73f1644ecd6548ae403ec483625fb7b625ea.tar.gz
poseidoc-860b73f1644ecd6548ae403ec483625fb7b625ea.zip
entities rework, allow "inline" documentation, merge config with cli
Diffstat (limited to 'res/sample-doxygen-project-1/main.cpp')
-rw-r--r--res/sample-doxygen-project-1/main.cpp176
1 files changed, 0 insertions, 176 deletions
diff --git a/res/sample-doxygen-project-1/main.cpp b/res/sample-doxygen-project-1/main.cpp
deleted file mode 100644
index ba501d0..0000000
--- a/res/sample-doxygen-project-1/main.cpp
+++ /dev/null
@@ -1,176 +0,0 @@
1#include <iostream>
2
3/*! \brief A sample namespace
4 *
5 * This is an extended
6 * description \p of this
7 * sample namespace.
8 *
9 * ```cpp
10 * std::cout << "Example code" << std::endl;
11 * ```
12 */
13namespace sample_namespace {
14
15 /*! \brief A sample static variable
16 *
17 * This is an extended
18 * description of this
19 * static variable.
20 */
21 static int VARIABLE = 42;
22
23}
24
25/*! \brief A sample class
26 *
27 * This is an extended
28 * description of this
29 * sample class.
30 */
31class Sample {
32public:
33
34 /*! \brief A public type
35 *
36 * This is an extended description of this typedef.
37 */
38 using Blabla = int;
39
40 /*! \brief A sample inner class.
41 *
42 * This is an extended description of this sample inner class.
43 *
44 * We have a reference to the class Sample.
45 *
46 * Also a [link](#bla)
47 *
48 * And inline code:
49 *
50 * ```cpp
51 * auto a = int{};
52 * ```
53 */
54 class InnerClass {
55 /*! \brief A sample attribute.
56 *
57 * This is an extended description of this sample attribute.
58 */
59 void* sample_attribute;
60 };
61
62 /*! \brief A sample inner struct.
63 *
64 * This is an extended description of this sample inner struct.
65 */
66 struct InnerStruct {
67 /*! \brief A sample attribute.
68 *
69 * This is an extended description of this sample attribute.
70 */
71 void* sample_attribute;
72 };
73
74 /*! \brief A sample inner struct.
75 *
76 * This is an extended description of this sample inner struct.
77 */
78 enum InnerEnum {
79 /*! \brief A sample variant.
80 *
81 * This is an extended description of this sample variant.
82 */
83 SAMPLE_VARIANT1,
84
85 /*! \brief Another sample variant.
86 *
87 * This is an extended description of this sample variant.
88 */
89 SAMPLE_VARIANT2,
90
91 /*! \brief Another other sample variant.
92 *
93 * This is an extended description of this sample variant.
94 */
95 SAMPLE_VARIANT3,
96 };
97
98
99 /*! \brief A sample method.
100 *
101 * This is an extended description of this sample method.
102 *
103 * \param [in] param1 This is a parameter
104 * \param [in] param2 This is a parameter
105 * \param [in] param3 This is a parameter
106 *
107 * \pre A precondition.
108 * \post A postcondition.
109 */
110 int sample_method(char param1, std::string param2) const;
111
112 /*! \brief A sample static function.
113 *
114 * This is an extended description of this sample static function.
115 */
116 static int sample_static_func(char param1, std::string param2);
117
118protected:
119
120 /*! \brief A sample protected method.
121 *
122 * This is an extended description of this sample protected method.
123 */
124 int sample_protected_method(char param1, std::string param2) const;
125
126private:
127
128 /*! \brief A sample attribute.
129 *
130 * This is an extended description of this sample attribute.
131 */
132 void* sample_attribute1;
133
134 /*! \brief Another sample attribute.
135 *
136 * This is an extended description of this sample attribute.
137 */
138 InnerClass sample_attribute2;
139
140 /*! \brief Another other sample attribute.
141 *
142 * This is an extended description of this sample attribute.
143 */
144 InnerStruct sample_attribute3;
145
146 /*! \brief Another other other sample attribute.
147 *
148 * This is an extended description of this sample attribute.
149 */
150 InnerEnum sample_attribute4;
151
152};
153
154/*! \brief A sample function.
155 *
156 * This is an extended description of this sample function.
157 *
158 * \param [in] param1 This is a parameter
159 * \param [in] param2 This is a parameter
160 * \param [in] param3 This is a parameter
161 *
162 * \pre A precondition.
163 * \post A postcondition.
164 */
165int sample_function(char param1, std::string param2, int hello_world) {
166 std::cout << helloworld << std::endl;
167}
168
169int main(int argc, char** argv) {
170 std::cout << "Hello World" << std::endl;
171 std::cout << arga << std::endl;
172}
173
174int add(float a, float b) { return a + b; }
175template <typename T> struct A { typedef T::U dependent; };
176struct Integer { int i; }; Integer i = { i: 0 };