Skip to content
Snippets Groups Projects
Select Git revision
  • 9166259ecc75c475d20806d1a532de1392d56d09
  • master default protected
  • fix-words-ann
  • wccl-rules-migration
  • develop
5 results

nor.h

Blame
  • nor.h 953 B
    #ifndef LIBWCCL_OPS_FUNCTIONS_BOOL_PREDICATES_NOR_H
    #define LIBWCCL_OPS_FUNCTIONS_BOOL_PREDICATES_NOR_H
    
    #include <libwccl/ops/functions/bool/predicates/logicalpredicate.h>
    
    namespace Wccl {
    
    /**
     * Operator that realises logical predicate "nor",
     * (note: the operator is called "not" in CCL)
     */
    class Nor : public LogicalPredicate
    {
    public:
    	Nor(const boost::shared_ptr<BoolFunctionPtrVector>& expressions)
    		: LogicalPredicate(expressions)
    	{
    	}
    
    	/**
    	 * @returns Name of the function: "not"
    	 */
    	std::string raw_name() const {
    		return "not";
    	}
    
    protected :
    	/**
    	 * "Nor" (aka "not") predicate evaluates expressions one by one in order
         * from left to right, and False is returned once an expression evaluating
         * to True is found.
    	 * If all of the expressions were False, True is returned.
    	 */
    	BaseRetValPtr apply_internal(const FunExecContext&) const;
    
    };
    
    } /* end ns Wccl */
    #endif // LIBWCCL_OPS_FUNCTIONS_BOOL_PREDICATES_NOR_H