$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r53889 - in sandbox/monotonic: boost/monotonic libs/monotonic/test
From: christian.schladetsch_at_[hidden]
Date: 2009-06-13 23:04:48
Author: cschladetsch
Date: 2009-06-13 23:04:47 EDT (Sat, 13 Jun 2009)
New Revision: 53889
URL: http://svn.boost.org/trac/boost/changeset/53889
Log:
removed redundant ctors taking a storage argument.
added skeleton for montonic::rope<T>
Added:
   sandbox/monotonic/boost/monotonic/rope.h   (contents, props changed)
Text files modified: 
   sandbox/monotonic/boost/monotonic/list.h               |     5 -----                                   
   sandbox/monotonic/boost/monotonic/map.h                |    12 ++----------                            
   sandbox/monotonic/boost/monotonic/set.h                |    10 +---------                              
   sandbox/monotonic/boost/monotonic/vector.h             |     7 -------                                 
   sandbox/monotonic/libs/monotonic/test/monotonic.vcproj |     4 ++++                                    
   5 files changed, 7 insertions(+), 31 deletions(-)
Modified: sandbox/monotonic/boost/monotonic/list.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/list.h	(original)
+++ sandbox/monotonic/boost/monotonic/list.h	2009-06-13 23:04:47 EDT (Sat, 13 Jun 2009)
@@ -20,14 +20,9 @@
                         typedef std::list<T, Allocator> List;
 
                         list() { }
-			list(storage_base &storage) 
-				: List(Allocator(storage)) { }
                         list(Allocator const &A) 
                                 : List(A) { }
                         template <class II>
-			list(II F, II L, storage_base &S)
-				: List(F,L,Allocator(S)) { }
-			template <class II>
                         list(II F, II L, Allocator const &A)
                                 : List(F,L,A) { }
                 };
Modified: sandbox/monotonic/boost/monotonic/map.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/map.h	(original)
+++ sandbox/monotonic/boost/monotonic/map.h	2009-06-13 23:04:47 EDT (Sat, 13 Jun 2009)
@@ -21,21 +21,13 @@
                         typedef P Predicate;
 
                         map() { }
-			map(storage_base &S)
-				: Map(Predicate(), Allocator(S)) { }
                         map(Allocator const &A)
                                 : Map(Predicate(), A) { }
                         map(Predicate Pr, Allocator const &A) 
                                 : Map(Pr, A) { }
                         template <class II>
-			map(II F, II L, storage_base &S)
-				: Map(F,L,Predicate(),Allocator(S)) { }
-			template <class II>
-			map(II F, II L, Allocator const &A)
-				: Map(F,L,A) { }
-			template <class II>
-			map(II F, II L, Predicate const &Pr, storage_base &S)
-				: Map(F,L,Pr,Allocator(S)) { }
+			map(II F, II L, Allocator const &A, Predicate const &Pr = Predicate())
+				: Map(F,L,Pr,A) { }
                         template <class II>
                         map(II F, II L, Predicate const &Pr, Allocator const &A)
                                 : Map(F,L,Pr,A) { }
Added: sandbox/monotonic/boost/monotonic/rope.h
==============================================================================
--- (empty file)
+++ sandbox/monotonic/boost/monotonic/rope.h	2009-06-13 23:04:47 EDT (Sat, 13 Jun 2009)
@@ -0,0 +1,57 @@
+// Copyright (C) 2009 Christian Schladetsch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
+//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#pragma once
+
+#include <boost/monotonic/allocator.h>
+#include <boost/monotonic/storage_base.h>
+
+namespace boost
+{
+	namespace monotonic
+	{
+		/// a set of sequences that are tied together to present a contiguous sequence
+		template <class T>
+		struct rope
+		{
+			typedef allocator<T> Allocator;
+			typedef vector<T> Vector;
+			typedef list<Vector> Strands;
+
+			struct const_iterator
+			{
+				rope<T> const *parent;
+				Strands::const_iterator strand;
+				Vector::const_iterator iter;
+
+				const_iterator() : parent(0) { }
+				const_iterator(rope<T> const *P) : parent(P) { }
+				const_iterator(rope<T> const *P, Strands::const_iterator const &S, Vector::const_iterator const &V) 
+					: parent(P), strand(S), iter(V) { }
+				//const_iterator operator++(int)
+			};
+
+		private:
+			Strands strands;
+			Allocator alloc;
+
+		public:
+			rope() { }
+			rope(Allocator const &A) 
+				: alloc(A) { }
+			rope(size_t N, T const &X, Allocator const &A)
+				: alloc(A)
+			{
+			}
+			template <class II>
+			rope(II F, II L, Allocator const &A)
+				: alloc(A)
+			{
+			}
+		};
+	}
+}
+
+//EOF
Modified: sandbox/monotonic/boost/monotonic/set.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/set.h	(original)
+++ sandbox/monotonic/boost/monotonic/set.h	2009-06-13 23:04:47 EDT (Sat, 13 Jun 2009)
@@ -21,21 +21,13 @@
                         typedef std::set<T,P,allocator<T> > Set;
 
                         set() { }
-			set(storage_base &S) 
-				: Set(Predicate(), Allocator(S)) { }
                         set(Allocator const &A) 
                                 : Set(Predicate(), A) { }	
                         set(Predicate Pr, Allocator const &A) 
                                 : Set(Pr, A) { }
                         template <class II>
-			set(II F, II L, storage_base &S)
-				: Set(F,L,Predicate(),Allocator(S)) { }
-			template <class II>
                         set(II F, II L, Allocator const &A)
-				: Set(F,L,A) { }
-			template <class II>
-			set(II F, II L, Predicate const &Pr, storage_base &S)
-				: Set(F,L,Pr,Allocator(S)) { }
+				: Set(F,L,Predicate(),A) { }
                         template <class II>
                         set(II F, II L, Predicate const &Pr, Allocator const &A)
                                 : Set(F,L,Pr,A) { }
Modified: sandbox/monotonic/boost/monotonic/vector.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/vector.h	(original)
+++ sandbox/monotonic/boost/monotonic/vector.h	2009-06-13 23:04:47 EDT (Sat, 13 Jun 2009)
@@ -21,18 +21,11 @@
                         typedef std::vector<T,Allocator> Vector;
 
                         vector() { }
-			vector(storage_base &storage) 
-				: Vector(Allocator(storage)) { }
                         vector(Allocator const &A) 
                                 : Vector(A) { }
-			vector(size_t N, T const &X, storage_base &S)
-				: Vector(N,X,Allocator(S)) { }
                         vector(size_t N, T const &X, Allocator const &A)
                                 : Vector(N,X,A) { }
                         template <class II>
-			vector(II F, II L, storage_base &S)
-				: Vector(F,L,Allocator(S)) { }
-			template <class II>
                         vector(II F, II L, Allocator const &A)
                                 : Vector(F,L,A) { }
                 };
Modified: sandbox/monotonic/libs/monotonic/test/monotonic.vcproj
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/monotonic.vcproj	(original)
+++ sandbox/monotonic/libs/monotonic/test/monotonic.vcproj	2009-06-13 23:04:47 EDT (Sat, 13 Jun 2009)
@@ -198,6 +198,10 @@
 					>
                                 </File>
                                 <File
+					RelativePath="..\..\..\boost\monotonic\rope.h"
+					>
+				</File>
+				<File
                                         RelativePath="..\..\..\boost\monotonic\set.h"
 					>
                                 </File>