From d47ae260d06ed26a8cfa701e7345369c89b7a5d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20K=C4=99dzia?= <Pawel.Kedzia@pwr.wroc.pl>
Date: Tue, 10 May 2011 10:07:41 +0200
Subject: [PATCH] (swig) Updated wrapper for Wccl::MatchData

---
 swig/libcclmatchdata.i | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/swig/libcclmatchdata.i b/swig/libcclmatchdata.i
index a39b2be..e250ff2 100644
--- a/swig/libcclmatchdata.i
+++ b/swig/libcclmatchdata.i
@@ -6,35 +6,43 @@
   #include <libwccl/values/matchdata.h>
 %}
 
-%include "boost_shared_ptr.i"
+
 %include "libcclmatch.i"
-%include "libcclposition.i"
 %include "libcorpus/libcorpusannotatedsentence.i"
 
+%include "std_string.i"
+%include "boost_shared_ptr.i"
+
+%nodefaultctor Wccl::MatchData;
+
 %template(MatchDataPtr) boost::shared_ptr<Wccl::MatchData>;
 
 namespace Wccl {
   class MatchData {
   public:
-    ~MatchData();
+    virtual bool empty() const = 0;
 
     /* --------------------------------------------------------------------- */
 
-    virtual bool empty() const = 0;
-    virtual Position first_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const = 0;
-    virtual Position last_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const = 0;
+    virtual int first_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const = 0;
+    virtual int last_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const = 0;
 
     /* --------------------------------------------------------------------- */
 
+    // virtual const boost::shared_ptr<const Match> submatch(size_t) const;
     virtual const boost::shared_ptr<Match>& submatch(size_t);
 
     /* --------------------------------------------------------------------- */
 
     boost::shared_ptr<MatchData> clone() const;
+    
+    /* --------------------------------------------------------------------- */
+    
+    virtual std::string to_raw_string() const = 0;
 
     /* --------------------------------------------------------------------- */
 
-    virtual std::string to_raw_string() const = 0;
+    virtual ~MatchData() {}
   };
 }
 
-- 
GitLab