5 #ifndef JODA_FUNCTIONWRAPPER_H
6 #define JODA_FUNCTIONWRAPPER_H
7 #include <tao/pegtl.hpp>
11 template <
typename Rule>
19 #define REGISTER_FUNCTION(FCLASS, FSTRUCT, FKEYWORD) \
20 struct FSTRUCT : TAOCPP_PEGTL_KEYWORD(FKEYWORD) { \
21 static std::string toString() { return FKEYWORD; } \
24 struct functionAction<FSTRUCT> { \
25 static void apply0(functionState &state) { \
26 state.factory = &FCLASS::_FACTORY; \
125 template <
typename... Rules>
126 struct stringableSOR : tao::pegtl::sor<Rules...> {
127 template <
typename First,
typename... Rest>
128 static constexpr
auto toString() {
129 return First::toString() +
" " + stringableSOR<Rest...>::toString();
132 static constexpr
auto toString() {
return toString<Rules...>(); }
136 struct stringableSOR<> {
142 func_kw_exists, func_kw_isArray, func_kw_isObject, func_kw_isNumber,
143 func_kw_isBool, func_kw_isString, func_kw_isNull, func_kw_IN,
144 func_kw_sContains, func_kw_STARTSWITH, func_kw_arrSize, func_kw_ID,
145 func_kw_FILE, func_kw_FILEPOSSTART, func_kw_FILEPOSEND,
146 func_kw_SEQNUM, func_kw_LISTATTRIBUTES, func_kw_TYPE, func_kw_REGEX,
147 func_kw_REGEX_EXTRACT, func_kw_REGEX_REPLACE, func_kw_SUMFUNK,
148 func_kw_SUBFUNK, func_kw_PRODFUNK, func_kw_MODFUNK, func_kw_POWFUNK,
151 func_kw_ABSFUNK, func_kw_ROUNDFUNK, func_kw_SQRTFUNK,
152 func_kw_CEILFUNK, func_kw_FLOORFUNK, func_kw_DEGREESFUNK,
153 func_kw_RADIANSFUNK, func_kw_ACOSFUNK, func_kw_ASINFUNK,
154 func_kw_ATANFUNK, func_kw_COSFUNK, func_kw_SINFUNK, func_kw_TANFUNK,
155 func_kw_TRUNCFUNK, func_kw_LENFUNK, func_kw_UPPERFUNK,
156 func_kw_LOWERFUNK, func_kw_LTRIMFUNK, func_kw_RTRIMFUNK,
157 func_kw_PIFUNK, func_kw_MEMCOUNTFUNK, func_kw_HASHFUNK,
158 func_kw_NOWFUNK, func_kw_DIVFUNK, func_kw_FINDSTRFUNK,
159 func_kw_SUBSTRFUNK, func_kw_INTFUNK, func_kw_FLOATFUNK,
160 func_kw_STRINGFUNK> {};
#define REGISTER_FUNCTION(FCLASS, FSTRUCT, FKEYWORD)
Definition: FunctionWrapper.h:19
UnaryNumberProvider< UnaryAcosCalculationFunction > AcosProvider
Definition: UnaryNumberProvider.h:298
UnaryNumberProvider< UnaryCeilCalculationFunction > CeilProvider
Definition: UnaryNumberProvider.h:207
BinaryNumberProvider< BinaryModCalculationFunction > ModuloProvider
Definition: BinaryNumberProvider.h:265
UnaryStringProvider< UnaryRtrimCalculationFunction > RtrimProvider
Definition: UnaryStringProvider.h:156
BinaryStringProvider< BinarySCONTAINSCalculationFunction > SCONTAINSProvider
Definition: BinaryStringProvider.h:97
BinaryNumberProvider< BinaryAtan2CalculationFunction > Atan2Provider
Definition: BinaryNumberProvider.h:323
UnaryPointerAcceptProvider< joda::query::providers::membercount::MemberCountCalculator > MemberCountProvider
Definition: MemberCountProvider.h:133
TemplateProvider< joda::query::providers::cast::FloatCastCalculator > FloatCastProvider
Definition: CastProvider.h:273
UnaryNumberProvider< UnarySqrtCalculationFunction > SqrtProvider
Definition: UnaryNumberProvider.h:185
UnaryNumberProvider< UnaryTanCalculationFunction > TanProvider
Definition: UnaryNumberProvider.h:411
TemplateProvider< joda::query::providers::cast::IntCastCalculator > IntCastProvider
Definition: CastProvider.h:140
BinaryStringProvider< BinaryFINDSTRCalculationFunction > FINDSTRProvider
Definition: BinaryStringProvider.h:144
UnaryNumberProvider< UnaryAsinCalculationFunction > AsinProvider
Definition: UnaryNumberProvider.h:323
UnaryNumberProvider< UnaryDegreesCalculationFunction > DegreesProvider
Definition: UnaryNumberProvider.h:251
UnaryStringProvider< UnaryUpperCalculationFunction > UpperProvider
Definition: UnaryStringProvider.h:106
UnaryNumberProvider< UnaryAbsCalculationFunction > AbsProvider
Definition: UnaryNumberProvider.h:116
UnaryNumberProvider< UnaryFloorCalculationFunction > FloorProvider
Definition: UnaryNumberProvider.h:229
UnaryNumberProvider< UnaryRadiansCalculationFunction > RadiansProvider
Definition: UnaryNumberProvider.h:273
UnaryStringProvider< UnaryLenCalculationFunction > LenProvider
Definition: UnaryStringProvider.h:91
UnaryNumberProvider< UnaryAtanCalculationFunction > AtanProvider
Definition: UnaryNumberProvider.h:345
UnaryStringProvider< UnaryLowerCalculationFunction > LowerProvider
Definition: UnaryStringProvider.h:121
UnaryNumberProvider< UnaryRoundCalculationFunction > RoundProvider
Definition: UnaryNumberProvider.h:138
UnaryNumberProvider< UnaryTruncCalculationFunction > TruncProvider
Definition: UnaryNumberProvider.h:160
ConstantNumber< PiConstantFunction > PiProvider
Definition: ConstantNumber.h:54
BinaryNumberProvider< BinarySumCalculationFunction > SumProvider
Definition: BinaryNumberProvider.h:152
BinaryNumberProvider< BinaryDivCalculationFunction > DivProvider
Definition: BinaryNumberProvider.h:210
BinaryStringProvider< BinaryConcatCalculationFunction > ConcatProvider
Definition: BinaryStringProvider.h:129
BinaryNumberProvider< BinarySubCalculationFunction > SubtractProvider
Definition: BinaryNumberProvider.h:181
UnaryNumberProvider< UnarySinCalculationFunction > SinProvider
Definition: UnaryNumberProvider.h:389
UnaryStringProvider< UnaryLtrimCalculationFunction > LtrimProvider
Definition: UnaryStringProvider.h:138
BinaryNumberProvider< BinaryProdCalculationFunction > ProductProvider
Definition: BinaryNumberProvider.h:236
ConstantNumber< NowConstantFunction > NowProvider
Definition: ConstantNumber.h:70
BinaryNumberProvider< BinaryPowCalculationFunction > PowerProvider
Definition: BinaryNumberProvider.h:297
UnaryNumberProvider< UnaryCosCalculationFunction > CosProvider
Definition: UnaryNumberProvider.h:367
BinaryStringProvider< BinarySTARTSWITHCalculationFunction > STARTSWITHProvider
Definition: BinaryStringProvider.h:114
UnaryPointerAcceptProvider< joda::query::providers::hash::HashCalculator > HashProvider
Definition: HashProvider.h:135
TemplateProvider< joda::query::providers::listattributes::ListAttributesCalculator > ListAttributesProvider
Definition: ListAttributesProvider.h:178
TemplateProvider< joda::query::providers::cast::StringCastCalculator > StringCastProvider
Definition: CastProvider.h:420
Definition: FunctionWrapper.h:12
Definition: FunctionWrapper.h:160
static constexpr auto toString()
Definition: FunctionWrapper.h:137