34#include <NDEVR/Scanner.h>
The equivelent of std::vector but with a bit more control.
void setFilePosition(uint08 file_position, bool read_line=true) final override
Sets the current read position within the buffered data.
BufferedScanner(const StringView &string, char delimiter='|')
Constructs a BufferedScanner from a string view, caching the contents for scanning.
uint01 * getByteArray() final override
Returns a pointer to the raw byte array at the current read position.
BufferedScanner(const File &file, char delimiter='|', File::OpenMode mode=File::e_ascii_read)
Constructs a BufferedScanner from a file, reading and caching the entire contents.
bool nextLine(String &string, bool clear_string=true) final override
Advances to the next line and writes it into the provided string.
Buffer< uint04 > m_new_lines
Indices of newline positions within the buffered data.
String m_file_buffer
The entire file or string contents cached in memory.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
OpenMode
Specifies the mode in which a file is opened.
@ e_ascii_read
Open for ASCII text reading.
File file() const
Returns the file associated with this scanner.
Scanner(const File &file, char delimiter='|', File::OpenMode mode=File::e_ascii_read)
Constructs a Scanner that reads from a file.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
The primary namespace for the NDEVR SDK.
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...