|
1 | 1 | #pragma once |
2 | 2 |
|
3 | | -#include <set> |
| 3 | +#include <Common/VersionNumber.h> |
4 | 4 | #include <string> |
5 | 5 | #include <vector> |
6 | 6 |
|
@@ -63,6 +63,9 @@ struct FunctionDocumentation |
63 | 63 | }; |
64 | 64 | using Examples = std::vector<Example>; |
65 | 65 |
|
| 66 | + using IntroducedIn = VersionNumber; |
| 67 | + static constexpr VersionNumber VERSION_UNKNOWN; |
| 68 | + |
66 | 69 | enum class Category : uint8_t |
67 | 70 | { |
68 | 71 | /// Default category |
@@ -118,15 +121,17 @@ struct FunctionDocumentation |
118 | 121 | using Related = std::vector<std::string>; |
119 | 122 |
|
120 | 123 | /// TODO Fields with {} initialization are optional. We should make all fields non-optional. |
121 | | - Description description; /// E.g. "Returns the position (in bytes, starting at 1) of a substring needle in a string haystack." |
122 | | - Syntax syntax {}; /// E.g. "position(haystack, needle)" |
123 | | - Arguments arguments {}; /// E.g. ["haystack — String in which the search is performed. String.", "needle — Substring to be searched. String."] |
124 | | - ReturnedValue returned_value {}; /// E.g. "Starting position in bytes and counting from 1, if the substring was found." |
125 | | - Examples examples {}; /// |
126 | | - Category category; /// E.g. Category::DatesAndTimes |
| 124 | + Description description; /// E.g. "Returns the position (in bytes, starting at 1) of a substring needle in a string haystack." |
| 125 | + Syntax syntax {}; /// E.g. "position(haystack, needle)" |
| 126 | + Arguments arguments {}; /// E.g. ["haystack — String in which the search is performed. String.", "needle — Substring to be searched. String."] |
| 127 | + ReturnedValue returned_value {}; /// E.g. "Starting position in bytes and counting from 1, if the substring was found." |
| 128 | + Examples examples {}; /// |
| 129 | + IntroducedIn introduced_in {VERSION_UNKNOWN}; /// E.g. {25, 5} |
| 130 | + Category category; /// E.g. Category::DatesAndTimes |
127 | 131 |
|
128 | 132 | std::string argumentsAsString() const; |
129 | 133 | std::string examplesAsString() const; |
| 134 | + std::string introducedInAsString() const; |
130 | 135 | std::string categoryAsString() const; |
131 | 136 | }; |
132 | 137 |
|
|
0 commit comments