JODA
0.13.1 (59b41972)
JSON On-Demand Analysis
|
#include <IValueProvider.h>
Public Member Functions | |
IValueProvider (std::vector< std::unique_ptr< IValueProvider >> &¶meters) | |
IValueProvider () | |
virtual | ~IValueProvider ()=default |
virtual RJValue | getAtomValue (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const =0 |
virtual RJValue const * | getValue (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const =0 |
virtual std::unique_ptr< IValueProvider > | duplicate () const =0 |
virtual std::string | toString () const |
virtual std::string | getName () const =0 |
virtual bool | isConst () const =0 |
virtual IValueType | getReturnType () const =0 |
virtual bool | isString () const |
virtual bool | isNumber () const |
virtual bool | isBool () const |
virtual bool | isObject () const |
virtual bool | isArray () const |
virtual bool | isNull () const |
virtual bool | isAny () const |
virtual bool | isAtom () const |
virtual std::vector< std::string > | getAttributes () const |
virtual void | getAttributes (std::vector< std::string > &vec) const |
bool | equal (IValueProvider *other, const RapidJsonDocument &json) const |
virtual bool | comparable () const |
virtual bool | equalizable () const |
Static Public Member Functions | |
static void | replaceConstSubexpressions (std::unique_ptr< IValueProvider > &val) |
static bool | constBoolCheck (std::unique_ptr< IValueProvider > &val) |
Protected Member Functions | |
bool | getParamString (std::string &ret, const std::unique_ptr< IValueProvider > &val, const RapidJsonDocument &json) const |
void | checkParamSize (unsigned int expected) |
void | checkMinParamSize (unsigned int expected) |
void | checkParamType (unsigned int i, IValueType expected) |
void | checkOptionalParamType (unsigned int i, IValueType expected) |
std::vector< std::unique_ptr< IValueProvider > > | duplicateParameters () const |
std::string | getParameterStringRepresentation () const |
Protected Attributes | |
std::vector< std::unique_ptr< IValueProvider > > | params |
IValueProviders provide values to functions. They may be constant values or functions themselves
|
explicit |
Creates a new IValueProvider with given parameters
WrongParameterException | if the parameters do not fit the expected (wrong count or type) |
parameters | A vector of IValueProviders |
joda::query::IValueProvider::IValueProvider | ( | ) |
Creates a new IValueProvider without parameters
WrongParameterException | If parameters where expected |
|
virtualdefault |
|
protected |
Checks wether the number of parameters is aat least expected
expected | The expected number of parameters |
WrongParameterCountException | if number is less than expected |
|
protected |
Checks wether the parameter i
is of type expected
if it exists
i | The index of the parameter to check |
expected | The expected type of the parameter |
WrongParameterTypeException | if type not as expected |
|
protected |
Checks wether the number of parameters is exactly expected
expected | The expected number of parameters |
WrongParameterCountException | if number not as expected |
|
protected |
Checks wether the parameter i
is of type expected
i | The index of the parameter to check |
expected | The expected type of the parameter |
WrongParameterTypeException | if type not as expected |
|
inlinevirtual |
Reimplemented in joda::query::PointerProvider.
|
static |
|
pure virtual |
Implemented in DummyNull, DummyArray, DummyObject, joda::query::UnaryStringProvider< Calc >, joda::query::UnaryPointerAcceptProvider< Calc >, joda::query::UnaryNumberProvider< Calc >, joda::query::TypeProvider, joda::query::TemplateProvider< Calc >, joda::query::SubStringProvider, joda::query::SeqNumberProvider, joda::query::RegexReplaceProvider, joda::query::RegexProvider, joda::query::RegexExtractProvider, joda::query::PointerProvider, joda::query::NullProvider, joda::query::IsXBoolProvider< T >, joda::query::INListProvider, joda::query::IDProvider, joda::query::FilePosProvider< start >, joda::query::FileNameProvider, joda::query::BinaryStringProvider< Calc >, joda::query::BinaryNumberProvider< Calc >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, and joda::query::ArraySizeProvider.
|
protected |
|
inline |
Checks if two IValueProviders values are equal
other | other IValueProvider to compare with |
json | The RapidJsonDocument to (potentially) retrieve values from |
|
inlinevirtual |
Reimplemented in joda::query::PointerProvider.
|
pure virtual |
Gets an atomic value
json | The Rapidjsondocument to retrieve values from. (Or an empty RapidJsonDocument for const values) |
alloc | A MemoryPoolAllocator to create the values with |
Implemented in joda::query::UnaryStringProvider< Calc >, joda::query::UnaryPointerAcceptProvider< Calc >, joda::query::UnaryNumberProvider< Calc >, joda::query::TypeProvider, joda::query::TemplateProvider< Calc >, joda::query::SubStringProvider, joda::query::SeqNumberProvider, joda::query::RegexReplaceProvider, joda::query::RegexProvider, joda::query::RegexExtractProvider, joda::query::PointerProvider, joda::query::NullProvider, joda::query::IsXBoolProvider< T >, joda::query::INListProvider, joda::query::IDProvider, joda::query::FilePosProvider< start >, joda::query::FileNameProvider, joda::query::BinaryStringProvider< Calc >, joda::query::BinaryNumberProvider< Calc >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::ArraySizeProvider, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, DummyNull, DummyArray, DummyObject, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, and joda::query::AtomProvider< Calc::AtomType >.
|
inlinevirtual |
Gets a list of all used document attributes
Reimplemented in joda::query::PointerProvider.
|
inlinevirtual |
Fills a list with all used document attributes
vec | list to fill |
Reimplemented in joda::query::UnaryPointerAcceptProvider< Calc >, and joda::query::PointerProvider.
|
pure virtual |
Implemented in DummyNull, DummyArray, DummyObject, joda::query::UnaryStringProvider< Calc >, joda::query::UnaryPointerAcceptProvider< Calc >, joda::query::UnaryNumberProvider< Calc >, joda::query::TypeProvider, joda::query::TemplateProvider< Calc >, joda::query::SubStringProvider, joda::query::SeqNumberProvider, joda::query::RegexReplaceProvider, joda::query::RegexProvider, joda::query::RegexExtractProvider, joda::query::PointerProvider, joda::query::NullProvider, joda::query::IsXBoolProvider< T >, joda::query::INListProvider, joda::query::IDProvider, joda::query::FilePosProvider< start >, joda::query::FileNameProvider, joda::query::ConstantNumber< Calc >, joda::query::BinaryStringProvider< Calc >, joda::query::BinaryNumberProvider< Calc >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::ArraySizeProvider, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, joda::query::IsXBoolProvider< T >, and joda::query::IsXBoolProvider< T >.
|
protected |
|
inlineprotected |
|
pure virtual |
Implemented in DummyNull, DummyArray, DummyObject, joda::query::UnaryStringProvider< Calc >, joda::query::UnaryPointerAcceptProvider< Calc >, joda::query::UnaryNumberProvider< Calc >, joda::query::TypeProvider, joda::query::TemplateProvider< Calc >, joda::query::SubStringProvider, joda::query::SeqNumberProvider, joda::query::RegexReplaceProvider, joda::query::RegexProvider, joda::query::RegexExtractProvider, joda::query::PointerProvider, joda::query::NullProvider, joda::query::IsXBoolProvider< T >, joda::query::INListProvider, joda::query::IDProvider, joda::query::FilePosProvider< start >, joda::query::FileNameProvider, joda::query::BinaryStringProvider< Calc >, joda::query::BinaryNumberProvider< Calc >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::ArraySizeProvider, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, and joda::query::AtomProvider< Calc::AtomType >.
|
pure virtual |
Gets an value
json | The Rapidjsondocument to retrieve values from. (Or an empty RapidJsonDocument for const values) |
alloc | A MemoryPoolAllocator to create the values with |
Implemented in joda::query::UnaryStringProvider< Calc >, joda::query::UnaryPointerAcceptProvider< Calc >, joda::query::UnaryNumberProvider< Calc >, joda::query::TypeProvider, joda::query::TemplateProvider< Calc >, joda::query::SubStringProvider, joda::query::SeqNumberProvider, joda::query::RegexReplaceProvider, joda::query::RegexProvider, joda::query::RegexExtractProvider, joda::query::PointerProvider, joda::query::NullProvider, joda::query::IsXBoolProvider< T >, joda::query::INListProvider, joda::query::IDProvider, joda::query::FilePosProvider< start >, joda::query::FileNameProvider, joda::query::BinaryStringProvider< Calc >, joda::query::BinaryNumberProvider< Calc >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::ArraySizeProvider, DummyNull, DummyArray, and DummyObject.
|
inlinevirtual |
Reimplemented in joda::query::PointerProvider.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in joda::query::UnaryPointerAcceptProvider< Calc >, joda::query::TemplateProvider< Calc >, joda::query::SubStringProvider, joda::query::RegexExtractProvider, and joda::query::NullProvider.
|
inlinevirtual |
Reimplemented in joda::query::PointerProvider.
|
pure virtual |
Implemented in DummyNull, DummyArray, DummyObject, joda::query::UnaryStringProvider< Calc >, joda::query::UnaryPointerAcceptProvider< Calc >, joda::query::UnaryNumberProvider< Calc >, joda::query::TypeProvider, joda::query::TemplateProvider< Calc >, joda::query::SubStringProvider, joda::query::SeqNumberProvider, joda::query::RegexReplaceProvider, joda::query::RegexProvider, joda::query::RegexExtractProvider, joda::query::PointerProvider, joda::query::NullProvider, joda::query::IsXBoolProvider< T >, joda::query::INListProvider, joda::query::IDProvider, joda::query::FilePosProvider< start >, joda::query::FileNameProvider, joda::query::BinaryStringProvider< Calc >, joda::query::BinaryNumberProvider< Calc >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, and joda::query::ArraySizeProvider.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in joda::query::PointerProvider.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in joda::query::PointerProvider.
|
static |
|
virtual |
Reimplemented in joda::query::UnaryStringProvider< Calc >, joda::query::UnaryPointerAcceptProvider< Calc >, joda::query::UnaryNumberProvider< Calc >, joda::query::TemplateProvider< Calc >, joda::query::PointerProvider, joda::query::ConstantNumber< Calc >, joda::query::BinaryStringProvider< Calc >, joda::query::BinaryNumberProvider< Calc >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, joda::query::AtomProvider< Calc::AtomType >, joda::query::AtomProvider< T >, and joda::query::AtomProvider< Calc::AtomType >.
|
protected |