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