From e14015a313fd1baf8affffc1b21c56e7fef0ec35 Mon Sep 17 00:00:00 2001 From: ilor <kailoran@gmail.com> Date: Sun, 29 May 2011 20:23:30 +0200 Subject: [PATCH] add ParsedExpression swig wrappers for shredptr variants of set_XXX (issue #1594) --- swig/parsedexpression.i | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/swig/parsedexpression.i b/swig/parsedexpression.i index a77f1f3..fdaa42c 100644 --- a/swig/parsedexpression.i +++ b/swig/parsedexpression.i @@ -66,8 +66,25 @@ namespace Wccl { explicit ParsedExpression(const Variables& variables); virtual ParsedExpression* clone_internal() const = 0; }; -} +%extend ParsedExpression { + void set_bool(const std::string& name, const boost::shared_ptr<const Wccl::Bool>& b) { + self->set<Wccl::Bool>(name, *b); + } + void set_tset(const std::string& name, const boost::shared_ptr<const Wccl::TSet>& b) { + self->set<Wccl::TSet>(name, *b); + } + void set_strset(const std::string& name, const boost::shared_ptr<const Wccl::StrSet>& b) { + self->set<Wccl::StrSet>(name, *b); + } + void set_position(const std::string& name, const boost::shared_ptr<const Wccl::Position>& b) { + self->set<Wccl::Position>(name, *b); + } + void set_match(const std::string& name, const boost::shared_ptr<const Wccl::Match>& b) { + self->set<Wccl::Match>(name, *b); + } +} +} using namespace std; using namespace Wccl; -- GitLab