From e343d08fc2d3cd1ebcb88be9f816d17ed6c1d732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=99dzia?= <pawel.kedzia@pwr.wroc.pl> Date: Mon, 4 Apr 2011 14:29:50 +0200 Subject: [PATCH] Added wrapper for Wccl::Match --- swig/libcclmatch.i | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 swig/libcclmatch.i diff --git a/swig/libcclmatch.i b/swig/libcclmatch.i new file mode 100644 index 0000000..41ba586 --- /dev/null +++ b/swig/libcclmatch.i @@ -0,0 +1,37 @@ +#ifndef SWIG_LIBWCCL_MATCH_I +#define SWIG_LIBWCCL_MATCH_I + +%module libcclbool +%{ + #include <libwccl/values/value.h> + #include <libwccl/values/match.h> +%} + +%include "libcclvalue.i" +%include "std_string.i" + +%feature("notabstract") Wccl::Match; + +namespace Wccl { + class Match : public Value { + public: + const char* get_type_name() const { return type_name; } + static std::string var_repr(const std::string &var_name); + std::string make_var_repr(const std::string &var_name) const { + return var_repr(var_name); + } + + Match(); + + // TODO + // virtual Position first_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const; + // virtual Position last_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const; + + std::string to_raw_string() const; + }; +} + +using namespace std; +using namespace Wccl; + +#endif /* SWIG_LIBWCCL_MATCH_I */ -- GitLab