Newer
Older
#ifndef SWIG_LIBWCCL_MATCHRULESEQUENCE_I
#define SWIG_LIBWCCL_MATCHRULESEQUENCE_I
%module libcclmatchrulesequence
%{
#include <libwccl/ops/matchrulesequence.h>
%}
%include "matchrule.i"
%include "expression.i"
%include "libcorpus2/annotatedsentence.i"
%include "std_string.i"
%include "std_vector.i"
%include <libcorpus2/boost_shared_ptr.i>
ilor
committed
%template(MatchRuleVector) std::vector<Wccl::Matching::MatchRule>;
%template(MatchRulePtr) boost::shared_ptr<Wccl::Matching::MatchRule>;
%template(ConstMatchRuleSequencePtr) boost::shared_ptr<const Wccl::Matching::MatchRuleSequence>;
%template(MatchRuleSequencePtr) boost::shared_ptr<Wccl::Matching::MatchRuleSequence>;
%template(ConstMatchRulePtr) boost::shared_ptr<const Wccl::Matching::MatchRule>;
ilor
committed
namespace Matching {
class MatchRuleSequence : public std::vector<MatchRule>, public Expression {
public:
MatchRuleSequence();
MatchRuleSequence(const std::vector<MatchRule>& rules);
/* --------------------------------------------------------------------- */
%rename(OpFunMatchRuleSequence) operator()(const shared_ptr<Corpus2::AnnotatedSentence>& sentence);
void operator()(const shared_ptr<Corpus2::AnnotatedSentence>& sentence);
/* --------------------------------------------------------------------- */
void apply_all(const shared_ptr<Corpus2::AnnotatedSentence>& sentence);
/* --------------------------------------------------------------------- */
std::string to_string(const Corpus2::Tagset& tagset) const;
};
}
ilor
committed
}
using namespace boost;
using namespace Wccl;
using namespace std;
ilor
committed
using namespace Wccl::Matching;
#endif /* SWIG_LIBWCCL_MATCHRULESEQUENCE_I */