• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.. Copyright David Abrahams 2006. Distributed under the Boost
2.. Software License, Version 1.0. (See accompanying
3.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4
5Header
6......
7
8::
9
10  #include <boost/function_output_iterator.hpp>
11
12::
13
14  template <class UnaryFunction>
15  class function_output_iterator {
16  public:
17    typedef std::output_iterator_tag iterator_category;
18    typedef void                     value_type;
19    typedef void                     difference_type;
20    typedef void                     pointer;
21    typedef void                     reference;
22
23    explicit function_output_iterator();
24
25    explicit function_output_iterator(const UnaryFunction& f);
26
27    /* see below */ operator*();
28    function_output_iterator& operator++();
29    function_output_iterator& operator++(int);
30  private:
31    UnaryFunction m_f;     // exposition only
32  };
33
34
35
36``function_output_iterator`` requirements
37.........................................
38
39``UnaryFunction`` must be Assignable and Copy Constructible.
40
41
42
43``function_output_iterator`` models
44...................................
45
46``function_output_iterator`` is a model of the Writable and
47Incrementable Iterator concepts.
48
49
50
51``function_output_iterator`` operations
52.......................................
53
54``explicit function_output_iterator(const UnaryFunction& f = UnaryFunction());``
55
56:Effects: Constructs an instance of ``function_output_iterator``
57  with ``m_f`` constructed from ``f``.
58
59
60``operator*();``
61
62:Returns: An object ``r`` of unspecified type such that ``r = t``
63  is equivalent to ``m_f(t)`` for all ``t``.
64
65
66``function_output_iterator& operator++();``
67
68:Returns: ``*this``
69
70
71``function_output_iterator& operator++(int);``
72
73:Returns: ``*this``
74