API Documentation
Loading...
Searching...
No Matches
BufferedScanner Class Reference

Implentation of Scanner, however all data is cached. Faster, but consumes. More...

#include <BufferedScanner.h>

Inheritance diagram for BufferedScanner:
[legend]
Collaboration diagram for BufferedScanner:
[legend]

Public Member Functions

 BufferedScanner (const File &file, char delimiter='|', File::OpenMode mode=File::e_ascii_read)
 
 BufferedScanner (const String &string, char delimiter='|')
 
uint01getByteArray () final override
 
bool nextLine () final override
 
bool nextLine (String &string, bool clear_string=true) final override
 
void setFilePosition (uint08 file_position, bool read_line=true) final override
 
- Public Member Functions inherited from Scanner
StringcurrentLine ()
 
const StringcurrentLine () const
 
uint08 dataSize () const
 
File file () const
 
template<class t_type >
t_type getColumn (uint04 column)
 
const char * getCurrent () const
 
uint08 getCurrentFilePosition ()
 
uint08 getCurrentLineNumber () const
 
TranslatedString getDebugPosition () const
 
fltp04 getFilePercent ()
 
uint04 getLineLength () const
 
template<class t_type >
t_type getNext ()
 
void getNext (String &next)
 
template<class t_type >
t_type getNext (uint04 count)
 
template<class t_type >
t_type getNextHex ()
 
bool hasNext () const
 
bool isComment (char comment) const
 
uint04linePosition ()
 
void moveForward (uint04 distance=1)
 
char quoteCharacter () const
 
void resetLinePosition ()
 
 Scanner (const File &file, char delimiter='|', File::OpenMode mode=File::e_ascii_read)
 
 Scanner (const String &string, char delimiter='|')
 
void setDelimiter (char delimiter)
 
void setHasDelimiter (const bool has_delimiter)
 
void setIgnoreEmptyLines (bool ignore_new_lines)
 
void setIgnoreWhiteSpace (bool ignore_white_space)
 
void setQuoteCharacter (char quote_character)
 
uint04 skip ()
 
bool skipTo (char location, bool ignore_case=false)
 
bool skipTo (const Buffer< char > &locations, bool ignore_case=false)
 
bool skipTo (const char *location, bool ignore_case=false)
 
uint04 skipWhiteSpace ()
 
virtual ~Scanner ()
 

Protected Attributes

String m_file_buffer
 
Buffer< uint04m_new_lines
 
- Protected Attributes inherited from Scanner
uint04 m_cur_column
 
uint04 m_cur_line_pos
 
uint08 m_current_file_position
 
String m_current_line
 
uint08 m_current_line_number
 
uint04 m_current_line_size
 
uint08 m_data_size
 
char m_delimiter
 
File m_file
 
bool m_has_delimiter
 
bool m_ignore_empty_lines
 
bool m_ignore_white_space = false
 
char m_quote_character
 
String m_time_format
 

Detailed Description

Implentation of Scanner, however all data is cached. Faster, but consumes.


more memory.

Constructor & Destructor Documentation

◆ BufferedScanner() [1/2]

BufferedScanner ( const File & file,
char delimiter = '|',
File::OpenMode mode = File::e_ascii_read )

◆ BufferedScanner() [2/2]

BufferedScanner ( const String & string,
char delimiter = '|' )
explicit

Member Function Documentation

◆ getByteArray()

uint01 * getByteArray ( )
finaloverridevirtual

Reimplemented from Scanner.

◆ nextLine() [1/2]

bool nextLine ( )
finaloverridevirtual

Reimplemented from Scanner.

◆ nextLine() [2/2]

bool nextLine ( String & string,
bool clear_string = true )
finaloverridevirtual

Reimplemented from Scanner.

◆ setFilePosition()

void setFilePosition ( uint08 file_position,
bool read_line = true )
finaloverridevirtual

Reimplemented from Scanner.

Member Data Documentation

◆ m_file_buffer

String m_file_buffer
protected

◆ m_new_lines

Buffer<uint04> m_new_lines
protected

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