5 #ifndef JODA_UNARYPOINTERACCEPTPROVIDER_H
6 #define JODA_UNARYPOINTERACCEPTPROVIDER_H
28 std::vector<std::unique_ptr<IValueProvider>> &¶meters)
32 DCHECK(
isAtom()) <<
"Only atom ReturnTypes allowed";
38 std::string
getName()
const override {
return Calc::name; };
42 std::unique_ptr<IValueProvider>
duplicate()
const override {
43 return std::make_unique<UnaryPointerAcceptProvider<Calc>>(
47 bool isAtom()
const override {
return true; }
51 DCHECK(!
isAtom()) <<
"Did not check for atom first";
57 DCHECK(
isAtom()) <<
"Did not check for atom first";
58 if (
params.front()->isAtom()) {
59 auto v =
params.front()->getAtomValue(json, alloc);
60 return Calc::pointer(&v);
63 if (ptr !=
nullptr)
return Calc::pointer(ptr);
64 auto vo = accepter.
getObjVO(json, alloc);
65 if (vo !=
nullptr)
return Calc::virtualObject(vo);
66 return Calc::accept(json, alloc, accepter);
#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
std::vector< std::unique_ptr< IValueProvider > > params
Definition: IValueProvider.h:373
void checkParamSize(unsigned int expected)
Definition: IValueProvider.cpp:112
std::vector< std::unique_ptr< IValueProvider > > duplicateParameters() const
Definition: IValueProvider.cpp:104
void checkParamType(unsigned int i, IValueType expected)
Definition: IValueProvider.cpp:125
virtual std::string toString() const
Definition: IValueProvider.cpp:99
Definition: UnaryPointerAcceptProvider.h:25
bool isAtom() const override
Definition: UnaryPointerAcceptProvider.h:47
std::string getName() const override
Definition: UnaryPointerAcceptProvider.h:38
UnaryPointerAcceptProvider(std::vector< std::unique_ptr< IValueProvider >> &¶meters)
Definition: UnaryPointerAcceptProvider.h:27
IValueType getReturnType() const override
Definition: UnaryPointerAcceptProvider.h:36
RJValue getAtomValue(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const override
Definition: UnaryPointerAcceptProvider.h:55
std::string toString() const override
Definition: UnaryPointerAcceptProvider.h:40
std::unique_ptr< IValueProvider > duplicate() const override
Definition: UnaryPointerAcceptProvider.h:42
void getAttributes(std::vector< std::string > &vec) const override
Definition: UnaryPointerAcceptProvider.h:71
const RJValue * getValue(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const override
Definition: UnaryPointerAcceptProvider.h:49
bool isConst() const override
Definition: UnaryPointerAcceptProvider.h:69
Definition: ValueAccepter.h:16
const RJValue * getPointer(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const
Definition: ValueAccepter.h:127
const VirtualObject * getObjVO(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const
Definition: ValueAccepter.h:135
Definition: AttributeStatAggregator.h:12
IValueType
Definition: IValueProvider.h:33