diff --git a/libcorpus2_whole/io/relwriter.h b/libcorpus2_whole/io/relwriter.h index 6f821154deb24b3e4e8c450c9800d27b6f4b8ac5..c6c326ca12f1bc49411426b5681680c29335121c 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 b67558f63d8883e0c2ae9a8db71446422f4806c5..36e41e15046ca7e5e3b43257a83132a749d577a2 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 f1c17b87fbe17e817fd43182403fe0e43d48913d..0895cd4abf1f006f9e871e47bc8f0ae4b3973248 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 ad4b110986904eadc5124beea79ea43882a543f7..79b572f863134cabc3718228718abd795809b0cf 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;