From 5025dbf398e1a7d33fe6e723995acfec8b3a046b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=99dzia?= <Pawel.Kedzia@pwr.wroc.pl> Date: Thu, 29 Dec 2011 12:20:46 +0100 Subject: [PATCH] Swig updated about namespace Corpus2::whole --- swig/document.i | 9 ++++++--- swig/documentreader.i | 7 +++++-- swig/relation.i | 15 +++++++++------ swig/relationreader.i | 5 ++++- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/swig/document.i b/swig/document.i index 5d62a33..3abe1e0 100644 --- a/swig/document.i +++ b/swig/document.i @@ -10,10 +10,11 @@ %include "chunk.i" %include "relation.i" -%template(DocumentPtr) boost::shared_ptr<Corpus2::Document>; -%template(ConstDocumentPtr) boost::shared_ptr<const Corpus2::Document>; +%template(DocumentPtr) boost::shared_ptr<Corpus2::whole::Document>; +%template(ConstDocumentPtr) boost::shared_ptr<const Corpus2::whole::Document>; namespace Corpus2 { +namespace whole { class Document { public: Document(); @@ -25,9 +26,11 @@ namespace Corpus2 { const std::vector< boost::shared_ptr<Chunk> >& paragraphs() const; const std::vector< boost::shared_ptr<Relation> >& relations() const; }; -} +} // whole ns +} // Corpus2 ns using namespace std; using namespace Corpus2; +using namespace Corpus2::whole; #endif /* SWIG_LIBCORPUS2_DOCUMENT_I */ diff --git a/swig/documentreader.i b/swig/documentreader.i index efdbf0c..2d1258b 100644 --- a/swig/documentreader.i +++ b/swig/documentreader.i @@ -3,7 +3,7 @@ %module libcorpusdocumentreader %{ - #include <libcorpus2_whole/io/docreader.h> + #include <libcorpus2_whole/io/documentreader.h> %} %include "exception.i" @@ -11,6 +11,7 @@ %include "boost_shared_ptr.i" namespace Corpus2 { +namespace whole { class DocumentReader { public: %exception { @@ -39,9 +40,11 @@ namespace Corpus2 { /* --------------------------------------------------------------------- */ ~DocumentReader(); }; -} +} // whole ns +} // Corpus2 ns using namespace std; using namespace Corpus2; +using namespace Corpus2::whole; #endif /* SWIG_LIBCORPUS2_DOCUMENTREADER_I */ diff --git a/swig/relation.i b/swig/relation.i index 7ebe41a..507e77e 100644 --- a/swig/relation.i +++ b/swig/relation.i @@ -10,14 +10,15 @@ %include "std_string.i" %include "boost_shared_ptr.i" -%template(DirectionPointPtr) boost::shared_ptr<Corpus2::DirectionPoint>; -%template(ConstDirectionPointPtr) boost::shared_ptr<const Corpus2::DirectionPoint>; +%template(DirectionPointPtr) boost::shared_ptr<Corpus2::whole::DirectionPoint>; +%template(ConstDirectionPointPtr) boost::shared_ptr<const Corpus2::whole::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> >; +%template(RelationPtr) boost::shared_ptr<Corpus2::whole::Relation>; +%template(ConstRelationPtr) boost::shared_ptr<const Corpus2::whole::Relation>; +%template(RelationPtrVector) std::vector< boost::shared_ptr<Corpus2::whole::Relation> >; namespace Corpus2 { +namespace whole { class DirectionPoint { public: DirectionPoint(const std::string, const std::string, const int); @@ -50,9 +51,11 @@ namespace Corpus2 { %rename(rel_name) name() const; const std::string name() const; }; -} +} // whole ns +} // Corpus2 ns using namespace std; using namespace Corpus2; +using namespace Corpus2::whole; #endif /* SWIG_LIBCORPUS2_RELATION_I */ diff --git a/swig/relationreader.i b/swig/relationreader.i index bcf567a..b763980 100644 --- a/swig/relationreader.i +++ b/swig/relationreader.i @@ -7,14 +7,17 @@ %} namespace Corpus2 { +namespace whole { class RelationReader { public: RelationReader(const std::string &rela_path); const std::vector< boost::shared_ptr<Relation> >& relations(); }; -} +} // whole ns +} // Corpus2 ns using namespace std; using namespace Corpus2; +using namespace Corpus2::whole; #endif /* SWIG_LIBCORPUS2_RELATIONREADER_I */ -- GitLab