JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Member Functions | Static Public Attributes
joda::query::Predicate Class Referenceabstract

#include <Predicate.h>

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

Public Member Functions

virtual ~Predicate ()=default
 
virtual bool check (const RapidJsonDocument &val)=0
 
virtual bool isCompatible (Predicate *other)
 
virtual std::string getType ()
 
virtual void accept (class PredicateVisitor &v)=0
 

Static Public Attributes

static const std::string type = "Predicate"
 

Detailed Description

Predicates represent the filtering CHOOSE predicate. They are used to decide if a given document is in the result set or not.

Constructor & Destructor Documentation

◆ ~Predicate()

virtual joda::query::Predicate::~Predicate ( )
virtualdefault

Member Function Documentation

◆ accept()

virtual void joda::query::Predicate::accept ( class PredicateVisitor v)
pure virtual

Uses the given PredicateVisitor to traverse the predicate tree with the visitor pattern.

Parameters
vthe visitor to use.

Implemented in joda::query::AndPredicate, joda::query::ValToPredicate, joda::query::OrPredicate, joda::query::NegatePredicate, joda::query::EqualizePredicate, and joda::query::ComparePredicate.

◆ check()

virtual bool joda::query::Predicate::check ( const RapidJsonDocument val)
pure virtual

Checks if a given document fulfills the given predicate

Parameters
valthe document to check
Returns
true if the document fulfills the predicate, else false.

Implemented in joda::query::ValToPredicate, joda::query::OrPredicate, joda::query::NegatePredicate, joda::query::EqualizePredicate, joda::query::ComparePredicate, and joda::query::AndPredicate.

◆ getType()

std::string joda::query::Predicate::getType ( )
virtual

Returns the classname of the predicate.

Returns

Reimplemented in joda::query::ValToPredicate, joda::query::OrPredicate, joda::query::NegatePredicate, joda::query::EqualizePredicate, joda::query::ComparePredicate, and joda::query::AndPredicate.

Here is the caller graph for this function:

◆ isCompatible()

bool joda::query::Predicate::isCompatible ( Predicate other)
virtual

Checks if two predicates are semantically equivalent

Returns
true if they are equivalent, false if not

Reimplemented in joda::query::ValToPredicate, joda::query::OrPredicate, joda::query::NegatePredicate, joda::query::EqualizePredicate, joda::query::ComparePredicate, and joda::query::AndPredicate.

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

Field Documentation

◆ type

const std::string joda::query::Predicate::type = "Predicate"
static

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