ITS.Propagation.LFMF
1.2
Part of the NTIA/ITS Propagation Library
Toggle main menu visibility
Loading...
Searching...
No Matches
app
include
CommaSeparatedIterator.h
Go to the documentation of this file.
1
4
#pragma once
5
6
#include <istream>
// for std::istream
7
#include <string>
// For std::string
8
#include <utility>
// for std::pair
9
10
17
class
CommaSeparatedIterator
{
18
public
:
20
using
value_type
= std::pair<std::string, std::string>;
21
22
27
CommaSeparatedIterator
(std::istream &stream);
28
30
CommaSeparatedIterator
&
operator++
();
31
33
value_type
operator*
()
const
;
34
36
explicit
operator
bool()
const
;
37
private
:
38
std::istream &
stream_
;
39
std::string
line_
;
40
std::string
first_
;
41
std::string
second_
;
42
};
CommaSeparatedIterator::first_
std::string first_
First string from the current line.
Definition
CommaSeparatedIterator.h:40
CommaSeparatedIterator::operator++
CommaSeparatedIterator & operator++()
Pre-increment operator to advance the iterator to the next line.
Definition
CommaSeparatedIterator.cpp:27
CommaSeparatedIterator::second_
std::string second_
Second string from the current line.
Definition
CommaSeparatedIterator.h:41
CommaSeparatedIterator::value_type
std::pair< std::string, std::string > value_type
Type alias for the value returned by the iterator (pair of strings).
Definition
CommaSeparatedIterator.h:20
CommaSeparatedIterator::operator*
value_type operator*() const
Dereference operator to obtain the current pair of substrings.
Definition
CommaSeparatedIterator.cpp:65
CommaSeparatedIterator::stream_
std::istream & stream_
Reference to the input stream.
Definition
CommaSeparatedIterator.h:38
CommaSeparatedIterator::line_
std::string line_
Current line read from the stream.
Definition
CommaSeparatedIterator.h:39
CommaSeparatedIterator::CommaSeparatedIterator
CommaSeparatedIterator(std::istream &stream)
Constructor method.
Definition
CommaSeparatedIterator.cpp:13
Privacy Policy
FOIA
Accessibility
Information Quality