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

(swig) Updated wrapper for Wccl::MatchData

parent b30acda4
No related branches found
No related tags found
No related merge requests found
...@@ -6,26 +6,30 @@ ...@@ -6,26 +6,30 @@
#include <libwccl/values/matchdata.h> #include <libwccl/values/matchdata.h>
%} %}
%include "boost_shared_ptr.i"
%include "libcclmatch.i" %include "libcclmatch.i"
%include "libcclposition.i"
%include "libcorpus/libcorpusannotatedsentence.i" %include "libcorpus/libcorpusannotatedsentence.i"
%include "std_string.i"
%include "boost_shared_ptr.i"
%nodefaultctor Wccl::MatchData;
%template(MatchDataPtr) boost::shared_ptr<Wccl::MatchData>; %template(MatchDataPtr) boost::shared_ptr<Wccl::MatchData>;
namespace Wccl { namespace Wccl {
class MatchData { class MatchData {
public: public:
~MatchData(); virtual bool empty() const = 0;
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
virtual bool empty() const = 0; virtual int first_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const = 0;
virtual Position first_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const = 0; virtual int last_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const = 0;
virtual Position 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); virtual const boost::shared_ptr<Match>& submatch(size_t);
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
...@@ -35,6 +39,10 @@ namespace Wccl { ...@@ -35,6 +39,10 @@ namespace Wccl {
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
virtual std::string to_raw_string() const = 0; virtual std::string to_raw_string() const = 0;
/* --------------------------------------------------------------------- */
virtual ~MatchData() {}
}; };
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment