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

#include <NegatePredicate.h>

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

Public Member Functions

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

Static Public Attributes

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

Protected Attributes

std::unique_ptr< Predicatepred
 

Friends

class CNFPredicateVisitor
 
class CNFtoListPredicateVisitor
 
class CopyPredicateVisitor
 
class CrackPredicateVisitor
 

Detailed Description

Negates the result of the subpredicate

Constructor & Destructor Documentation

◆ NegatePredicate()

joda::query::NegatePredicate::NegatePredicate ( std::unique_ptr< Predicate pred)
explicit

Member Function Documentation

◆ accept()

void joda::query::NegatePredicate::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::NegatePredicate::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::NegatePredicate::getType ( )
overridevirtual

Returns the classname of the predicate.

Returns

Reimplemented from joda::query::Predicate.

◆ isCompatible()

bool joda::query::NegatePredicate::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.

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

◆ setPredicate()

void joda::query::NegatePredicate::setPredicate ( std::unique_ptr< Predicate pred)

◆ subAccept()

void joda::query::NegatePredicate::subAccept ( class PredicateVisitor v)
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

◆ CrackPredicateVisitor

friend class CrackPredicateVisitor
friend

Field Documentation

◆ pred

std::unique_ptr<Predicate> joda::query::NegatePredicate::pred
protected

◆ type

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

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