## Class template istream_line_iterator

hamigaki::istream_line_iterator —

## Synopsis

    template<typename CharT, typename Traits = std::char_traits<CharT>,
             typename Allocator = std::allocator<CharT> >
    class istream_line_iterator {
    public:
      // types
      typedef CharT                                            char_type;
      typedef Traits                                           traits_type;
      typedef Allocator                                        allocator_type;
      typedef std::basic_istream<CharT,Traits>                 istream_type;
      typedef std::basic_string<CharT,Traits,Allocator>        string_type;
      typedef std::basic_string<CharT,Traits,Allocator>        value_type;
      typedef std::basic_string<CharT,Traits,Allocator>        reference;
      typedef const std::basic_string<CharT,Traits,Allocator>* pointer;
      typedef implementation defined                           difference_type;
      typedef std::input_iterator_tag                          iterator_category;

      // construct/copy/destruct
      istream_line_iterator();
      explicit istream_line_iterator(istream_type&);
      istream_line_iterator(istream_type&, CharT);

      // operators
      implementation defined operator*() const;
      istream_line_iterator<CharT,Traits,Allocator>& operator++();

      private: istream_type* in_stream;
      private: CharT delim;
      private: value_type value;
    };

## Description

### `istream_line_iterator` construct/copy/destruct

1.     istream_line_iterator();

   Effects: | ストリーム終端反復子を構築する。

2.     explicit istream_line_iterator(istream_type& is);

   Effects: |
       in_stream = &is;
       delim = is.widen('\n');
       std::getline(*in_stream, value, delim);

3.     istream_line_iterator(istream_type& is, CharT delimiter);

   Effects: |
       in_stream = &is;
       delim = delimiter;
       std::getline(*in_stream, value, delim);

### `istream_line_iterator` operators

1.     implementation defined operator*() const;

   Returns: | `value`

2.     istream_line_iterator<CharT,Traits,Allocator>& operator++();

   Effects: | `std::getline(*in_stream, value, delim)`
   Returns: | `*this`

| 製作著作 © 2006, 2007 Takeshi Mouri