Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68507 - in sandbox/assign_v2/boost/assign/v2/put: . container container/csv container/functor
From: erwann.rogard_at_[hidden]
Date: 2011-01-27 18:43:27


Author: e_r
Date: 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
New Revision: 68507
URL: http://svn.boost.org/trac/boost/changeset/68507

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/put/container/
   sandbox/assign_v2/boost/assign/v2/put/container/csv/
   sandbox/assign_v2/boost/assign/v2/put/container/csv.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/container/csv/adapter.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/container/csv/make.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/container/functor/
   sandbox/assign_v2/boost/assign/v2/put/container/functor.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/container/functor/adapter.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/container/functor/fwd.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/container/functor/make.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/container/functor/modulo.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/container/range.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/deduce.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/frame.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/modulo.hpp (contents, props changed)

Added: sandbox/assign_v2/boost/assign/v2/put/container/csv.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/csv.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,16 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_CONTAINER_CSV_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_CSV_ER_2010_HPP
+
+#include <boost/assign/v2/put/container/csv/adapter.hpp>
+#include <boost/assign/v2/put/container/csv/make.hpp>
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/container/csv/adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/csv/adapter.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,100 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_CONTAINER_CSV_ADAPTER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_CSV_ADAPTER_ER_2010_HPP
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+#include <boost/assign/v2/detail/traits/container/value.hpp>
+#include <boost/assign/v2/put/container/functor/make.hpp>
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <utility>
+#else
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/assign/v2/detail/config/limit_arity.hpp>
+#endif
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace csv_put_aux{
+
+ template<typename C>
+ class adapter
+ : protected ref::copy_wrapper<C>::type
+ {
+
+ protected:
+
+ typedef typename ref::copy_wrapper<C>::type super1_t;
+
+ typedef typename v2::container_traits::value<C>::type value_type;
+
+ public:
+
+ adapter(){} // TODO remove?
+ explicit adapter( C& v ) : super1_t( v ) {}
+
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+ protected:
+ template<typename R>
+ void impl(R& r){}
+
+ template<typename R,typename... Args>
+ void impl(R& r, value_type const& t, Args&&...args)
+ {
+ r( t );
+ this->impl( r, std::forward<Args>( args )... );
+ }
+
+ public:
+ template<typename... Args>
+ typename result_of::put<C>::type
+ operator()(Args&&...args)
+ {
+ typedef typename result_of::put<C>::type result_;
+ result_ result = put( this->get() );
+ this->impl(
+ result,
+ args...
+ );
+ return result;
+ }
+
+#else
+#define MACRO1(z, i, data) ( BOOST_PP_CAT(_, i) )
+#define MACRO2(z, N, data)\
+ typename result_of::put<C>::type\
+ operator()( BOOST_PP_ENUM_PARAMS(N, value_type const & _) )\
+ {\
+ return put( this->get() ) BOOST_PP_REPEAT(N, MACRO1, ~ );\
+ }\
+/**/
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
+ MACRO2,
+ ~
+)
+#undef MACRO1
+#undef MACRO2
+#endif
+ C& container()const{
+ return static_cast<super1_t const&>(*this).get();
+ }
+
+ };
+
+}// csv_put_aux
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/container/csv/make.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/csv/make.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,49 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_CONTAINER_CSV_MAKE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_CSV_MAKE_ER_2010_HPP
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+#include <boost/assign/v2/detail/traits/container/value.hpp>
+#include <boost/assign/v2/put/container/functor/make.hpp>
+#include <boost/assign/v2/put/container/csv/adapter.hpp>
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <utility>
+#else
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/assign/v2/detail/config/limit_arity.hpp>
+#endif
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace result_of{
+
+ template<typename C>
+ struct csv_put
+ {
+ typedef csv_put_aux::adapter<C> type;
+ };
+
+}// result_of
+
+ template<typename C>
+ typename result_of::csv_put<C>::type
+ csv_put( C& cont )
+ {
+ typedef typename result_of::csv_put<C>::type result_;
+ return result_( cont );
+ }
+
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/container/functor.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/functor.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,17 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_ER_2010_HPP
+
+#include <boost/assign/v2/put/container/functor/adapter.hpp>
+#include <boost/assign/v2/put/container/functor/modulo.hpp>
+#include <boost/assign/v2/put/container/functor/make.hpp>
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/container/functor/adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/functor/adapter.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,68 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_ADAPTER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_ADAPTER_ER_2010_HPP
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+#include <boost/assign/v2/put/frame/crtp.hpp>
+#include <boost/assign/v2/put/frame/modifier.hpp>
+#include <boost/assign/v2/put/container/functor/fwd.hpp> // consistency
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_aux{
+
+ template<typename C,typename F, typename Tag>
+ class adapter
+ : protected ref::wrapper< ref::assign_tag::copy, C >
+ , public put_aux::crtp< C, F, Tag, adapter<C, F, Tag> >
+ {
+ typedef put_aux::crtp< C, F, Tag, adapter > super2_t;
+
+ public:
+
+ typedef typename super2_t::result_type result_type;
+
+ protected:
+
+ typedef put_aux::modifier<Tag> modifier_;
+ typedef ref::assign_tag::copy assign_tag_;
+ typedef ref::wrapper<assign_tag_,C> super1_t;
+
+ public:
+
+ adapter(){}
+ explicit adapter( C& v ) : super1_t( v ) {}
+ explicit adapter( C& v, F const& f )
+ : super1_t( v ), super2_t( f )
+ {
+ // This constructor is required by crtp
+ // when Tag or F is modified.
+ }
+
+ explicit adapter( C& v, F const& f, modifier_ const& m )
+ : super1_t( v ), super2_t( f, m )
+ {
+ // This constructor is required by crtp
+ // when Tag or F is modified.
+ }
+
+ C& container()const{
+ return static_cast<super1_t const&>(*this).get();
+ }
+
+ };
+
+}// put_aux
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/container/functor/fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/functor/fwd.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_FWD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_FWD_ER_2010_HPP
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_aux{
+
+ template<typename C,typename F, typename Tag> class adapter;
+
+}// put_aux
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/container/functor/make.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/functor/make.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,44 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_MAKE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_MAKE_ER_2010_HPP
+#include <boost/assign/v2/put/deduce/traits.hpp>
+#include <boost/assign/v2/put/deduce/dependee.hpp>
+#include <boost/assign/v2/put/container/functor/adapter.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace result_of{
+
+ template<typename C>
+ struct put
+ {
+ typedef v2::put_traits<C> traits_;
+ typedef typename traits_::functor_type f_;
+ typedef typename traits_::modifier_tag modifier_tag_;
+ typedef put_aux::adapter<C, f_, modifier_tag_> type;
+ };
+
+}// result_of
+
+ template<typename C>
+ typename result_of::put<C>::type
+ put( C& v )
+ {
+ typedef typename result_of::put<C>::type result_;
+ return result_( v );
+ }
+
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/container/functor/modulo.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/functor/modulo.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,42 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_MODULO_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_MODULO_ER_2010_HPP
+#include <boost/assign/v2/put/modulo/fun.hpp>
+#include <boost/assign/v2/put/modulo/modifier.hpp>
+#include <boost/assign/v2/put/container/functor/fwd.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace result_of_modulo{
+
+ template<typename C,typename F, typename Tag>
+ struct fun< put_aux::adapter<C, F, Tag> >
+ {
+ template<typename F1>
+ struct apply{ typedef put_aux::adapter<C, F1, Tag> type; };
+ };
+
+ template<typename C, typename F, typename Tag>
+ struct modifier< put_aux::adapter<C, F, Tag> >
+ {
+ template<typename NewTag>
+ struct apply{ typedef put_aux::adapter<C, F, NewTag> type; };
+ };
+
+}// result_of_modulo
+}// v2
+}// assign
+}// boost
+
+#endif
+
+

Added: sandbox/assign_v2/boost/assign/v2/put/container/range.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/range.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,36 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_RANGE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_RANGE_ER_2010_HPP
+#include <boost/range/algorithm/for_each.hpp>
+#include <boost/assign/v2/put/container/functor.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+
+ template<typename C, typename R>
+ C& put_range(C& cont, R const& r)
+ {
+ return ::boost::for_each( r, put( cont ) ).container();
+ }
+
+ template<typename C, typename R>
+ C put_range( R const& r )
+ {
+ C cont;
+ return put_range( cont, r );
+ }
+
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/deduce.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/deduce.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,20 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_DEDUCE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_DEDUCE_ER_2010_HPP
+
+#include <boost/assign/v2/put/deduce/dependee.hpp>
+#include <boost/assign/v2/put/deduce/fwd.hpp>
+#include <boost/assign/v2/put/deduce/modifier.hpp>
+#include <boost/assign/v2/put/deduce/modulo.hpp>
+#include <boost/assign/v2/put/deduce/traits.hpp>
+
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/frame.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/frame.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,18 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_FRAME_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_FRAME_ER_2010_HPP
+
+#include <boost/assign/v2/put/frame/base.hpp>
+#include <boost/assign/v2/put/frame/crtp.hpp>
+#include <boost/assign/v2/put/frame/modifier.hpp>
+#include <boost/assign/v2/put/frame/sub.hpp>
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/modulo.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/modulo.hpp 2011-01-27 18:43:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,18 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_PUT_MODULO_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_MODULO_ER_2010_HPP
+
+#include <boost/assign/v2/put/modulo/fun.hpp>
+#include <boost/assign/v2/put/modulo/fun_modifier.hpp>
+#include <boost/assign/v2/put/modulo/generic.hpp>
+#include <boost/assign/v2/put/modulo/modifier.hpp>
+
+#endif


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