5 #ifndef JODA_FILEPOSPROVIDER_H
6 #define JODA_FILEPOSPROVIDER_H
25 std::unique_ptr<IValueProvider>
duplicate()
const override {
29 bool isConst()
const override {
return false; }
33 assert(
isAtom() &&
"Did not check for atom before calling");
36 auto *fileOrig =
dynamic_cast<const FileOrigin *
>(tmp.get());
37 if (fileOrig !=
nullptr) {
39 val.SetInt64(fileOrig->getStart());
41 val.SetInt64(fileOrig->getEnd());
47 assert(!
isAtom() &&
"Did not check for atom before calling");
52 return start ?
"FILEPOSSTART" :
"FILEPOSEND";
57 inline static std::unique_ptr<IValueProvider>
_FACTORY(
58 std::vector<std::unique_ptr<IValueProvider>> &&
params) {
59 return std::make_unique<FilePosProvider<start>>(std::move(
params));
rapidjson::MemoryPoolAllocator< RJBaseAlloc > RJMemoryPoolAlloc
Definition: RJFwd.h:26
rapidjson::GenericValue< RJChar, RJMemoryPoolAlloc > RJValue
Definition: RJFwd.h:29
Definition: FileOrigin.h:17
Definition: RapidJsonDocument.h:22
const std::unique_ptr< const IOrigin > & getOrigin() const
Definition: RapidJsonDocument.cpp:25
Definition: FilePosProvider.h:18
static std::unique_ptr< IValueProvider > _FACTORY(std::vector< std::unique_ptr< IValueProvider >> &¶ms)
Definition: FilePosProvider.h:57
const RJValue * getValue(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const override
Definition: FilePosProvider.h:45
std::unique_ptr< IValueProvider > duplicate() const override
Definition: FilePosProvider.h:25
FilePosProvider(std::vector< std::unique_ptr< IValueProvider >> &¶meters)
Definition: FilePosProvider.h:20
std::string getName() const override
Definition: FilePosProvider.h:51
joda::query::IValueType getReturnType() const override
Definition: FilePosProvider.h:55
RJValue getAtomValue(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const override
Definition: FilePosProvider.h:31
bool isConst() const override
Definition: FilePosProvider.h:29
Definition: IValueProvider.h:143
std::vector< std::unique_ptr< IValueProvider > > params
Definition: IValueProvider.h:373
void checkParamSize(unsigned int expected)
Definition: IValueProvider.cpp:112
virtual bool isAtom() const
Definition: IValueProvider.h:215
std::vector< std::unique_ptr< IValueProvider > > duplicateParameters() const
Definition: IValueProvider.cpp:104
Definition: AttributeStatAggregator.h:12
IValueType
Definition: IValueProvider.h:33
@ IV_Number
Definition: IValueProvider.h:35