|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83175 - sandbox/icl/libs/xplore/value_sem/TreeSync1/TreeSync1
From: afojgo_at_[hidden]
Date: 2013-02-27 01:47:03
Author: jofaber
Date: 2013-02-27 01:47:02 EST (Wed, 27 Feb 2013)
New Revision: 83175
URL: http://svn.boost.org/trac/boost/changeset/83175
Log:
Minor changes for testing.
Text files modified:
sandbox/icl/libs/xplore/value_sem/TreeSync1/TreeSync1/Tree.h | 10 +++++++---
sandbox/icl/libs/xplore/value_sem/TreeSync1/TreeSync1/TreeSync1.cpp | 24 +++++++++++++++---------
2 files changed, 22 insertions(+), 12 deletions(-)
Modified: sandbox/icl/libs/xplore/value_sem/TreeSync1/TreeSync1/Tree.h
==============================================================================
--- sandbox/icl/libs/xplore/value_sem/TreeSync1/TreeSync1/Tree.h (original)
+++ sandbox/icl/libs/xplore/value_sem/TreeSync1/TreeSync1/Tree.h 2013-02-27 01:47:02 EST (Wed, 27 Feb 2013)
@@ -53,7 +53,9 @@
struct Merger
{
Mergable operator()(Mergable const& lhs, Mergable const& rhs)
- { return merge(lhs, rhs); }
+ {
+ return merge(lhs, rhs);
+ }
};
@@ -80,7 +82,7 @@
typedef typename tVector::iterator iterator;
typedef typename tVector::const_iterator const_iterator;
- Vec(): m_uuid(), m_time(), m_name(), m_vector() {}
+ Vec(): m_uuid(), m_time(), m_name("empty"), m_vector() {}
Vec(Uuid const& uuid, Time const& time, std::string const& name)
: m_uuid(uuid), m_time(time), m_name(name), m_vector() {}
@@ -225,7 +227,9 @@
struct LessForUuid : std::binary_function<Syncable const&, Syncable const&, bool>
{
bool operator()(Syncable const& lhs, Syncable const& rhs)
- { return less_for_uuid(lhs, rhs); }
+ {
+ return less_for_uuid(lhs, rhs);
+ }
};
Modified: sandbox/icl/libs/xplore/value_sem/TreeSync1/TreeSync1/TreeSync1.cpp
==============================================================================
--- sandbox/icl/libs/xplore/value_sem/TreeSync1/TreeSync1/TreeSync1.cpp (original)
+++ sandbox/icl/libs/xplore/value_sem/TreeSync1/TreeSync1/TreeSync1.cpp 2013-02-27 01:47:02 EST (Wed, 27 Feb 2013)
@@ -67,21 +67,21 @@
//--- Playlist --------------------
Playlist pl1(3, 2, " pl_1 ");
pl1.push_back(Playable<int>(11));
- pl1.push_back(Playable<int>(10));
+ //pl1.push_back(Playable<int>(10));
Playlist pl2(2, 5, " pl_2 ");
pl2.push_back(Playable<int>(21));
pl2.push_back(Playable<int>(20));
Playlist pl3(1, 3, " pl_3 ");
- pl2.push_back(Playable<int>(31));
+ pl3.push_back(Playable<int>(31));
//--- Playlists -------------------
Playlists pls1(4, 0, " pls_1 ");
pls1.push_back(pl1);
- pls1.push_back(pl2);
- pls1.push_back(pl3);
+ //pls1.push_back(pl2);
+ //pls1.push_back(pl3);
Playlists pls2(5, 0, " pls_2 ");
pls2.push_back(pl2);
@@ -89,20 +89,26 @@
//--- Nodes -----------------------
Node<Playlist> node1(6, " node_1 ", pls1);
- NodeList nodes1(7, 2, " nodes_1 ");
- nodes1.push_back(node1);
+ NodeList nodes1(7, 2, " nodes_1 ");
+ nodes1.push_back(node1);
Node<Playlist> node2(8, " node_2 ", pls2, nodes1);
//=================================
- draw(node2, std::cout, 0);
+ draw(node1, std::cout, 0);
std::cout << "========================================\n";
//Node<Playlist> merged = merge(node1, node2);
//draw(merged, std::cout, 0);
- sort(node2);
- draw(node2, std::cout, 0);
+ sort(node1);
+ draw(node1, std::cout, 0);
+
+ Node<Playlist> node3 = node1;
+ Node<Playlist> merged = merge(node3, node2);
+
+ std::cout << "========================================\n";
+ draw(node3, std::cout, 0);
return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk