Skip to content
Snippets Groups Projects
Commit fe8dde34 authored by lburdka's avatar lburdka
Browse files

Changed name of Relation method rel_pt() to clone_shared()

parent 924f54e5
No related merge requests found
...@@ -36,16 +36,14 @@ namespace whole { ...@@ -36,16 +36,14 @@ namespace whole {
class RelationWriter { class RelationWriter {
public: public:
/** /**
* Reads a document with relations * Writes a document with relations
* @param rela_path path to file with relations * @param rela_path path to file with relations
*/ */
RelationWriter(const std::string &rela_path); RelationWriter(const std::string &rela_path);
/** /**
* Lazy relations accessor. * Writes given vector of Relations to the file specified before
* If relations are not readed then read relations and returns list of them.
* @return List of readed relations
*/ */
void write(const std::vector< boost::shared_ptr<Relation> >& relations); void write(const std::vector< boost::shared_ptr<Relation> >& relations);
......
...@@ -28,7 +28,7 @@ Relation::Relation(const std::string& name, ...@@ -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_)); relation_=boost::shared_ptr<Relation>(new Relation(name_,from_,to_));
return relation_; return relation_;
} }
......
...@@ -118,7 +118,8 @@ public: ...@@ -118,7 +118,8 @@ public:
return name_; return name_;
} }
boost::shared_ptr<Relation> rel_pt(); ///Shared pointer to copy of the relation
boost::shared_ptr<Relation> clone_shared();
private: private:
/// Direction name /// Direction name
......
...@@ -44,7 +44,7 @@ namespace whole { ...@@ -44,7 +44,7 @@ namespace whole {
void set_to(const DirectionPoint& dp); void set_to(const DirectionPoint& dp);
void set_name(const std::string& s); 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 */ /* It must be renamed because "from" is python keyword */
%rename(rel_from) from() const; %rename(rel_from) from() const;
const boost::shared_ptr<const DirectionPoint>& from() const; const boost::shared_ptr<const DirectionPoint>& from() const;
......
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