GCode Processor
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
InputFileIterator Class Reference

Reads an input file line by line. More...

#include <InputFileIterator.h>

Inheritance diagram for InputFileIterator:

Public Types

using char_type = typename std::string::value_type
 
using traits_type = typename std::string::traits_type
 
using istream_type = std::basic_istream< char_type, traits_type >
 

Public Member Functions

 InputFileIterator (istream_type &is)
 Construct and read the first line in. More...
 
const std::string operator* () const
 Deference operator. More...
 
decltype(auto) operator-> () const
 Arrow iterator. More...
 
InputFileIteratoroperator++ ()
 Pre-increment operator (read line in).
 
InputFileIterator operator++ (int)
 Post-increment operator (read line in).
 

Static Public Member Functions

static const InputFileIteratorend ()
 Returns an empty iterator.
 

Private Member Functions

 InputFileIterator ()
 Default constructor (private).
 

Private Attributes

istream_type * InputStream_
 Input stream pointer to file being read in by this.
 
std::string Value_
 Currently loaded line.
 

Friends

const bool operator== (const InputFileIterator &lhs, const InputFileIterator &rhs)
 Equality operator; checks if pointers to streams are equal.
 

Detailed Description

Reads an input file line by line.

Constructor & Destructor Documentation

InputFileIterator ( istream_type &  is)
inline

Construct and read the first line in.

Parameters
isInput stream to read from.

Member Function Documentation

const std::string operator* ( ) const
inline

Deference operator.

Returns
The line that is currently loaded in Value_ (i.e. a copy of Value_).
decltype(auto) operator-> ( ) const
inline

Arrow iterator.

Returns
i->m is the same as (*i).m.

The documentation for this class was generated from the following files: