From fe8dde340a49fa82a1ff55a9eeb632b153d4f2c7 Mon Sep 17 00:00:00 2001 From: lburdka <lburdka@glados.(none)> Date: Mon, 26 Nov 2012 13:45:37 +0100 Subject: [PATCH] Changed name of Relation method rel_pt() to clone_shared() --- libcorpus2_whole/io/relwriter.h | 6 ++---- libcorpus2_whole/relation.cpp | 2 +- libcorpus2_whole/relation.h | 3 ++- swig/relation.i | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/libcorpus2_whole/io/relwriter.h b/libcorpus2_whole/io/relwriter.h index 6f82115..c6c326c 100755 --- a/libcorpus2_whole/io/relwriter.h +++ b/libcorpus2_whole/io/relwriter.h @@ -36,16 +36,14 @@ namespace whole { class RelationWriter { public: /** - * Reads a document with relations + * Writes a document with relations * @param rela_path path to file with relations */ RelationWriter(const std::string &rela_path); /** - * Lazy relations accessor. - * If relations are not readed then read relations and returns list of them. - * @return List of readed relations + * Writes given vector of Relations to the file specified before */ void write(const std::vector< boost::shared_ptr<Relation> >& relations); diff --git a/libcorpus2_whole/relation.cpp b/libcorpus2_whole/relation.cpp index b67558f..36e41e1 100755 --- a/libcorpus2_whole/relation.cpp +++ b/libcorpus2_whole/relation.cpp @@ -28,7 +28,7 @@ Relation::Relation(const std::string& name, { } -boost::shared_ptr<Relation> Relation::rel_pt(){ +boost::shared_ptr<Relation> Relation::clone_shared(){ relation_=boost::shared_ptr<Relation>(new Relation(name_,from_,to_)); return relation_; } diff --git a/libcorpus2_whole/relation.h b/libcorpus2_whole/relation.h index f1c17b8..0895cd4 100755 --- a/libcorpus2_whole/relation.h +++ b/libcorpus2_whole/relation.h @@ -118,7 +118,8 @@ public: return name_; } - boost::shared_ptr<Relation> rel_pt(); + ///Shared pointer to copy of the relation + boost::shared_ptr<Relation> clone_shared(); private: /// Direction name diff --git a/swig/relation.i b/swig/relation.i index ad4b110..79b572f 100755 --- a/swig/relation.i +++ b/swig/relation.i @@ -44,7 +44,7 @@ namespace whole { void set_to(const DirectionPoint& dp); void set_name(const std::string& s); - boost::shared_ptr<Relation> rel_pt(); + boost::shared_ptr<Relation> clone_shared(); /* It must be renamed because "from" is python keyword */ %rename(rel_from) from() const; const boost::shared_ptr<const DirectionPoint>& from() const; -- GitLab