Skip to content
Snippets Groups Projects
Commit 44d47e45 authored by Adam Radziszewski's avatar Adam Radziszewski
Browse files

Lift const from Sentence::id_ and add id setter + swig wrapper for it.

parent 86e57766
No related merge requests found
PROJECT(Corpus2Library)
set(corpus2_ver_major "1")
set(corpus2_ver_minor "3")
set(corpus2_ver_patch "4")
set(corpus2_ver_minor "4")
set(corpus2_ver_patch "0")
cmake_minimum_required(VERSION 2.8.0)
......
......@@ -118,12 +118,17 @@ public:
return id_;
}
/// Identifier setter
void set_id(const std::string &id) {
id_ = id;
}
protected:
/// The tokens this sentence contains and owns
std::vector<Token*> tokens_;
/// The sentence identifer - default is empty
const std::string id_;
std::string id_;
};
} /* end ns Corpus2 */
......
......@@ -48,6 +48,8 @@ namespace Corpus2 {
const std::string id() const;
void set_id(const std::string &id);
%extend {
static boost::shared_ptr<Corpus2::Sentence> create_sent(const std::string &id) {
return boost::shared_ptr<Corpus2::Sentence>(new Corpus2::Sentence(id));
......
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