From f32600df94cbd3c4fe01ec00f02e464b72a7065d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20K=C4=99dzia?= <Pawel.Kedzia@pwr.wroc.pl>
Date: Fri, 6 May 2011 12:27:50 +0200
Subject: [PATCH] (swig) Wccl::ParsedExpression fixed

---
 swig/libcclparsedexpression.i | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/swig/libcclparsedexpression.i b/swig/libcclparsedexpression.i
index 12e3cfb..f6a4e87 100644
--- a/swig/libcclparsedexpression.i
+++ b/swig/libcclparsedexpression.i
@@ -18,13 +18,15 @@
 %include "std_string.i"
 %include "boost_shared_ptr.i"
 
-%rename(__op_get__) Wccl::ParsedExpression::operator[](const std::string& var_name) const;
+%template (ParsedExpressionPtr) boost::shared_ptr<Wccl::ParsedExpression>;
 
 namespace Wccl {
   class ParsedExpression : public Expression {
   public:
+    %rename(Getvalue) operator[](const std::string& var_name) const;
     const Value& operator[](const std::string& var_name) const;
-    
+
+    /* --------------------------------------------------------------------- */    
     template<class T> T& get(const std::string& var_name);
     %template(get_bool) get<Bool>;
     %template(get_tset) get<TSet>;
@@ -32,6 +34,7 @@ namespace Wccl {
     %template(get_position) get<Position>;
     %template(get_match) get<Match>;
     
+    /* --------------------------------------------------------------------- */    
     template<class T> void set(const std::string& var_name, const T& value);
     %template(set_bool) set<Bool>;
     %template(set_tset) set<TSet>;
@@ -39,9 +42,14 @@ namespace Wccl {
     %template(set_position) set<Position>;
     %template(set_match) set<Match>;
 
+    /* --------------------------------------------------------------------- */    
     void clean();
+
+    /* --------------------------------------------------------------------- */    
     boost::shared_ptr<ParsedExpression> clone_ptr() const;
     boost::shared_ptr<ParsedExpression> clone_clean_ptr() const;
+
+    /* --------------------------------------------------------------------- */    
     std::string variables_string(const Corpus2::Tagset& tagset) const;
     std::ostream& dump_variables(std::ostream& ostream, const Corpus2::Tagset& tagset) const;
 
-- 
GitLab