Skip to content
Snippets Groups Projects
Commit 6449be33 authored by ilor's avatar ilor
Browse files

turn on autodoc for some TokenWriter swig wrapper functions and add shared_ptr...

turn on autodoc for some TokenWriter swig wrapper functions and add shared_ptr overloads for write_*
parent c1e75995
Branches
No related merge requests found
...@@ -47,6 +47,7 @@ namespace Corpus2 { ...@@ -47,6 +47,7 @@ namespace Corpus2 {
return NULL; return NULL;
} }
} }
%feature("autodoc", "1");
static TokenWriterPtr create_stream_writer( static TokenWriterPtr create_stream_writer(
const std::string& class_id_params, const std::string& class_id_params,
std::ostream& os, const Tagset& std::ostream& os, const Tagset&
...@@ -60,12 +61,27 @@ namespace Corpus2 { ...@@ -60,12 +61,27 @@ namespace Corpus2 {
return NULL; return NULL;
} }
} }
%feature("autodoc", "1");
static TokenWriterPtr create_path_writer( static TokenWriterPtr create_path_writer(
const std::string& class_id_params, const std::string& class_id_params,
const std::string& path, const std::string& path,
const Tagset& tagset); const Tagset& tagset);
}; };
%extend TokenWriter {
void write_token(boost::shared_ptr<Corpus2::Token> t) {
self->write_token(*t);
}
void write_sentence(boost::shared_ptr<Corpus2::Sentence> s) {
self->write_sentence(*s);
}
void write_chunk(boost::shared_ptr<Corpus2::Chunk> c) {
self->write_chunk(*c);
}
} }
}
using namespace std; using namespace std;
using namespace Corpus2; using namespace Corpus2;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment