diff --git a/swig/libcclexpression.i b/swig/libcclexpression.i new file mode 100644 index 0000000000000000000000000000000000000000..b401e859ee380a0b911092228eb12d6babccc89a --- /dev/null +++ b/swig/libcclexpression.i @@ -0,0 +1,23 @@ +#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 */ diff --git a/swig/libcclfunctionaloperator.i b/swig/libcclfunctionaloperator.i new file mode 100644 index 0000000000000000000000000000000000000000..6694916efdd8c08c2ed3c045c5c559510ed35a63 --- /dev/null +++ b/swig/libcclfunctionaloperator.i @@ -0,0 +1,28 @@ +#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 */ diff --git a/swig/libcclparsedexpression.i b/swig/libcclparsedexpression.i new file mode 100644 index 0000000000000000000000000000000000000000..6b224f7eb257ec1cffd37ce34180edb57deab9ff --- /dev/null +++ b/swig/libcclparsedexpression.i @@ -0,0 +1,43 @@ +#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 */