6 #include "includes/lock_object.h"
57 using value_type = std::pair<FileContentIterator,FileContentIterator>;
67 char delimiter =
'\n');
70 char delimiter =
'\n');
101 using Position = std::fstream::pos_type;
104 Position GetPosition() const noexcept;
107 bool SeekNext(
char Target);
113 void RestoreState() const;
145 char delimiter =
'\n');
148 char delimiter =
'\n');
Iterator interface around a file pointer.
Definition: FileContentIterator.hpp:46
void pointer
Definition: FileContentIterator.hpp:61
std::pair< FileContentIterator, FileContentIterator > value_type
An iterator pair {begin,end} representing a range within the file.
Definition: FileContentIterator.hpp:57
friend bool operator<(const FileContentIterator &rLeft, const FileContentIterator &rRight)
FileContentIterator(FileContentIterator &&rOther)=default
std::optional< std::pair< std::fstream, LockObject > > FileAccess
Definition: FileContentIterator.hpp:51
FileContentIterator(std::shared_ptr< FileAccess > &&rpFileAccess, char delimiter='\n')
void SeekEOF()
Set the iterator to the end of the file.
FileContentIterator & operator=(const FileContentIterator &rOther)=default
FileContentIterator()=delete
FileContentIterator operator++(int)
FileContentIterator(const std::shared_ptr< FileAccess > &rpFileAccess, char delimiter='\n')
std::forward_iterator_tag iterator_category
Definition: FileContentIterator.hpp:53
friend bool operator!=(const FileContentIterator &rLeft, const FileContentIterator &rRight)
FileContentIterator & operator++()
friend bool operator==(const FileContentIterator &rLeft, const FileContentIterator &rRight)
FileContentIterator & operator=(FileContentIterator &&rOther)=default
void reference
Definition: FileContentIterator.hpp:63
FileContentIterator(const FileContentIterator &rOther)=default
value_type operator*() const
std::ptrdiff_t difference_type
Definition: FileContentIterator.hpp:59
std::string value() const
Read the associated range from the file into a string.
A read-only iterator over the items of a delimited file.
Definition: FileContentIterator.hpp:129
FileStringIterator(const FileStringIterator &rOther)=default
void pointer
Definition: FileContentIterator.hpp:137
FileStringIterator(FileStringIterator &&rOther)=default
void SeekEOF()
Set the iterator to the end of the file.
FileContentIterator::FileAccess FileAccess
Definition: FileContentIterator.hpp:141
FileStringIterator(std::shared_ptr< FileAccess > &&rpFileAccess, char delimiter='\n')
std::forward_iterator_tag iterator_category
Definition: FileContentIterator.hpp:131
friend bool operator==(const FileStringIterator &rLeft, const FileStringIterator &rRight)
void reference
Definition: FileContentIterator.hpp:139
FileStringIterator & operator++()
FileStringIterator operator++(int)
FileStringIterator & operator=(const FileStringIterator &rOther)=default
FileStringIterator(const std::shared_ptr< FileAccess > &rpFileAccess, char delimiter='\n')
value_type operator*() const
friend bool operator<(const FileStringIterator &rLeft, const FileStringIterator &rRight)
std::ptrdiff_t difference_type
Definition: FileContentIterator.hpp:135
FileStringIterator & operator=(FileStringIterator &&rOther)=default
std::string value_type
Definition: FileContentIterator.hpp:133
friend bool operator!=(const FileStringIterator &rLeft, const FileStringIterator &rRight)
Definition: AddIOToPython.hpp:12
Definition: CheckpointID.hpp:68