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

and.h

Blame
  • and.h 869 B
    #ifndef LIBWCCL_OPS_FUNCTIONS_BOOL_PREDICATES_AND_H
    #define LIBWCCL_OPS_FUNCTIONS_BOOL_PREDICATES_AND_H
    
    #include <libwccl/ops/functions/bool/predicates/logicalpredicate.h>
    
    namespace Wccl {
    
    /**
     * Operator that realises "and" logical predicate
     */
    class And : public LogicalPredicate
    {
    public:
    	And(const boost::shared_ptr<BoolFunctionPtrVector>& expressions)
    		: LogicalPredicate(expressions)
    	{
    	}
    
    	/**
    	 * @returns Name of the function: "and"
    	 */
    	std::string raw_name() const {
    		return "and";
    	}
    
    protected :
    	/**
    	 * "And" predicate evaluates each expression from left to right,
         * and returns False once an expression evaluating to False is found.
         * If all expressions were True, it returns True.
    	 */
    	BaseRetValPtr apply_internal(const FunExecContext& context) const;
    
    };
    
    } /* end ns Wccl */
    #endif // LIBWCCL_OPS_FUNCTIONS_BOOL_PREDICATES_AND_H