diff options
Diffstat (limited to '3rdParty/Boost/src/boost/fusion/view/transform_view')
15 files changed, 965 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/advance_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/advance_impl.hpp new file mode 100644 index 0000000..9027226 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/advance_impl.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(FUSION_ADVANCE_IMPL_13122005_1906) +#define FUSION_ADVANCE_IMPL_13122005_1906 + +#include <boost/fusion/iterator/advance.hpp> + +namespace boost { namespace fusion +{ + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + template<typename First, typename F> + struct transform_view_iterator; + + template <typename First1, typename First2, typename F> + struct transform_view_iterator2; + + namespace extension + { + template<typename Tag> + struct advance_impl; + + // Unary Version + template<> + struct advance_impl<transform_view_iterator_tag> + { + template<typename Iterator, typename Dist> + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename result_of::advance<first_type, Dist>::type advanced_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator<advanced_type, transform_type> type; + + static type + call(Iterator const& i) + { + return type(boost::fusion::advance<Dist>(i.first), i.f); + } + }; + }; + + // Binary Version + template<> + struct advance_impl<transform_view_iterator2_tag> + { + template<typename Iterator, typename Dist> + struct apply + { + typedef typename Iterator::first1_type first1_type; + typedef typename Iterator::first2_type first2_type; + typedef typename result_of::advance<first1_type, Dist>::type advanced1_type; + typedef typename result_of::advance<first2_type, Dist>::type advanced2_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator2<advanced1_type, advanced2_type, transform_type> type; + + static type + call(Iterator const& i) + { + return type( + boost::fusion::advance<Dist>(i.first1) + , boost::fusion::advance<Dist>(i.first2), i.f); + } + }; + }; + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/apply_transform_result.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/apply_transform_result.hpp new file mode 100644 index 0000000..100055c --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/apply_transform_result.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_APPLY_TRANSFORM_RESULT_02092006_1936) +#define BOOST_FUSION_APPLY_TRANSFORM_RESULT_02092006_1936 + +#include <boost/utility/result_of.hpp> + +namespace boost { namespace fusion +{ + struct void_; + + namespace detail + { + template <typename F> + struct apply_transform_result + { + template <typename T0, typename T1 = void_> + struct apply + : boost::result_of<F(T0, T1)> + {}; + + template <typename T0> + struct apply<T0, void_> + : boost::result_of<F(T0)> + {}; + }; + } +}} + +#endif + + diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/at_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/at_impl.hpp new file mode 100644 index 0000000..5133de8 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/at_impl.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_AT_IMPL_20061029_1946) +#define BOOST_FUSION_AT_IMPL_20061029_1946 + +#include <boost/mpl/apply.hpp> +#include <boost/fusion/view/transform_view/detail/apply_transform_result.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> + +namespace boost { namespace fusion { + struct transform_view_tag; + struct transform_view2_tag; + + namespace extension + { + template<typename Tag> + struct at_impl; + + template<> + struct at_impl<transform_view_tag> + { + template<typename Seq, typename N> + struct apply + { + typedef typename Seq::transform_type F; + typedef detail::apply_transform_result<F> transform_type; + typedef typename boost::fusion::result_of::at<typename Seq::sequence_type, N>::type value_type; + typedef typename mpl::apply<transform_type, value_type>::type type; + + static type call(Seq& seq) + { + return seq.f(boost::fusion::at<N>(seq.seq)); + } + }; + }; + + template<> + struct at_impl<transform_view2_tag> + { + template<typename Seq, typename N> + struct apply + { + typedef typename Seq::transform_type F; + typedef detail::apply_transform_result<F> transform_type; + typedef typename boost::fusion::result_of::at<typename Seq::sequence1_type, N>::type value1_type; + typedef typename boost::fusion::result_of::at<typename Seq::sequence2_type, N>::type value2_type; + typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type; + + static type call(Seq& seq) + { + return seq.f(boost::fusion::at<N>(seq.seq1), boost::fusion::at<N>(seq.seq2)); + } + }; + }; + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/begin_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/begin_impl.hpp new file mode 100644 index 0000000..09fe889 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/begin_impl.hpp @@ -0,0 +1,68 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(FUSION_BEGIN_IMPL_07162005_1031) +#define FUSION_BEGIN_IMPL_07162005_1031 + +#include <boost/fusion/view/transform_view/transform_view_fwd.hpp> + +namespace boost { namespace fusion +{ + template <typename First, typename F> + struct transform_view_iterator; + + template <typename First1, typename First2, typename F> + struct transform_view_iterator2; + + namespace extension + { + template <typename Tag> + struct begin_impl; + + // Unary Version + template <> + struct begin_impl<transform_view_tag> + { + template <typename Sequence> + struct apply + { + typedef typename Sequence::first_type first_type; + typedef typename Sequence::transform_type transform_type; + typedef transform_view_iterator<first_type, transform_type> type; + + static type + call(Sequence& s) + { + return type(s.first(), s.f); + } + }; + }; + + // Binary Version + template <> + struct begin_impl<transform_view2_tag> + { + template <typename Sequence> + struct apply + { + typedef typename Sequence::first1_type first1_type; + typedef typename Sequence::first2_type first2_type; + typedef typename Sequence::transform_type transform_type; + typedef transform_view_iterator2<first1_type, first2_type, transform_type> type; + + static type + call(Sequence& s) + { + return type(s.first1(), s.first2(), s.f); + } + }; + }; + } +}} + +#endif + + diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/deref_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/deref_impl.hpp new file mode 100644 index 0000000..dcdf04e --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/deref_impl.hpp @@ -0,0 +1,76 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(FUSION_DEREF_IMPL_07162005_1026) +#define FUSION_DEREF_IMPL_07162005_1026 + +#include <boost/mpl/apply.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/iterator/value_of.hpp> +#include <boost/fusion/view/transform_view/detail/apply_transform_result.hpp> + +namespace boost { namespace fusion +{ + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + namespace extension + { + template <typename Tag> + struct deref_impl; + + // Unary Version + template <> + struct deref_impl<transform_view_iterator_tag> + { + template <typename Iterator> + struct apply + { + typedef typename + result_of::deref<typename Iterator::first_type>::type + value_type; + + typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type; + typedef typename mpl::apply<transform_type, value_type>::type type; + + static type + call(Iterator const& i) + { + return i.f(*i.first); + } + }; + }; + + // Binary Version + template <> + struct deref_impl<transform_view_iterator2_tag> + { + template <typename Iterator> + struct apply + { + typedef typename + result_of::deref<typename Iterator::first1_type>::type + value1_type; + typedef typename + result_of::deref<typename Iterator::first2_type>::type + value2_type; + + typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type; + typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type; + + static type + call(Iterator const& i) + { + return i.f(*i.first1, *i.first2); + } + }; + }; + } +}} + +#endif + + diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/distance_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/distance_impl.hpp new file mode 100644 index 0000000..12a2d79 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/distance_impl.hpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(FUSION_DISTANCE_IMPL_13122005_2139) +#define FUSION_DISTANCE_IMPL_13122005_2139 + +#include <boost/fusion/iterator/distance.hpp> + +namespace boost { namespace fusion { + + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + namespace extension + { + template<typename Tag> + struct distance_impl; + + // Unary Version + template<> + struct distance_impl<transform_view_iterator_tag> + { + template<typename First, typename Last> + struct apply + : result_of::distance<typename First::first_type, typename Last::first_type> + { + static + typename result_of::distance<typename First::first_type, typename Last::first_type>::type + call(First const& first, Last const& last) + { + return boost::fusion::distance(first.first, last.first); + } + }; + }; + + // Binary Version + template<> + struct distance_impl<transform_view_iterator2_tag> + { + template<typename First, typename Last> + struct apply + : result_of::distance<typename First::first1_type, typename Last::first1_type> + { + static + typename result_of::distance<typename First::first1_type, typename Last::first1_type>::type + call(First const& first, Last const& last) + { + return boost::fusion::distance(first.first1, last.first1); + } + }; + }; + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/end_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/end_impl.hpp new file mode 100644 index 0000000..0c19403 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/end_impl.hpp @@ -0,0 +1,68 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(FUSION_END_IMPL_07162005_1028) +#define FUSION_END_IMPL_07162005_1028 + +#include <boost/fusion/view/transform_view/transform_view_fwd.hpp> + +namespace boost { namespace fusion +{ + template <typename First, typename F> + struct transform_view_iterator; + + template <typename First1, typename First2, typename F> + struct transform_view_iterator2; + + namespace extension + { + template <typename Tag> + struct end_impl; + + // Unary Version + template <> + struct end_impl<transform_view_tag> + { + template <typename Sequence> + struct apply + { + typedef typename Sequence::last_type last_type; + typedef typename Sequence::transform_type transform_type; + typedef transform_view_iterator<last_type, transform_type> type; + + static type + call(Sequence& s) + { + return type(s.last(), s.f); + } + }; + }; + + // Binary Version + template <> + struct end_impl<transform_view2_tag> + { + template <typename Sequence> + struct apply + { + typedef typename Sequence::last1_type last1_type; + typedef typename Sequence::last2_type last2_type; + typedef typename Sequence::transform_type transform_type; + typedef transform_view_iterator2<last1_type, last2_type, transform_type> type; + + static type + call(Sequence& s) + { + return type(s.last1(), s.last2(), s.f); + } + }; + }; + } +}} + +#endif + + diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/equal_to_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/equal_to_impl.hpp new file mode 100644 index 0000000..b1f0ae2 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/equal_to_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_TRANSFORM_VIEW_ITERATOR_20070127_0957) +#define BOOST_FUSION_TRANSFORM_VIEW_ITERATOR_20070127_0957 + +#include <boost/fusion/iterator/equal_to.hpp> + +namespace boost { namespace fusion { + + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + namespace extension + { + template<typename Tag> + struct equal_to_impl; + + template<> + struct equal_to_impl<transform_view_iterator_tag> + { + template<typename It1, typename It2> + struct apply + : result_of::equal_to<typename It1::first_type, typename It2::first_type> + {}; + }; + + template<> + struct equal_to_impl<transform_view_iterator2_tag> + { + template<typename It1, typename It2> + struct apply + : result_of::equal_to<typename It1::first1_type, typename It2::first1_type> + {}; + }; + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/next_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/next_impl.hpp new file mode 100644 index 0000000..5c61a60 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/next_impl.hpp @@ -0,0 +1,74 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(FUSION_NEXT_IMPL_07162005_1029) +#define FUSION_NEXT_IMPL_07162005_1029 + +#include <boost/fusion/iterator/next.hpp> + +namespace boost { namespace fusion +{ + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + template<typename First, typename F> + struct transform_view_iterator; + + template <typename First1, typename First2, typename F> + struct transform_view_iterator2; + + namespace extension + { + template <typename Tag> + struct next_impl; + + // Unary Version + template <> + struct next_impl<transform_view_iterator_tag> + { + template <typename Iterator> + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename result_of::next<first_type>::type next_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator<next_type, transform_type> type; + + static type + call(Iterator const& i) + { + return type(fusion::next(i.first), i.f); + } + }; + }; + + // Binary Version + template <> + struct next_impl<transform_view_iterator2_tag> + { + template <typename Iterator> + struct apply + { + typedef typename Iterator::first1_type first1_type; + typedef typename Iterator::first2_type first2_type; + typedef typename result_of::next<first1_type>::type next1_type; + typedef typename result_of::next<first2_type>::type next2_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator2<next1_type, next2_type, transform_type> type; + + static type + call(Iterator const& i) + { + return type(fusion::next(i.first1), fusion::next(i.first2), i.f); + } + }; + }; + } +}} + +#endif + + diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/prior_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/prior_impl.hpp new file mode 100644 index 0000000..772b3e5 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/prior_impl.hpp @@ -0,0 +1,73 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(FUSION_PREV_IMPL_13122005_2110) +#define FUSION_PREV_IMPL_13122005_2110 + +#include <boost/fusion/iterator/prior.hpp> + +namespace boost { namespace fusion +{ + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + template<typename First, typename F> + struct transform_view_iterator; + + template <typename First1, typename First2, typename F> + struct transform_view_iterator2; + + namespace extension + { + template<typename Tag> + struct prior_impl; + + // Unary Version + template<> + struct prior_impl<transform_view_iterator_tag> + { + template<typename Iterator> + struct apply + { + typedef typename Iterator::first_type first_type; + typedef typename result_of::prior<first_type>::type prior_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator<prior_type, transform_type> type; + + static type + call(Iterator const& i) + { + return type(fusion::prior(i.first), i.f); + } + }; + }; + + // Binary Version + template<> + struct prior_impl<transform_view_iterator2_tag> + { + template<typename Iterator> + struct apply + { + typedef typename Iterator::first1_type first1_type; + typedef typename Iterator::first2_type first2_type; + typedef typename result_of::prior<first1_type>::type prior1_type; + typedef typename result_of::prior<first2_type>::type prior2_type; + typedef typename Iterator::transform_type transform_type; + typedef transform_view_iterator2<prior1_type, prior2_type, transform_type> type; + + static type + call(Iterator const& i) + { + return type(fusion::prior(i.first1), fusion::prior(i.first2), i.f); + } + }; + }; + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/value_at_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/value_at_impl.hpp new file mode 100644 index 0000000..445bbd0 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/value_at_impl.hpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_VALUE_AT_IMPL_20061101_0745) +#define BOOST_FUSION_VALUE_AT_IMPL_20061101_0745 + +#include <boost/mpl/apply.hpp> +#include <boost/fusion/view/transform_view/detail/apply_transform_result.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> + +namespace boost { namespace fusion { + struct transform_view_tag; + struct transform_view2_tag; + + namespace extension + { + template<typename Tag> + struct value_at_impl; + + template<> + struct value_at_impl<transform_view_tag> + { + template<typename Seq, typename N> + struct apply + { + typedef typename Seq::transform_type F; + typedef detail::apply_transform_result<F> transform_type; + typedef typename boost::fusion::result_of::value_at<typename Seq::sequence_type, N>::type value_type; + typedef typename mpl::apply<transform_type, value_type>::type type; + }; + }; + + template<> + struct value_at_impl<transform_view2_tag> + { + template<typename Seq, typename N> + struct apply + { + typedef typename Seq::transform_type F; + typedef detail::apply_transform_result<F> transform_type; + typedef typename boost::fusion::result_of::value_at<typename Seq::sequence1_type, N>::type value1_type; + typedef typename boost::fusion::result_of::value_at<typename Seq::sequence2_type, N>::type value2_type; + typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type; + }; + }; + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/value_of_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/value_of_impl.hpp new file mode 100644 index 0000000..1085862 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/detail/value_of_impl.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(FUSION_VALUE_OF_IMPL_07162005_1030) +#define FUSION_VALUE_OF_IMPL_07162005_1030 + +#include <boost/mpl/apply.hpp> +#include <boost/fusion/iterator/value_of.hpp> +#include <boost/fusion/view/transform_view/detail/apply_transform_result.hpp> + +namespace boost { namespace fusion +{ + struct transform_view_iterator_tag; + struct transform_view_iterator2_tag; + + namespace extension + { + template <typename Tag> + struct value_of_impl; + + // Unary Version + template <> + struct value_of_impl<transform_view_iterator_tag> + { + template <typename Iterator> + struct apply + { + typedef typename + result_of::value_of<typename Iterator::first_type>::type + value_type; + + typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type; + typedef typename mpl::apply<transform_type, value_type>::type type; + }; + }; + + // Binary Version + template <> + struct value_of_impl<transform_view_iterator2_tag> + { + template <typename Iterator> + struct apply + { + typedef typename + result_of::value_of<typename Iterator::first1_type>::type + value1_type; + typedef typename + result_of::value_of<typename Iterator::first2_type>::type + value2_type; + + typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type; + typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type; + }; + }; + } +}} + +#endif + + diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/transform_view.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/transform_view.hpp new file mode 100644 index 0000000..1049f11 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/transform_view.hpp @@ -0,0 +1,115 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(FUSION_TRANSFORM_VIEW_07162005_1037) +#define FUSION_TRANSFORM_VIEW_07162005_1037 + +#include <boost/static_assert.hpp> +#include <boost/fusion/support/detail/access.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/view/transform_view/transform_view_iterator.hpp> +#include <boost/fusion/view/transform_view/transform_view_fwd.hpp> +#include <boost/fusion/view/transform_view/detail/begin_impl.hpp> +#include <boost/fusion/view/transform_view/detail/end_impl.hpp> +#include <boost/fusion/view/transform_view/detail/at_impl.hpp> +#include <boost/fusion/view/transform_view/detail/value_at_impl.hpp> +#include <boost/fusion/view/detail/strictest_traversal.hpp> +#include <boost/fusion/container/vector/vector10.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/support/sequence_base.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/sequence/intrinsic/end.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace fusion +{ + struct void_; + struct transform_view_tag; + struct transform_view2_tag; + struct fusion_sequence_tag; + + // Binary Version + template <typename Sequence1, typename Sequence2, typename F> + struct transform_view : sequence_base<transform_view<Sequence1, Sequence2, F> > + { + BOOST_STATIC_ASSERT(result_of::size<Sequence1>::value == result_of::size<Sequence2>::value); + typedef transform_view2_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::true_ is_view; + + typedef typename traits::category_of<Sequence1>::type category1; + typedef typename traits::category_of<Sequence2>::type category2; + typedef typename detail::strictest_traversal< + fusion::vector2<Sequence1, Sequence2> >::type category; + typedef typename result_of::begin<Sequence1>::type first1_type; + typedef typename result_of::begin<Sequence2>::type first2_type; + typedef typename result_of::end<Sequence1>::type last1_type; + typedef typename result_of::end<Sequence2>::type last2_type; + typedef typename result_of::size<Sequence1>::type size; + typedef Sequence1 sequence1_type; + typedef Sequence2 sequence2_type; + typedef F transform_type; + + transform_view(Sequence1& in_seq1, Sequence2& in_seq2, F const& binop) + : f(binop) + , seq1(in_seq1) + , seq2(in_seq2) + {} + + first1_type first1() const { return fusion::begin(seq1); } + first2_type first2() const { return fusion::begin(seq2); } + last1_type last1() const { return fusion::end(seq1); } + last2_type last2() const { return fusion::end(seq2); } + + transform_type f; + typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1; + typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + transform_view& operator= (transform_view const&); + }; + + // Unary Version + template <typename Sequence, typename F> +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + struct transform_view<Sequence, F, void_> : sequence_base<transform_view<Sequence, F, void_> > +#else + struct transform_view<Sequence, F> : sequence_base<transform_view<Sequence, F> > +#endif + { + typedef transform_view_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::true_ is_view; + + typedef typename traits::category_of<Sequence>::type category; + typedef typename result_of::begin<Sequence>::type first_type; + typedef typename result_of::end<Sequence>::type last_type; + typedef typename result_of::size<Sequence>::type size; + typedef Sequence sequence_type; + typedef F transform_type; + + transform_view(Sequence& in_seq, F const& in_f) + : seq(in_seq) + , f(in_f) + {} + + first_type first() const { return fusion::begin(seq); } + last_type last() const { return fusion::end(seq); } + typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq; + transform_type f; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + transform_view& operator= (transform_view const&); + }; +}} + +#endif + + diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/transform_view_fwd.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/transform_view_fwd.hpp new file mode 100644 index 0000000..c52cf6e --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/transform_view_fwd.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(FUSION_TRANSFORM_VIEW_FORWARD_01052006_1839) +#define FUSION_TRANSFORM_VIEW_FORWARD_01052006_1839 + +namespace boost { namespace fusion +{ + struct void_; + struct transform_view_tag; + struct transform_view2_tag; + + template <typename A, typename B, typename C = void_> + struct transform_view; +}} + +#endif + + diff --git a/3rdParty/Boost/src/boost/fusion/view/transform_view/transform_view_iterator.hpp b/3rdParty/Boost/src/boost/fusion/view/transform_view/transform_view_iterator.hpp new file mode 100644 index 0000000..af9d52b --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/transform_view/transform_view_iterator.hpp @@ -0,0 +1,77 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(FUSION_TRANSFORM_VIEW_ITERATOR_07162005_1033) +#define FUSION_TRANSFORM_VIEW_ITERATOR_07162005_1033 + +#include <boost/fusion/support/iterator_base.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/iterator/mpl/convert_iterator.hpp> +#include <boost/fusion/adapted/mpl/mpl_iterator.hpp> +#include <boost/fusion/view/transform_view/detail/deref_impl.hpp> +#include <boost/fusion/view/transform_view/detail/next_impl.hpp> +#include <boost/fusion/view/transform_view/detail/prior_impl.hpp> +#include <boost/fusion/view/transform_view/detail/value_of_impl.hpp> +#include <boost/fusion/view/transform_view/detail/advance_impl.hpp> +#include <boost/fusion/view/transform_view/detail/distance_impl.hpp> +#include <boost/fusion/view/transform_view/detail/equal_to_impl.hpp> + +namespace boost { namespace fusion +{ + // Unary Version + struct transform_view_iterator_tag; + + template <typename First, typename F> + struct transform_view_iterator + : iterator_base<transform_view_iterator<First, F> > + { + typedef transform_view_iterator_tag fusion_tag; + typedef convert_iterator<First> converter; + typedef typename converter::type first_type; + typedef typename traits::category_of<first_type>::type category; + typedef F transform_type; + + transform_view_iterator(First const& in_first, F const& in_f) + : first(converter::call(in_first)), f(in_f) {} + + first_type first; + transform_type f; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + transform_view_iterator& operator= (transform_view_iterator const&); + }; + + // Binary Version + struct transform_view_iterator2_tag; + + template <typename First1, typename First2, typename F> + struct transform_view_iterator2 + : iterator_base<transform_view_iterator2<First1, First2, F> > + { + typedef transform_view_iterator2_tag fusion_tag; + typedef convert_iterator<First1> converter1; + typedef convert_iterator<First2> converter2; + typedef typename converter1::type first1_type; + typedef typename converter2::type first2_type; + typedef typename traits::category_of<first1_type>::type category; + typedef F transform_type; + + transform_view_iterator2(First1 const& in_first1, First2 const& in_first2, F const& in_f) + : first1(converter1::call(in_first1)), first2(converter2::call(in_first2)), f(in_f) {} + + first1_type first1; + first2_type first2; + transform_type f; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + transform_view_iterator2& operator= (transform_view_iterator2 const&); + }; +}} + +#endif + |