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

#include <OrPredicate.h>

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

Public Member Functions

 OrPredicate (std::unique_ptr< Predicate > p1, std::unique_ptr< Predicate > p2)
 
bool check (const RapidJsonDocument &val) override
 
bool isCompatible (Predicate *other) override
 
virtual std::string getType () override
 
void accept (class PredicateVisitor &v) override
 
void subAccept (class PredicateVisitor &v, bool lhs)
 
- Public Member Functions inherited from joda::query::Predicate
virtual ~Predicate ()=default
 

Static Public Attributes

static const std::string type = "OrPredicate"
 
- Static Public Attributes inherited from joda::query::Predicate
static const std::string type = "Predicate"
 

Protected Attributes

std::unique_ptr< Predicatep1
 
std::unique_ptr< Predicatep2
 

Friends

class CNFPredicateVisitor
 
class CNFtoListPredicateVisitor
 
class CopyPredicateVisitor
 

Detailed Description

Combines the result of two subpredicates by using the logical OR operation

Constructor & Destructor Documentation

◆ OrPredicate()

joda::query::OrPredicate::OrPredicate ( std::unique_ptr< Predicate p1,
std::unique_ptr< Predicate p2 
)
explicit

Member Function Documentation

◆ accept()

void joda::query::OrPredicate::accept ( class PredicateVisitor v)
overridevirtual

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

Parameters
vthe visitor to use.

Implements joda::query::Predicate.

Here is the call graph for this function:

◆ check()

bool joda::query::OrPredicate::check ( const RapidJsonDocument val)
overridevirtual

Checks if a given document fulfills the given predicate

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

Implements joda::query::Predicate.

◆ getType()

std::string joda::query::OrPredicate::getType ( )
overridevirtual

Returns the classname of the predicate.

Returns

Reimplemented from joda::query::Predicate.

◆ isCompatible()

bool joda::query::OrPredicate::isCompatible ( Predicate other)
overridevirtual

Checks if two predicates are semantically equivalent

Returns
true if they are equivalent, false if not

Reimplemented from joda::query::Predicate.

◆ subAccept()

void joda::query::OrPredicate::subAccept ( class PredicateVisitor v,
bool  lhs 
)
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ CNFPredicateVisitor

friend class CNFPredicateVisitor
friend

◆ CNFtoListPredicateVisitor

friend class CNFtoListPredicateVisitor
friend

◆ CopyPredicateVisitor

friend class CopyPredicateVisitor
friend

Field Documentation

◆ p1

std::unique_ptr<Predicate> joda::query::OrPredicate::p1
protected

◆ p2

std::unique_ptr<Predicate> joda::query::OrPredicate::p2
protected

◆ type

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

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