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

#include <AndPredicate.h>

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

Public Member Functions

 AndPredicate (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 (PredicateVisitor &v) override
 
const std::unique_ptr< Predicate > & getLHS ()
 
const std::unique_ptr< Predicate > & getRHS ()
 
void subAccept (PredicateVisitor &v, bool lhs)
 
- Public Member Functions inherited from joda::query::Predicate
virtual ~Predicate ()=default
 

Static Public Attributes

static const std::string type = "AndPredicate"
 
- 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 AND operation

Constructor & Destructor Documentation

◆ AndPredicate()

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

Member Function Documentation

◆ accept()

void joda::query::AndPredicate::accept ( 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::AndPredicate::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.

◆ getLHS()

const std::unique_ptr< joda::query::Predicate > & joda::query::AndPredicate::getLHS ( )
Here is the caller graph for this function:

◆ getRHS()

const std::unique_ptr< joda::query::Predicate > & joda::query::AndPredicate::getRHS ( )

◆ getType()

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

Returns the classname of the predicate.

Returns

Reimplemented from joda::query::Predicate.

◆ isCompatible()

bool joda::query::AndPredicate::isCompatible ( query::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::AndPredicate::subAccept ( PredicateVisitor v,
bool  lhs 
)

Accepts either the left hand or right hand predicate

Parameters
vThe visitor to use
lhsif true, accepts the left hand predicate, if false accepts the right hand predicate
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::AndPredicate::p1
protected

◆ p2

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

◆ type

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

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