From a72497c3a47d1eea0ce5768eacbe8420e9676c86 Mon Sep 17 00:00:00 2001 From: Adam Radziszewski <adam.radziszewski@pwr.wroc.pl> Date: Wed, 4 Jan 2012 10:23:57 +0100 Subject: [PATCH] cleanup swig for values --- swig/bool.i | 3 +++ swig/functionaloperator.i | 2 +- swig/match.i | 3 ++- swig/position.i | 3 +++ swig/strset.i | 3 +++ swig/tset.i | 3 +++ swig/value.i | 3 +++ swig/variables.i | 13 +------------ 8 files changed, 19 insertions(+), 14 deletions(-) diff --git a/swig/bool.i b/swig/bool.i index 7f4ff3a..9091fcd 100644 --- a/swig/bool.i +++ b/swig/bool.i @@ -12,6 +12,9 @@ %feature("notabstract") Wccl::Bool; +%template(BoolPtr) boost::shared_ptr<Wccl::Bool>; +%template(ConstBoolPtr) boost::shared_ptr<Wccl::Bool const>; + namespace Wccl { class Bool : public Value { public: diff --git a/swig/functionaloperator.i b/swig/functionaloperator.i index 9ae78cf..7058cc7 100644 --- a/swig/functionaloperator.i +++ b/swig/functionaloperator.i @@ -14,9 +14,9 @@ %include "std_string.i" %include <libcorpus2/boost_shared_ptr.i> -// %template(ValuePtr) boost::shared_ptr<Wccl::Value>; %template(FunctionalOperatorPtr) boost::shared_ptr<Wccl::FunctionalOperator>; + namespace Wccl { class FunctionalOperator : public ParsedExpression { public: diff --git a/swig/match.i b/swig/match.i index f296bb3..f492c02 100644 --- a/swig/match.i +++ b/swig/match.i @@ -18,7 +18,8 @@ %feature("notabstract") Wccl::Match; -// %template (MatchPtr) boost::shared_ptr<Wccl::Match>; +%template(MatchPtr) boost::shared_ptr<Wccl::Match>; +%template(ConstMatchPtr) boost::shared_ptr<Wccl::Match const>; namespace Wccl { class Match : public Value { diff --git a/swig/position.i b/swig/position.i index c5d1698..9379bc8 100644 --- a/swig/position.i +++ b/swig/position.i @@ -13,6 +13,9 @@ %feature("notabstract") Wccl::Position; +%template(PositionPtr) boost::shared_ptr<Wccl::Position>; +%template(ConstPositionPtr) boost::shared_ptr<Wccl::Position const>; + namespace Wccl { class Position : public Value { public: diff --git a/swig/strset.i b/swig/strset.i index b97243d..d494f4e 100644 --- a/swig/strset.i +++ b/swig/strset.i @@ -15,6 +15,9 @@ %feature("notabstract") Wccl::StrSet; +%template(StrSetPtr) boost::shared_ptr<Wccl::StrSet>; +%template(ConstStrSetPtr) boost::shared_ptr<Wccl::StrSet const>; + %template(UnicodeStringMap) std::set<UnicodeString>; namespace Wccl { diff --git a/swig/tset.i b/swig/tset.i index 54a7880..a8285f0 100644 --- a/swig/tset.i +++ b/swig/tset.i @@ -15,6 +15,9 @@ %feature("notabstract") Wccl::TSet; +%template(TSetPtr) boost::shared_ptr<Wccl::TSet>; +%template(ConstTSetPtr) boost::shared_ptr<Wccl::TSet const>; + namespace Wccl { class TSet : public Value { public: diff --git a/swig/value.i b/swig/value.i index 671c3c9..bc49be0 100644 --- a/swig/value.i +++ b/swig/value.i @@ -11,6 +11,9 @@ %nodefaultctor Wccl::Value; +%template(ValuePtr) boost::shared_ptr<Wccl::Value>; +%template(ConstValuePtr) boost::shared_ptr<Wccl::Value const>; + namespace Wccl { class Value { public: diff --git a/swig/variables.i b/swig/variables.i index 00eb421..6ad0e6e 100644 --- a/swig/variables.i +++ b/swig/variables.i @@ -16,19 +16,8 @@ %include "std_string.i" %include <libcorpus2/boost_shared_ptr.i> -%template(ValuePtr) boost::shared_ptr<Wccl::Value>; -%template(BoolPtr) boost::shared_ptr<Wccl::Bool>; -%template(PositionPtr) boost::shared_ptr<Wccl::Position>; -%template(StrSetPtr) boost::shared_ptr<Wccl::StrSet>; -%template(TSetPtr) boost::shared_ptr<Wccl::TSet>; -%template(MatchPtr) boost::shared_ptr<Wccl::Match>; + %template(VariablesPtr) boost::shared_ptr<Wccl::Variables>; -%template(ConstValuePtr) boost::shared_ptr<Wccl::Value const>; -%template(ConstBoolPtr) boost::shared_ptr<Wccl::Bool const>; -%template(ConstPositionPtr) boost::shared_ptr<Wccl::Position const>; -%template(ConstStrSetPtr) boost::shared_ptr<Wccl::StrSet const>; -%template(ConstTSetPtr) boost::shared_ptr<Wccl::TSet const>; -%template(ConstMatchPtr) boost::shared_ptr<Wccl::Match const>; %template(ConstVariablesPtr) boost::shared_ptr<Wccl::Variables const>; namespace Wccl { -- GitLab