~twpol/dcplusplus/trunk

« back to all changes in this revision

Viewing changes to boost/boost/fusion/view/single_view/single_view_iterator.hpp

  • Committer: James Ross
  • Date: 2010-07-05 00:03:18 UTC
  • mfrom: (1524.1.650 dcplusplus)
  • Revision ID: silver@warwickcompsoc.co.uk-20100705000318-awwqm8ocpp5m47yz
Merged to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*=============================================================================
2
 
    Copyright (c) 2001-2006 Joel de Guzman
3
 
 
4
 
    Distributed under the Boost Software License, Version 1.0. (See accompanying 
5
 
    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
 
==============================================================================*/
7
 
#if !defined(FUSION_SINGLE_VIEW_ITERATOR_05052005_0340)
8
 
#define FUSION_SINGLE_VIEW_ITERATOR_05052005_0340
9
 
 
10
 
#include <boost/fusion/support/detail/access.hpp>
11
 
#include <boost/fusion/support/iterator_base.hpp>
12
 
#include <boost/fusion/view/single_view/detail/deref_impl.hpp>
13
 
#include <boost/fusion/view/single_view/detail/next_impl.hpp>
14
 
#include <boost/fusion/view/single_view/detail/value_of_impl.hpp>
15
 
 
16
 
namespace boost { namespace fusion
17
 
{
18
 
    struct single_view_iterator_tag;
19
 
    struct forward_traversal_tag;
20
 
 
21
 
    template <typename SingleView>
22
 
    struct single_view_iterator_end
23
 
        : iterator_base<single_view_iterator_end<SingleView> >
24
 
    {
25
 
        typedef single_view_iterator_tag fusion_tag;
26
 
        typedef forward_traversal_tag category;
27
 
    };
28
 
 
29
 
    template <typename SingleView>
30
 
    struct single_view_iterator
31
 
        : iterator_base<single_view_iterator<SingleView> >
32
 
    {
33
 
        typedef single_view_iterator_tag fusion_tag;
34
 
        typedef forward_traversal_tag category;
35
 
        typedef typename SingleView::value_type value_type;
36
 
        typedef SingleView single_view_type;
37
 
 
38
 
        explicit single_view_iterator(single_view_type const& view)
39
 
            : val(view.val) {}
40
 
 
41
 
        value_type val;
42
 
    };
43
 
}}
44
 
 
45
 
#endif
46
 
 
47
 
 
 
1
/*=============================================================================
 
2
    Copyright (c) 2001-2006 Joel de Guzman
 
3
 
 
4
    Distributed under the Boost Software License, Version 1.0. (See accompanying 
 
5
    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
6
==============================================================================*/
 
7
#if !defined(FUSION_SINGLE_VIEW_ITERATOR_05052005_0340)
 
8
#define FUSION_SINGLE_VIEW_ITERATOR_05052005_0340
 
9
 
 
10
#include <boost/fusion/support/detail/access.hpp>
 
11
#include <boost/fusion/support/iterator_base.hpp>
 
12
#include <boost/fusion/view/single_view/detail/deref_impl.hpp>
 
13
#include <boost/fusion/view/single_view/detail/next_impl.hpp>
 
14
#include <boost/fusion/view/single_view/detail/value_of_impl.hpp>
 
15
 
 
16
namespace boost { namespace fusion
 
17
{
 
18
    struct single_view_iterator_tag;
 
19
    struct forward_traversal_tag;
 
20
 
 
21
    template <typename SingleView>
 
22
    struct single_view_iterator_end
 
23
        : iterator_base<single_view_iterator_end<SingleView> >
 
24
    {
 
25
        typedef single_view_iterator_tag fusion_tag;
 
26
        typedef forward_traversal_tag category;
 
27
    };
 
28
 
 
29
    template <typename SingleView>
 
30
    struct single_view_iterator
 
31
        : iterator_base<single_view_iterator<SingleView> >
 
32
    {
 
33
        typedef single_view_iterator_tag fusion_tag;
 
34
        typedef forward_traversal_tag category;
 
35
        typedef typename SingleView::value_type value_type;
 
36
        typedef SingleView single_view_type;
 
37
 
 
38
        explicit single_view_iterator(single_view_type const& view)
 
39
            : val(view.val) {}
 
40
 
 
41
        value_type val;
 
42
    };
 
43
}}
 
44
 
 
45
#endif
 
46
 
 
47