From 53e6f30c3df36fcf51036d0d7b51f3a1cefd9b9b Mon Sep 17 00:00:00 2001 From: Adam Wardynski <award@.(win7-laptop)> Date: Sun, 21 Nov 2010 21:14:08 +0100 Subject: [PATCH] Expression, new abstract base class for all WCCL expressions. This is to accomodate rules in future, and repurpose "Operator" to be a library api-level class for users of the library, for parsed functional operators. --- libwccl/ops/expression.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 libwccl/ops/expression.h diff --git a/libwccl/ops/expression.h b/libwccl/ops/expression.h new file mode 100644 index 0000000..8d3e71a --- /dev/null +++ b/libwccl/ops/expression.h @@ -0,0 +1,28 @@ +#ifndef LIBWCCL_OPS_EXPRESSION_H +#define LIBWCCL_OPS_EXPRESSION_H + +#include <libcorpus2/tagset.h> +#include <boost/noncopyable.hpp> + +namespace Wccl { + +/** + * Abstract base class for WCCL expressions + */ +class Expression : public boost::noncopyable { +public: + /** + * @returns String representation of the expression. + */ + virtual std::string to_string(const Corpus2::Tagset& tagset) const = 0; + /** + * @returns String representation of the expression that does not + * require a tagset. + * @note Might be incomplete and/or contain internal info. + */ + virtual std::string to_raw_string() const = 0; +}; + +} /* end ns Wccl */ + +#endif // LIBWCCL_OPS_EXPRESSION_H -- GitLab