Web Analytics Made Easy - Statcounter
Skip to content

Class SBCFunctorPredicateXOr0#

ClassList > SBCFunctorPredicateXOr0

This class describes a predicate that is true if exactly one of the two predicates istrue __

  • #include <SBCFunctorPredicateXOr.hpp>

Inherits the following classes: SBCFunctorPredicate0

Public Functions#

Type Name
SBCFunctorPredicateXOr0 (const SBCFunctorPredicate0 * firstPredicate, const SBCFunctorPredicate0 * secondPredicate)
Builds the functor predicate. The input functors are cloned internally.
virtual SBCFunctorPredicateXOr0 * clone () override const
Clones the functor.
virtual bool operator() () override
Performs the predicate's operations and returns the result.
virtual bool operator() () override const
Performs the predicate's operations and returns the result.
virtual ~SBCFunctorPredicateXOr0 ()
Destructor.

Public Functions Documentation#

function SBCFunctorPredicateXOr0#

Builds the functor predicate. The input functors are cloned internally.

SBCFunctorPredicateXOr0::SBCFunctorPredicateXOr0 (
    const SBCFunctorPredicate0 * firstPredicate,
    const SBCFunctorPredicate0 * secondPredicate
) 

Constructs a predicate that evaluates to true if exactly one of the two given predicates is true.

The input predicates are cloned internally.

Parameters:

  • firstPredicate Pointer to the first predicate to be combined.
  • secondPredicate Pointer to the second predicate to be combined.

function clone#

Clones the functor.

virtual SBCFunctorPredicateXOr0 * SBCFunctorPredicateXOr0::clone () override const

Creates a deep copy of this predicate.

Returns:

A pointer to a newly allocated SBCFunctorPredicateXOr0 that is a copy of this predicate.

Implements SBCFunctor::clone


function operator()#

Performs the predicate's operations and returns the result.

virtual bool SBCFunctorPredicateXOr0::operator() () override

Evaluates the predicate.

Returns:

The result of the exclusive-or (XOR) of the two underlying predicates.


function operator()#

Performs the predicate's operations and returns the result.

virtual bool SBCFunctorPredicateXOr0::operator() () override const

Evaluates the predicate (const overload).

Returns:

The result of the exclusive-or (XOR) of the two underlying predicates.


function ~SBCFunctorPredicateXOr0#

Destructor.

virtual SBCFunctorPredicateXOr0::~SBCFunctorPredicateXOr0 () 

Destroys the predicate and releases any allocated resources.