Skip to content
Snippets Groups Projects
Commit 24d02815 authored by Adam Wardyński's avatar Adam Wardyński
Browse files

Predicate, an abstract base class for operators that return Bool

parent 13c76831
Branches
No related merge requests found
#include <libwccl/ops/predicate.h>
namespace Wccl {
const boost::scoped_ptr< Constant<Bool> > Predicate::True(new Constant<Bool>(Bool(true)));
const boost::scoped_ptr< Constant<Bool> > Predicate::False(new Constant<Bool>(Bool(false)));
} /* end ns Wccl */
#ifndef PREDICATE_H
#define PREDICATE_H
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#include <libwccl/values/bool.h>
#include <libwccl/ops/functions.h>
#include <libwccl/ops/constant.h>
namespace Wccl {
/**
* Abstract base class for Predicates (operators returning Bool)
*/
class Predicate : public Function<Bool> {
public:
/**
* Constant<Bool> holding true value, to use by predicates when returning value
*/
static const boost::scoped_ptr< Constant<Bool> > True;
/**
* Constant<Bool> holding false value, to use by predicates when returning value
*/
static const boost::scoped_ptr< Constant<Bool> > False;
};
} /* end ns Wccl */
#endif // PREDICATE_H
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment