|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67827 - in sandbox/statistics/support/boost/assign/v2/put/modifier: . ext std
From: erwann.rogard_at_[hidden]
Date: 2011-01-08 20:46:08
Author: e_r
Date: 2011-01-08 20:46:06 EST (Sat, 08 Jan 2011)
New Revision: 67827
URL: http://svn.boost.org/trac/boost/changeset/67827
Log:
upd boost/assign/v2/put
Added:
sandbox/statistics/support/boost/assign/v2/put/modifier/ext/iterate.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/modifier/ext/lookup.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/modifier/std/
sandbox/statistics/support/boost/assign/v2/put/modifier/std.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/modifier/std/insert.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/modifier/std/push.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/modifier/std/push_back.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/modifier/std/push_front.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/modifier/std/xxx.hpp (contents, props changed)
Added: sandbox/statistics/support/boost/assign/v2/put/modifier/ext/iterate.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/modifier/ext/iterate.hpp 2011-01-08 20:46:06 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,120 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_MODIFIER_EXT_ITERATE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_MODIFIER_EXT_ITERATE_ER_2010_HPP
+#include <cstddef>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/assign/v2/detail/pp/forward.hpp>
+#include <boost/assign/v2/detail/functor/identity.hpp>
+#include <boost/assign/v2/put/modifier/def.hpp>
+#include <boost/assign/v2/put/generic/parameter.hpp>
+#include <boost/assign/v2/put/modifier/ext/xxx.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace modifier_tag{
+
+ struct iterate{};
+
+}// put_aux
+namespace put_parameter{
+
+ template<typename Arg>
+ struct iterate{
+
+ template<typename OldFun, typename OldTag>
+ struct apply : put_parameter::pair<
+ functor_aux::identity,
+ modifier_tag::iterate
+ >{};
+ };
+
+}// put_parameter
+namespace put_aux{
+
+ template<>
+ class modifier<modifier_tag::iterate>
+ {
+
+ public:
+
+ typedef std::size_t size_type;
+
+ modifier() : i( 0 ){}
+ explicit modifier( size_type const& i_ )
+ : i( i_ )
+ {}
+
+ template<typename V, typename T>
+ void impl(V& v, BOOST_ASSIGN_V2_forward_param(T, t) )const
+ {
+ v.at( i++ ) = BOOST_ASSIGN_V2_forward_arg(T, t);
+ }
+
+ template<typename V, typename T>
+ void impl(V& v, T* t)const
+ {
+
+ v.replace( i++ , t);
+ }
+
+ protected:
+ mutable std::size_t i;
+ };
+
+ template<typename Arg = boost::mpl::na>
+ class iterate
+ {
+
+ public:
+
+ typedef std::size_t size_type;
+
+ iterate():i( 0 ){}
+ iterate( size_type const& i_)
+ : i( i_ )
+ {}
+
+ size_type const& get()const{ return this->i; }
+
+ protected:
+ size_type i;
+
+ };
+
+ class iterate_keyword : public iterate<>
+ {
+
+ typedef iterate<> super_t;
+
+ public:
+
+ typedef std::size_t size_type;
+
+ iterate_keyword(){}
+
+ iterate<> operator=( size_type const& n_)const
+ {
+ typedef iterate<> result_;
+ return result_( n_ );
+ }
+
+ };
+
+}// put_aux
+
+BOOST_ASSIGN_V2_PUT_MODIFIER_EXT_XXX(iterate)
+
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/modifier/ext/lookup.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/modifier/ext/lookup.hpp 2011-01-08 20:46:06 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,102 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_MODIFIER_LOOKUP_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_MODIFIER_LOOKUP_ER_2010_HPP
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/shared_ptr.hpp> // TODO remove
+#include <boost/assign/v2/put/modifier/def.hpp>
+#include <boost/assign/v2/detail/functor/identity.hpp>
+#include <boost/assign/v2/detail/pp/forward.hpp>
+#include <boost/assign/v2/put/generic/parameter.hpp>
+#include <boost/assign/v2/put/generic/result_of_modulo.hpp>
+#include <boost/assign/v2/put/modifier/ext/xxx.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace modifier_tag{
+
+ template<typename Arg> struct lookup{};
+
+}// modifier_tag
+namespace put_parameter{
+
+ template<typename Arg>
+ struct lookup{
+
+ template<typename OldFun, typename OldTag>
+ struct apply : put_parameter::pair<
+ functor_aux::identity,
+ modifier_tag::lookup<Arg>
+ >{};
+ };
+
+}// put_parameter
+namespace put_aux{
+
+ template<typename Arg>
+ struct modifier<modifier_tag::lookup<Arg> >
+ {
+
+ typedef Arg type;
+ typedef boost::shared_ptr<type> ptr_;
+
+ modifier(){}
+ explicit modifier(
+ typename boost::call_traits<type>::param_type arg
+ ) : ptr( new type( arg ) )
+ {}
+
+ template<typename V,typename T>
+ void impl(V& v, BOOST_ASSIGN_V2_forward_param(T, key) )const{
+ v[ key ] = (*this->ptr)( v[ key ] );
+ }
+
+ private:
+ ptr_ ptr;
+ };
+
+ template<typename Arg>
+ struct lookup
+ {
+ typedef Arg const type;
+
+ explicit lookup(type& arg_) : arg( arg_ ){}
+
+ type& get()const{ return this->arg; }
+
+ private:
+ type& arg;
+
+ };
+
+ struct lookup_keyword
+ {
+ lookup_keyword(){}
+
+ template<typename Arg1>
+ lookup<Arg1> operator=(Arg1 const& arg1)const
+ {
+ return lookup<Arg1>( arg1 );
+ }
+
+
+ };
+
+}// put_aux
+
+BOOST_ASSIGN_V2_PUT_MODIFIER_EXT_XXX(lookup)
+
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/modifier/std.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/modifier/std.hpp 2011-01-08 20:46:06 EST (Sat, 08 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_MODIFIER_STD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_MODIFIER_STD_ER_2010_HPP
+
+#include <boost/assign/v2/put/modifier/std/insert.hpp>
+#include <boost/assign/v2/put/modifier/std/push.hpp>
+#include <boost/assign/v2/put/modifier/std/push_back.hpp>
+#include <boost/assign/v2/put/modifier/std/push_front.hpp>
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/modifier/std/insert.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/modifier/std/insert.hpp 2011-01-08 20:46:06 EST (Sat, 08 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_MODIFIER_STD_INSERT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_MODIFIER_STD_INSERT_ER_2010_HPP
+#include <boost/assign/v2/put/modifier/std/xxx.hpp>
+
+BOOST_ASSIGN_V2_PUT_MODIFIER_STD_XXX(insert)
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/modifier/std/push.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/modifier/std/push.hpp 2011-01-08 20:46:06 EST (Sat, 08 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_MODIFIER_STD_PUSH_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_MODIFIER_STD_PUSH_ER_2010_HPP
+#include <boost/assign/v2/put/modifier/std/xxx.hpp>
+
+BOOST_ASSIGN_V2_PUT_MODIFIER_STD_XXX(push)
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/modifier/std/push_back.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/modifier/std/push_back.hpp 2011-01-08 20:46:06 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,15 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_MODIFIER_STD_PUSH_BACK_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_MODIFIER_STD_PUSH_BACK_ER_2010_HPP
+#include <boost/assign/v2/put/modifier/std/xxx.hpp>
+BOOST_ASSIGN_V2_PUT_MODIFIER_STD_XXX(push_back)
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/modifier/std/push_front.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/modifier/std/push_front.hpp 2011-01-08 20:46:06 EST (Sat, 08 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_MODIFIER_STD_PUSH_FRONT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_MODIFIER_STD_PUSH_FRONT_ER_2010_HPP
+#include <boost/assign/v2/put/modifier/std/xxx.hpp>
+
+BOOST_ASSIGN_V2_PUT_MODIFIER_STD_XXX(push_front)
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/modifier/std/xxx.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/modifier/std/xxx.hpp 2011-01-08 20:46:06 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,62 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_MODIFIER_STD_XXX
+#include <boost/preprocessor/cat.hpp>
+#include <boost/accumulators/framework/accumulator_base.hpp>
+
+#include <boost/assign/v2/detail/pp/forward.hpp>
+#include <boost/assign/v2/put/modifier/def.hpp>
+#include <boost/assign/v2/put/generic/new_modifier.hpp>
+
+#define BOOST_ASSIGN_V2_PUT_MODIFIER_STD_XXX(FUN)\
+namespace boost{\
+namespace assign{\
+namespace v2{\
+namespace modifier_tag{ struct FUN{}; }\
+namespace put_aux{\
+\
+ template<>\
+ class modifier<v2::modifier_tag::FUN>\
+ {\
+\
+ typedef boost::accumulators::dont_care dont_care_;\
+\
+ public:\
+\
+ modifier(){}\
+ modifier( dont_care_ ){}\
+\
+ template<typename V, typename T>\
+ void impl(V& v, BOOST_ASSIGN_V2_forward_param(T, t) )const{\
+ v.FUN(\
+ BOOST_ASSIGN_V2_forward_arg(T, t)\
+ );\
+ }\
+\
+ template<typename V, typename T>\
+ void impl(V& v, T* t)const{ v.FUN( t ); }\
+\
+ };\
+\
+}\
+namespace{\
+\
+ put_aux::set_modifier<v2::modifier_tag::FUN> const\
+ BOOST_PP_CAT(_,FUN) = ( \
+ _modifier = v2::modifier_tag::FUN() \
+ );\
+\
+}\
+}\
+}\
+}\
+/**/
+
+#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