14
14
#include < string_utils/string_utils.hpp>
15
15
16
16
#include " Defs.h"
17
+ #include " DictionaryConcepts.hpp"
17
18
#include " EncodedVariableInterpreter.hpp"
18
19
#include " ir/parsing.hpp"
19
20
#include " ir/types.hpp"
@@ -42,7 +43,9 @@ class GrepCore {
42
43
* @param use_heuristic
43
44
* @return Query if it may match a message, std::nullopt otherwise
44
45
*/
45
- template <typename LogTypeDictionaryReaderType, typename VariableDictionaryReaderType>
46
+ template <
47
+ LogTypeDictionaryReaderReq LogTypeDictionaryReaderType,
48
+ VariableDictionaryReaderReq VariableDictionaryReaderType>
46
49
static std::optional<Query> process_raw_query (
47
50
LogTypeDictionaryReaderType const & logtype_dict,
48
51
VariableDictionaryReaderType const & var_dict,
@@ -107,7 +110,7 @@ class GrepCore {
107
110
* @param logtype
108
111
* @return true if this token might match a message, false otherwise
109
112
*/
110
- template <typename VariableDictionaryReaderType>
113
+ template <VariableDictionaryReaderReq VariableDictionaryReaderType>
111
114
static bool process_var_token (
112
115
QueryToken const & query_token,
113
116
VariableDictionaryReaderType const & var_dict,
@@ -132,9 +135,10 @@ class GrepCore {
132
135
* @return SubQueryMatchabilityResult::MayMatch
133
136
*/
134
137
template <
135
- typename LogTypeDictionaryReaderType,
136
- typename VariableDictionaryReaderType,
137
- typename LogTypeDictionaryEntryType = typename LogTypeDictionaryReaderType::entry_t >
138
+ LogTypeDictionaryReaderReq LogTypeDictionaryReaderType,
139
+ VariableDictionaryReaderReq VariableDictionaryReaderType,
140
+ LogTypeDictionaryEntryReq LogTypeDictionaryEntryType
141
+ = typename LogTypeDictionaryReaderType::entry_t >
138
142
static SubQueryMatchabilityResult generate_logtypes_and_vars_for_subquery (
139
143
LogTypeDictionaryReaderType const & logtype_dict,
140
144
VariableDictionaryReaderType const & var_dict,
@@ -145,7 +149,9 @@ class GrepCore {
145
149
);
146
150
};
147
151
148
- template <typename LogTypeDictionaryReaderType, typename VariableDictionaryReaderType>
152
+ template <
153
+ LogTypeDictionaryReaderReq LogTypeDictionaryReaderType,
154
+ VariableDictionaryReaderReq VariableDictionaryReaderType>
149
155
std::optional<Query> GrepCore::process_raw_query (
150
156
LogTypeDictionaryReaderType const & logtype_dict,
151
157
VariableDictionaryReaderType const & var_dict,
@@ -266,7 +272,7 @@ std::optional<Query> GrepCore::process_raw_query(
266
272
};
267
273
}
268
274
269
- template <typename VariableDictionaryReaderType>
275
+ template <VariableDictionaryReaderReq VariableDictionaryReaderType>
270
276
bool GrepCore::process_var_token (
271
277
QueryToken const & query_token,
272
278
VariableDictionaryReaderType const & var_dict,
@@ -328,9 +334,9 @@ bool GrepCore::process_var_token(
328
334
}
329
335
330
336
template <
331
- typename LogTypeDictionaryReaderType,
332
- typename VariableDictionaryReaderType,
333
- typename LogTypeDictionaryEntryType>
337
+ LogTypeDictionaryReaderReq LogTypeDictionaryReaderType,
338
+ VariableDictionaryReaderReq VariableDictionaryReaderType,
339
+ LogTypeDictionaryEntryReq LogTypeDictionaryEntryType>
334
340
GrepCore::SubQueryMatchabilityResult GrepCore::generate_logtypes_and_vars_for_subquery (
335
341
LogTypeDictionaryReaderType const & logtype_dict,
336
342
VariableDictionaryReaderType const & var_dict,
0 commit comments