From 5a3c92cf5d191d835a72f4726a6792e43340338d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20K=C4=99dzia?= <Pawel.Kedzia@pwr.wroc.pl>
Date: Thu, 17 Nov 2011 12:25:07 +0100
Subject: [PATCH] Swig templates handling...

---
 swig/chunk.i    | 4 +++-
 swig/relation.i | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/swig/chunk.i b/swig/chunk.i
index 08412c3..b0af757 100644
--- a/swig/chunk.i
+++ b/swig/chunk.i
@@ -19,6 +19,9 @@
 %include "sentence.i"
 
 %template(ChunkPtr) boost::shared_ptr<Corpus2::Chunk>;
+%template(ConstChunkPtr) boost::shared_ptr<const Corpus2::Chunk>;
+%template(ChunkPtrVector) std::vector< boost::shared_ptr<Corpus2::Chunk> >;
+
 %template(SentencePtrVector) std::vector<boost::shared_ptr<Sentence> >;
 // %template(attr_map_t) std::map<std::string, std::string>;
 
@@ -48,7 +51,6 @@ namespace Corpus2 {
   };
 }
 
-%template(ChunkPtrVector) std::vector<boost::shared_ptr<Chunk> >;
 using namespace std;
 using namespace Corpus2;
 
diff --git a/swig/relation.i b/swig/relation.i
index d273e72..64084f2 100644
--- a/swig/relation.i
+++ b/swig/relation.i
@@ -13,8 +13,10 @@
 // %feature("notabstract") Corpus2::TokenMetaData;
 %template(DirectionPointPtr) boost::shared_ptr<Corpus2::DirectionPoint>;
 %template(ConstDirectionPointPtr) boost::shared_ptr<const Corpus2::DirectionPoint>;
+
 %template(RelationPtr) boost::shared_ptr<Corpus2::Relation>;
 %template(ConstRelationPtr) boost::shared_ptr<const Corpus2::Relation>;
+%template(RelationPtrVector) std::vector< boost::shared_ptr<Corpus2::Relation> >;
 
 namespace Corpus2 {
   class DirectionPoint {
-- 
GitLab