diff options
author | Minijackson <minijackson@riseup.net> | 2019-09-08 16:15:46 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2019-11-10 16:37:59 +0100 |
commit | 3301430c676e4af6b95d96b6408a66f9d2768653 (patch) | |
tree | 12810ce81a3b1d3cb23270fc5119016d5f6c325a /res/sample-doxygen-project-1/main.cpp | |
download | poseidoc-3301430c676e4af6b95d96b6408a66f9d2768653.tar.gz poseidoc-3301430c676e4af6b95d96b6408a66f9d2768653.zip |
First version
Diffstat (limited to 'res/sample-doxygen-project-1/main.cpp')
-rw-r--r-- | res/sample-doxygen-project-1/main.cpp | 176 |
1 files changed, 176 insertions, 0 deletions
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 @@ | |||
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 | */ | ||
13 | namespace 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 | */ | ||
31 | class Sample { | ||
32 | public: | ||
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 | |||
118 | protected: | ||
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 | |||
126 | private: | ||
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 | */ | ||
165 | int sample_function(char param1, std::string param2, int hello_world) { | ||
166 | std::cout << helloworld << std::endl; | ||
167 | } | ||
168 | |||
169 | int main(int argc, char** argv) { | ||
170 | std::cout << "Hello World" << std::endl; | ||
171 | std::cout << arga << std::endl; | ||
172 | } | ||
173 | |||
174 | int add(float a, float b) { return a + b; } | ||
175 | template <typename T> struct A { typedef T::U dependent; }; | ||
176 | struct Integer { int i; }; Integer i = { i: 0 }; | ||