WRApplication
External kratos "application" for multiscale time integration.
FileStringIterator Class Reference

A read-only iterator over the items of a delimited file. More...

Collaboration diagram for FileStringIterator:

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = std::string
 
using difference_type = std::ptrdiff_t
 
using pointer = void
 
using reference = void
 
using FileAccess = FileContentIterator::FileAccess
 

Public Member Functions

 FileStringIterator (std::shared_ptr< FileAccess > &&rpFileAccess, char delimiter='\n')
 
 FileStringIterator (const std::shared_ptr< FileAccess > &rpFileAccess, char delimiter='\n')
 
 FileStringIterator (FileStringIterator &&rOther)=default
 
 FileStringIterator (const FileStringIterator &rOther)=default
 
FileStringIteratoroperator= (FileStringIterator &&rOther)=default
 
FileStringIteratoroperator= (const FileStringIterator &rOther)=default
 
FileStringIteratoroperator++ ()
 
FileStringIterator operator++ (int)
 
value_type operator* () const
 
void SeekEOF ()
 Set the iterator to the end of the file. More...
 

Friends

bool operator== (const FileStringIterator &rLeft, const FileStringIterator &rRight)
 
bool operator!= (const FileStringIterator &rLeft, const FileStringIterator &rRight)
 
bool operator< (const FileStringIterator &rLeft, const FileStringIterator &rRight)
 

Detailed Description

A read-only iterator over the items of a delimited file.

This is a wrapper class around FileContentIterator but with std::string as value_type;

Member Typedef Documentation

◆ difference_type

using difference_type = std::ptrdiff_t

◆ FileAccess

◆ iterator_category

using iterator_category = std::forward_iterator_tag

◆ pointer

using pointer = void

◆ reference

using reference = void

◆ value_type

using value_type = std::string

Constructor & Destructor Documentation

◆ FileStringIterator() [1/4]

FileStringIterator ( std::shared_ptr< FileAccess > &&  rpFileAccess,
char  delimiter = '\n' 
)

◆ FileStringIterator() [2/4]

FileStringIterator ( const std::shared_ptr< FileAccess > &  rpFileAccess,
char  delimiter = '\n' 
)

◆ FileStringIterator() [3/4]

FileStringIterator ( FileStringIterator &&  rOther)
default

◆ FileStringIterator() [4/4]

FileStringIterator ( const FileStringIterator rOther)
default

Member Function Documentation

◆ operator*()

value_type operator* ( ) const

◆ operator++() [1/2]

FileStringIterator& operator++ ( )

◆ operator++() [2/2]

FileStringIterator operator++ ( int  )

◆ operator=() [1/2]

FileStringIterator& operator= ( const FileStringIterator rOther)
default

◆ operator=() [2/2]

FileStringIterator& operator= ( FileStringIterator &&  rOther)
default

◆ SeekEOF()

void SeekEOF ( )

Set the iterator to the end of the file.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const FileStringIterator rLeft,
const FileStringIterator rRight 
)
friend

◆ operator<

bool operator< ( const FileStringIterator rLeft,
const FileStringIterator rRight 
)
friend

◆ operator==

bool operator== ( const FileStringIterator rLeft,
const FileStringIterator rRight 
)
friend

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