Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71040 - in sandbox/assign_v2/boost/assign/v2: interpreter option
From: erwann.rogard_at_[hidden]
Date: 2011-04-06 14:39:41


Author: e_r
Date: 2011-04-06 14:39:41 EDT (Wed, 06 Apr 2011)
New Revision: 71040
URL: http://svn.boost.org/trac/boost/changeset/71040

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/interpreter/data.hpp
      - copied unchanged from r71039, /sandbox/assign_v2/boost/assign/v2/interpreter/data_generator.hpp
   sandbox/assign_v2/boost/assign/v2/option/data.hpp
      - copied unchanged from r71039, /sandbox/assign_v2/boost/assign/v2/option/data_generator.hpp
Removed:
   sandbox/assign_v2/boost/assign/v2/interpreter/data_generator.hpp
   sandbox/assign_v2/boost/assign/v2/option/data_generator.hpp

Deleted: sandbox/assign_v2/boost/assign/v2/interpreter/data_generator.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/interpreter/data_generator.hpp 2011-04-06 14:39:41 EDT (Wed, 06 Apr 2011)
+++ (empty file)
@@ -1,54 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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_INTERPRETER_DATA_ER_2010_HPP
-#define BOOST_ASSIGN_V2_INTERPRETER_DATA_ER_2010_HPP
-#include <boost/assign/v2/detail/traits/container.hpp>
-#include <boost/assign/v2/detail/switch.hpp>
-#include <boost/assign/v2/detail/functor/pair.hpp>
-#include <boost/assign/v2/detail/functor/value.hpp>
-#include <boost/assign/v2/interpreter/fwd.hpp>
-#include <boost/assign/v2/option/data_generator.hpp>
-
-namespace boost{
-namespace assign{
-namespace v2{
-//[syntax_interpreter_data_generator
-namespace switch_tag{
- struct data_generator{};
-}// switch_tag
-
-#define BOOST_ASSIGN_V2_SWITCH_TAG data_generator
-BOOST_ASSIGN_V2_SWITCH_CASE(0, container_aux::is_multi_array, element_)
-BOOST_ASSIGN_V2_SWITCH_CASE(1, container_aux::is_map, map_)
-BOOST_ASSIGN_V2_SWITCH_CASE_DEFAULT(2, value_)
-#undef BOOST_ASSIGN_V2_SWITCH_TAG
-
-namespace interpreter_aux{
-
- template<
- typename C // Value or pointer-container
- >
- struct deduce_data_generator/*<-*/
- : data_generator<
- C,
- typename switch_aux::result<
- switch_tag::data_generator,
- C
- >::type
- >
- {}/*->*/;
-
-}// interpreter_aux
-//]
-}// v2
-}// assign
-}// boost
-
-#endif // BOOST_ASSIGN_V2_INTERPRETER_DATA_ER_2010_HPP

Deleted: sandbox/assign_v2/boost/assign/v2/option/data_generator.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/data_generator.hpp 2011-04-06 14:39:41 EDT (Wed, 06 Apr 2011)
+++ (empty file)
@@ -1,226 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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_OPTION_DATA_ER_2010_HPP
-#define BOOST_ASSIGN_V2_OPTION_DATA_ER_2010_HPP
-#include <boost/assign/v2/detail/functor/value.hpp>
-#include <boost/assign/v2/detail/keyword.hpp>
-#include <boost/assign/v2/detail/pp/ignore.hpp>
-#include <boost/assign/v2/detail/traits/container.hpp>
-#include <boost/assign/v2/interpreter/fwd.hpp>
-#include <boost/assign/v2/interpreter/replace.hpp>
-#include <boost/assign/v2/option/list.hpp>
-#include <boost/mpl/apply.hpp>
-
-namespace boost{
- struct use_default;
-namespace assign{
-namespace v2{
-//[syntax_option_data
-namespace interpreter_aux{
-
- template<
- typename C // Value or pointer-container
- , typename F // Functor or keyword
- >
- struct data_generator/*<-*/
- {
- typedef F type;
- }/*->*/;
-
- template<
- typename C // Multi-array
- >
- struct data_generator<C, element_>/*<-*/
- {
- typedef typename container_aux::element<C>::type element_;
- typedef functor_aux::value<element_> type;
- }/*->*/;
-
- template<typename C>
- struct data_generator<C, key_>/*<-*/
- {
- typedef typename container_aux::key<C>::type key_;
- typedef functor_aux::value<key_> type;
- }/*->*/;
-
- template<typename C>
- struct data_generator<C, map_>/*<-*/
- {
- typedef typename container_aux::key<C>::type key_;
- typedef typename container_aux::mapped<C>::type mapped_;
- typedef typename container_aux::value<C>::type value_;
- typedef functor_aux::pair<value_, key_, mapped_> type;
- }/*->*/;
-
- template<typename C>
- struct data_generator<C, use_default_>/*<-*/
- : deduce_data_generator<C>
- {}/*->*/;
-
- template<typename C>
- struct data_generator<C, value_>/*<-*/
- {
- typedef functor_aux::value<
- typename container_aux::value<C>::type
- > type;
- }/*->*/;
-
-namespace result_of{
-
- template<typename D, typename C, typename F = use_default_>
- struct option_data/*<-*/
- : ::boost::mpl::apply1<
- interpreter_aux::replace_data_generator<D>,
- typename data_generator<C, F>::type
- >
- {}/*->*/;
-
-}// result_of
-
- template<typename F/*<-*/= ignore_/*->*/>
- struct option_data/*<-*/
- : option_crtp<
- option_data<F>
- >
- {
- option_data(){}
- option_data(F f) : f_( f ){}
-
- template<typename C>
- F const& get()const{ return this->f_; }
-
- private:
- F f_;
- }/*->*/;
-
-//<-
- template<typename Kwd>
- struct option_data_helper
- : option_crtp<
- option_data<Kwd>
- >
- {
- template<typename C>
- typename data_generator<C, Kwd>::type
- get()const
- {
- return typename data_generator<C, Kwd>::type();
- }
- };
-
-#define BOOST_ASSIGN_V2_MACRO(Kwd)\
- template<>\
- struct option_data<Kwd>\
- : option_data_helper<Kwd>\
- {\
- option_data(){}\
- option_data(ignore_){}\
- };\
-/**/
-BOOST_ASSIGN_V2_MACRO(element_)
-BOOST_ASSIGN_V2_MACRO(key_)
-BOOST_ASSIGN_V2_MACRO(map_)
-BOOST_ASSIGN_V2_MACRO(use_default_)
-BOOST_ASSIGN_V2_MACRO(value_)
-#undef BOOST_ASSIGN_V2_MACRO
-//->
-
- // Overrides data generator
- template<typename C, typename F, typename MTag
- , typename DTag, typename D, typename F1>
- typename result_of::option_data<D, C, F1>::type
- operator%(
- interpreter_crtp<C, F, MTag, DTag, D> const& lhs,
- option_data<F1> const& rhs
- )/*<-*/
- {
- typedef typename result_of::option_data<
- D, C, F1
- >::type result_;
- return result_(
- lhs.container(),
- rhs.template get<C>(),
- lhs.modifier
- );
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
- struct keyword_data
- /*<-*/{
-
- template<typename F>
- option_data<F> operator=(F const& f)const{
- return option_data<F>( f );
- }
-
- }/*->*/;
-
-}// interpreter_aux
-namespace{
- const interpreter_aux::keyword_data _data/*<-*/
- = interpreter_aux::keyword_data()/*->*/;
-}
-namespace result_of{
-
- template<typename D, typename C, typename F>
- struct option_data/*<-*/
- : interpreter_aux::result_of::option_data<D, C, F>
- {}/*->*/;
-
-}// result_of
-//]
-
-
-}// v2
-}// assign
-}// boost
-
-#include <boost/preprocessor/cat.hpp>
-
-#define BOOST_ASSIGN_V2_OPTION_DATA_GENERATE(NAME, FUN)\
-namespace boost{\
-namespace assign{\
-namespace v2{\
-namespace interpreter_aux{\
-\
- template<typename T>\
- option_data< FUN > NAME()\
- {\
- return ( v2::_data = FUN() );\
- }\
-\
-}\
-using interpreter_aux::NAME;\
-}\
-}\
-}\
-/**/
-
-#include <boost/assign/v2/detail/functor/value.hpp>
-BOOST_ASSIGN_V2_OPTION_DATA_GENERATE(value, v2::functor_aux::value<T>)
-
-#include <boost/typeof/typeof.hpp>
-#include <boost/type_traits/add_const.hpp>
-#define BOOST_ASSIGN_V2_OPTION_DATA_KEYWORD(NAME, EXPR)\
-namespace boost{\
-namespace assign{\
-namespace v2{\
- typedef BOOST_TYPEOF( ( _data = EXPR ) ) BOOST_PP_CAT(type_of,NAME);\
-namespace{\
-\
- boost::add_const<BOOST_PP_CAT(type_of,NAME)>::type BOOST_PP_CAT(_,NAME) = ( _data = EXPR );\
-}\
-}\
-}\
-}\
-
-#include <boost/lambda/lambda.hpp>
-BOOST_ASSIGN_V2_OPTION_DATA_KEYWORD(identity, ::boost::lambda::_1)
-
-#endif // BOOST_ASSIGN_V2_OPTION_DATA_ER_2010_HPP


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