JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
RegexExtractProvider.h
Go to the documentation of this file.
1 //
2 // Created by Nico Schäfer on 23/01/18.
3 //
4 
5 #ifndef JODA_REGEXEXTRACTPROVIDER_H
6 #define JODA_REGEXEXTRACTPROVIDER_H
7 
8 #include <regex>
9 
10 #include "IValueProvider.h"
11 namespace joda::query {
16  public:
17  explicit RegexExtractProvider(
18  std::vector<std::unique_ptr<IValueProvider>> &&parameters);
19  std::unique_ptr<IValueProvider> duplicate() const override;
20  bool isConst() const override;
21 
23  RJMemoryPoolAlloc &alloc) const override;
24  const RJValue *getValue(const RapidJsonDocument &json,
25  RJMemoryPoolAlloc &alloc) const override;
26 
27  bool isAtom() const override;
28  std::string getName() const override;
29  IValueType getReturnType() const override;
30 
32  private:
33  std::regex regex;
34 };
35 } // namespace joda::query
36 
37 #endif // JODA_REGEXEXTRACTPROVIDER_H
#define CREATE_FACTORY(FCLASS)
Definition: IValueProvider.h:20
rapidjson::MemoryPoolAllocator< RJBaseAlloc > RJMemoryPoolAlloc
Definition: RJFwd.h:26
rapidjson::GenericValue< RJChar, RJMemoryPoolAlloc > RJValue
Definition: RJFwd.h:29
Definition: RapidJsonDocument.h:22
Definition: IValueProvider.h:143
Definition: RegexExtractProvider.h:15
std::string getName() const override
Definition: RegexExtractProvider.cpp:76
RegexExtractProvider(std::vector< std::unique_ptr< IValueProvider >> &&parameters)
Definition: RegexExtractProvider.cpp:47
bool isAtom() const override
Definition: RegexExtractProvider.cpp:39
IValueType getReturnType() const override
Definition: RegexExtractProvider.cpp:80
std::unique_ptr< IValueProvider > duplicate() const override
Definition: RegexExtractProvider.cpp:9
RJValue getAtomValue(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const override
Definition: RegexExtractProvider.cpp:16
bool isConst() const override
Definition: RegexExtractProvider.cpp:14
const RJValue * getValue(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const override
Definition: RegexExtractProvider.cpp:41
Definition: AttributeStatAggregator.h:12
IValueType
Definition: IValueProvider.h:33