JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
SeqNumberProvider.h
Go to the documentation of this file.
1 //
2 // Created by Nico Schäfer on 12/7/17.
3 //
4 
5 #ifndef JODA_SEQNUMBERPROVIDER_H
6 #define JODA_SEQNUMBERPROVIDER_H
7 
8 #include <atomic>
9 
10 #include "IValueProvider.h"
11 namespace joda::query {
16  public:
17  explicit SeqNumberProvider(
18  std::vector<std::unique_ptr<IValueProvider>> &&parameters);
19  explicit SeqNumberProvider(std::shared_ptr<std::atomic_ulong> currNum);
20  std::unique_ptr<IValueProvider> duplicate() const override;
21  bool isConst() const override;
22 
24  RJMemoryPoolAlloc &alloc) const override;
25  const RJValue *getValue(const RapidJsonDocument &json,
26  RJMemoryPoolAlloc &alloc) const override;
27  std::string getName() const override;
28  IValueType getReturnType() const override;
29 
31 
32  protected:
33  std::shared_ptr<std::atomic_ulong> currNum;
34 
35  private:
37 };
38 } // namespace joda::query
39 
40 #endif // JODA_SEQNUMBERPROVIDER_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: SeqNumberProvider.h:15
std::shared_ptr< std::atomic_ulong > currNum
Definition: SeqNumberProvider.h:33
RJValue getAtomValue(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const override
Definition: SeqNumberProvider.cpp:22
bool isConst() const override
Definition: SeqNumberProvider.cpp:14
IValueType getReturnType() const override
Definition: SeqNumberProvider.cpp:44
std::unique_ptr< IValueProvider > duplicate() const override
Definition: SeqNumberProvider.cpp:10
std::string getName() const override
Definition: SeqNumberProvider.cpp:42
const RJValue * getValue(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const override
Definition: SeqNumberProvider.cpp:29
Definition: AttributeStatAggregator.h:12
IValueType
Definition: IValueProvider.h:33