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

predicate.h

Blame
  • predicate.h 858 B
    #ifndef LIBWCCL_OPS_FUNCTIONS_BOOL_PREDICATE_H
    #define LIBWCCL_OPS_FUNCTIONS_BOOL_PREDICATE_H
    
    #include <boost/scoped_ptr.hpp>
    
    #include <libwccl/values/bool.h>
    #include <libwccl/ops/functions/constant.h>
    
    namespace Wccl {
    
    /**
     * Abstract base class for Predicates (operators returning Bool)
     */
    class Predicate : public Function<Bool> {
    public:
    	/**
    	 * Helper function returing True, to use by predicates when returning value
    	 */
    	static RetValPtr True(const FunExecContext& context);
    	/**
    	 * Helper function returing False, to use by predicates when returning value
    	 */
    	static RetValPtr False(const FunExecContext& context);
    	/**
    	 * Helper function returing True or False depending on condition
    	 */
    	static RetValPtr evaluate(bool condition, const FunExecContext& context);
    };
    
    } /* end ns Wccl */
    
    #endif // LIBWCCL_OPS_FUNCTIONS_BOOL_PREDICATE_H