Skip to content
Snippets Groups Projects
Commit 1e183f19 authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

Basic functionality of the expression, parsed expression and functional operator (to develop)

parent 7c4e9eef
Branches
No related merge requests found
#ifndef SWIG_LIBWCCL_EXPRESSION_I
#define SWIG_LIBWCCL_EXPRESSION_I
%module libcclexpression
%{
#include <libwccl/ops/expression.h>
#include <boost/noncopyable.hpp>
%}
%include "libcorpustagset.i"
%include "std_string.i"
namespace Wccl {
class Expression : boost::noncopyable {
public:
virtual std::string to_string(const Corpus2::Tagset& tagset) const = 0;
};
}
using namespace std;
using namespace Wccl;
#endif /* SWIG_LIBWCCL_EXPRESSION_I */
#ifndef SWIG_LIBWCCL_FUNCTIONALOPERATOR_I
#define SWIG_LIBWCCL_FUNCTIONALOPERATOR_I
%module libcclparsedexpression
%{
#include <libwccl/ops/operator.h>
%}
%include "libcclparsedexpression.i"
%include "std_string.i"
namespace Wccl {
class FunctionalOperator : public ParsedExpression {
public:
// virtual boost::shared_ptr<const Value> base_apply(const SentenceContext& sc) = 0;
// boost::shared_ptr<FunctionalOperator> clone_ptr() const;
// boost::shared_ptr<FunctionalOperator> clone_clean_ptr() const;
protected:
// explicit FunctionalOperator(const Variables& variables);
// FunctionalOperator* clone_internal() const = 0;
};
}
using namespace std;
using namespace Wccl;
#endif /* SWIG_LIBWCCL_FUNCTIONALOPERATOR_I */
#ifndef SWIG_LIBWCCL_PARSEDEXPRESSION_I
#define SWIG_LIBWCCL_PARSEDEXPRESSION_I
%module libcclparsedexpression
%{
#include <libwccl/ops/parsedexpression.h>
%}
%include "libcclexpression.i"
%include "std_string.i"
namespace Wccl {
class ParsedExpression : public Expression {
public:
// TODO
// const Value& operator[](const std::string& var_name) const;
// template<class T>
// const T& get(const std::string& var_name) const;
// template<class T>
// T& get(const std::string& var_name)
// template<class T>
// void set(const std::string& var_name, const T& value);
void clean();
// boost::shared_ptr<ParsedExpression> clone_ptr() const;
// boost::shared_ptr<ParsedExpression> clone_clean_ptr() const;
std::string variables_string(const Corpus2::Tagset& tagset) const;
// std::ostream& dump_variables(std::ostream& ostream, const Corpus2::Tagset& tagset) const;
protected:
// explicit ParsedExpression(const Variables& variables);
// boost::shared_ptr<Variables> variables_;
virtual ParsedExpression* clone_internal() const = 0;
};
}
using namespace std;
using namespace Wccl;
#endif /* SWIG_LIBWCCL_PARSEDEXPRESSION_I */
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