JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Member Functions | Protected Attributes
joda::query::PointerProvider Class Reference

#include <PointerProvider.h>

Inheritance diagram for joda::query::PointerProvider:
[legend]
Collaboration diagram for joda::query::PointerProvider:
[legend]

Public Member Functions

 PointerProvider (const std::string &str)
 
bool comparable () const override
 
bool equalizable () const override
 
std::unique_ptr< IValueProviderduplicate () const override
 
std::string toString () const override
 
std::string getAttributeString () const
 
bool isConst () const override
 
RJValue getAtomValue (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const override
 
const RJValuegetValue (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const override
 
void getAttributes (std::vector< std::string > &vec) const override
 
std::vector< std::string > getAttributes () const override
 
bool isString () const override
 
bool isNumber () const override
 
bool isBool () const override
 
bool isObject () const override
 
bool isArray () const override
 
bool isAny () const override
 
std::string getName () const override
 
IValueType getReturnType () const override
 
std::variant< const RJValue, std::optional< const RJValue * >, const VirtualObject * > getPointerIfExists (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) const
 
template<class Handler >
bool Accept (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc, Handler &h) const
 
bool objIsPointerEvaluatable (const RapidJsonDocument &json) const
 
const VirtualObjectgetVO (const RapidJsonDocument &json) const
 
- Public Member Functions inherited from joda::query::IValueProvider
 IValueProvider (std::vector< std::unique_ptr< IValueProvider >> &&parameters)
 
 IValueProvider ()
 
virtual ~IValueProvider ()=default
 
virtual bool isNull () const
 
virtual bool isAtom () const
 
bool equal (IValueProvider *other, const RapidJsonDocument &json) const
 

Protected Attributes

RJPointer pointer
 
std::string ptrStr
 
- Protected Attributes inherited from joda::query::IValueProvider
std::vector< std::unique_ptr< IValueProvider > > params
 

Additional Inherited Members

- Static Public Member Functions inherited from joda::query::IValueProvider
static void replaceConstSubexpressions (std::unique_ptr< IValueProvider > &val)
 
static bool constBoolCheck (std::unique_ptr< IValueProvider > &val)
 
- Protected Member Functions inherited from joda::query::IValueProvider
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
 

Detailed Description

'<JSON Pointer>', a pointer to a specific value in a document

Constructor & Destructor Documentation

◆ PointerProvider()

joda::query::PointerProvider::PointerProvider ( const std::string &  str)

Member Function Documentation

◆ Accept()

template<class Handler >
bool joda::query::PointerProvider::Accept ( const RapidJsonDocument json,
RJMemoryPoolAlloc alloc,
Handler &  h 
) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ comparable()

bool joda::query::PointerProvider::comparable ( ) const
overridevirtual
Returns
True if comparable by >=, >, <=, <. False otherwise

Reimplemented from joda::query::IValueProvider.

◆ duplicate()

std::unique_ptr< joda::query::IValueProvider > joda::query::PointerProvider::duplicate ( ) const
overridevirtual
Returns
a pointer to a duplicate of the IValueProvider

Implements joda::query::IValueProvider.

◆ equalizable()

bool joda::query::PointerProvider::equalizable ( ) const
overridevirtual
Returns
True if comparable by ==, !=. False otherwise

Reimplemented from joda::query::IValueProvider.

◆ getAtomValue()

RJValue joda::query::PointerProvider::getAtomValue ( const RapidJsonDocument json,
RJMemoryPoolAlloc alloc 
) const
overridevirtual

Gets an atomic value

Attention
isAtom() has to return true. If not this will result in undefined behavior
Parameters
jsonThe Rapidjsondocument to retrieve values from. (Or an empty RapidJsonDocument for const values)
allocA MemoryPoolAllocator to create the values with
Returns
a value containing the result

Implements joda::query::IValueProvider.

◆ getAttributes() [1/2]

std::vector< std::string > joda::query::PointerProvider::getAttributes ( ) const
overridevirtual

Gets a list of all used document attributes

Returns
List of used document attributes

Reimplemented from joda::query::IValueProvider.

◆ getAttributes() [2/2]

void joda::query::PointerProvider::getAttributes ( std::vector< std::string > &  vec) const
overridevirtual

Fills a list with all used document attributes

Parameters
veclist to fill

Reimplemented from joda::query::IValueProvider.

◆ getAttributeString()

std::string joda::query::PointerProvider::getAttributeString ( ) const

◆ getName()

std::string joda::query::PointerProvider::getName ( ) const
overridevirtual
Returns
The function name

Implements joda::query::IValueProvider.

◆ getPointerIfExists()

std::variant< const RJValue, std::optional< const RJValue * >, const VirtualObject * > joda::query::PointerProvider::getPointerIfExists ( const RapidJsonDocument json,
RJMemoryPoolAlloc alloc 
) const

Returns either a atomic RJValue, an optional pointer or a VirtualObject, depending on the existing indices and values.

Parameters
jsonthe document to check
allocthe allocator to use for allocation operations
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getReturnType()

joda::query::IValueType joda::query::PointerProvider::getReturnType ( ) const
overridevirtual
Returns
The type returned by the function

Implements joda::query::IValueProvider.

◆ getValue()

const RJValue * joda::query::PointerProvider::getValue ( const RapidJsonDocument json,
RJMemoryPoolAlloc alloc 
) const
overridevirtual

Gets an value

Attention
isAtom() has to return false. If not this will result in undefined behavior
Parameters
jsonThe Rapidjsondocument to retrieve values from. (Or an empty RapidJsonDocument for const values)
allocA MemoryPoolAllocator to create the values with
Returns
a value-pointer containing the result

Implements joda::query::IValueProvider.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVO()

const VirtualObject * joda::query::PointerProvider::getVO ( const RapidJsonDocument json) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isAny()

bool joda::query::PointerProvider::isAny ( ) const
overridevirtual

Reimplemented from joda::query::IValueProvider.

◆ isArray()

bool joda::query::PointerProvider::isArray ( ) const
overridevirtual

Reimplemented from joda::query::IValueProvider.

◆ isBool()

bool joda::query::PointerProvider::isBool ( ) const
overridevirtual

Reimplemented from joda::query::IValueProvider.

◆ isConst()

bool joda::query::PointerProvider::isConst ( ) const
overridevirtual
Returns
True if the Provider is const, false else

Implements joda::query::IValueProvider.

◆ isNumber()

bool joda::query::PointerProvider::isNumber ( ) const
overridevirtual

Reimplemented from joda::query::IValueProvider.

◆ isObject()

bool joda::query::PointerProvider::isObject ( ) const
overridevirtual

Reimplemented from joda::query::IValueProvider.

◆ isString()

bool joda::query::PointerProvider::isString ( ) const
overridevirtual

Reimplemented from joda::query::IValueProvider.

◆ objIsPointerEvaluatable()

bool joda::query::PointerProvider::objIsPointerEvaluatable ( const RapidJsonDocument json) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

std::string joda::query::PointerProvider::toString ( ) const
overridevirtual
Returns
A textual representation of the IValueProvider

Reimplemented from joda::query::IValueProvider.

Field Documentation

◆ pointer

RJPointer joda::query::PointerProvider::pointer
protected

◆ ptrStr

std::string joda::query::PointerProvider::ptrStr
protected

The documentation for this class was generated from the following files: