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

#include <Scanner.h>

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

Public Member Functions

 Scanner (const File &file, char delimiter='|', File::OpenMode mode=File::e_ascii_read)
 
 Scanner (const String &string, char delimiter='|')
 
virtual ~Scanner ()
 
void setDelimiter (char delimiter)
 
uint08 getCurrentLineNumber () const
 
uint08 getCurrentFilePosition ()
 
fltp04 getFilePercent ()
 
virtual bool nextLine ()
 
virtual bool nextLine (String &string, bool clear_string=true)
 
const StringcurrentLine () const
 
StringcurrentLine ()
 
const char * getCurrent () const
 
void moveForward (uint04 distance=1)
 
bool isComment (char comment) const
 
uint04 getLineLength () const
 
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 ()
 
void resetLinePosition ()
 
void setHasDelimiter (const bool has_delimiter)
 
uint04linePosition ()
 
void setQuoteCharacter (char quote_character)
 
char quoteCharacter () const
 
File file () const
 
template<class t_type >
t_type getNext ()
 
void getNext (String &next)
 
template<class t_type >
t_type getNextHex ()
 
template<class t_type >
t_type getNext (uint04 count)
 
bool hasNext () const
 
template<class t_type >
t_type getColumn (uint04 column)
 
TranslatedString getDebugPosition () const
 
void setIgnoreEmptyLines (bool ignore_new_lines)
 
void setIgnoreWhiteSpace (bool ignore_white_space)
 
virtual void setFilePosition (uint08 file_position, bool read_line=true)
 
virtual uint01getByteArray ()
 
uint08 dataSize () const
 
template<>
fltp04 NDEVR_BASE_API getNext ()
 
template<>
fltp08 NDEVR_BASE_API getNext ()
 
template<>
uint04 NDEVR_BASE_API getNext ()
 
template<>
uint02 NDEVR_BASE_API getNext ()
 
template<>
uint01 NDEVR_BASE_API getNext ()
 
template<>
sint02 NDEVR_BASE_API getNext ()
 
template<>
sint04 NDEVR_BASE_API getNext ()
 
template<>
uint04 NDEVR_BASE_API getNextHex ()
 
template<>
sint08 NDEVR_BASE_API getNext ()
 
template<>
char NDEVR_BASE_API getNext ()
 
template<>
sint01 NDEVR_BASE_API getNext ()
 
template<>
bool NDEVR_BASE_API getNext ()
 
template<>
String NDEVR_BASE_API getNext ()
 
template<>
Angle< sint04 > NDEVR_BASE_API getNext ()
 
template<>
Angle< fltp08 > NDEVR_BASE_API getNext ()
 
template<>
RGBColor NDEVR_BASE_API getNext ()
 
template<>
Time NDEVR_BASE_API getNext ()
 

Protected Attributes

String m_current_line
 
File m_file
 
String m_time_format
 
uint08 m_current_line_number
 
uint08 m_current_file_position
 
uint08 m_data_size
 
uint04 m_cur_line_pos
 
uint04 m_cur_column
 
uint04 m_current_line_size
 
char m_delimiter
 
char m_quote_character
 
bool m_ignore_empty_lines
 
bool m_ignore_white_space = false
 
bool m_has_delimiter
 

Constructor & Destructor Documentation

◆ Scanner() [1/2]

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

◆ Scanner() [2/2]

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

◆ ~Scanner()

~Scanner ( )
virtual

Member Function Documentation

◆ currentLine() [1/2]

String & currentLine ( )
inline

◆ currentLine() [2/2]

const String & currentLine ( ) const
inline

◆ dataSize()

uint08 dataSize ( ) const

◆ file()

File file ( ) const
inline

◆ getByteArray()

virtual uint01 * getByteArray ( )
inlinevirtual

Reimplemented in BufferedScanner.

◆ getColumn()

template<class t_type >
t_type getColumn ( uint04 column)
inline

◆ getCurrent()

const char * getCurrent ( ) const

◆ getCurrentFilePosition()

uint08 getCurrentFilePosition ( )

◆ getCurrentLineNumber()

uint08 getCurrentLineNumber ( ) const

◆ getDebugPosition()

TranslatedString getDebugPosition ( ) const

◆ getFilePercent()

fltp04 getFilePercent ( )

◆ getLineLength()

uint04 getLineLength ( ) const

◆ getNext() [1/19]

template<class t_type >
t_type getNext ( )

◆ getNext() [2/19]

template<>
fltp04 NDEVR_BASE_API getNext ( )

◆ getNext() [3/19]

template<>
fltp08 NDEVR_BASE_API getNext ( )

◆ getNext() [4/19]

template<>
uint04 NDEVR_BASE_API getNext ( )

◆ getNext() [5/19]

template<>
uint02 NDEVR_BASE_API getNext ( )

◆ getNext() [6/19]

template<>
uint01 NDEVR_BASE_API getNext ( )

◆ getNext() [7/19]

template<>
sint02 NDEVR_BASE_API getNext ( )

◆ getNext() [8/19]

template<>
sint04 NDEVR_BASE_API getNext ( )

◆ getNext() [9/19]

template<>
sint08 NDEVR_BASE_API getNext ( )

◆ getNext() [10/19]

template<>
char NDEVR_BASE_API getNext ( )

◆ getNext() [11/19]

template<>
sint01 NDEVR_BASE_API getNext ( )

◆ getNext() [12/19]

template<>
bool NDEVR_BASE_API getNext ( )

◆ getNext() [13/19]

template<>
String NDEVR_BASE_API getNext ( )

◆ getNext() [14/19]

template<>
Angle< sint04 > NDEVR_BASE_API getNext ( )

◆ getNext() [15/19]

template<>
Angle< fltp08 > NDEVR_BASE_API getNext ( )

◆ getNext() [16/19]

template<>
RGBColor NDEVR_BASE_API getNext ( )

◆ getNext() [17/19]

template<>
Time NDEVR_BASE_API getNext ( )

◆ getNext() [18/19]

void getNext ( String & next)

◆ getNext() [19/19]

template<class t_type >
t_type getNext ( uint04 count)
inline

◆ getNextHex() [1/2]

template<class t_type >
t_type getNextHex ( )

◆ getNextHex() [2/2]

template<>
uint04 NDEVR_BASE_API getNextHex ( )

◆ hasNext()

bool hasNext ( ) const

◆ isComment()

bool isComment ( char comment) const

◆ linePosition()

uint04 & linePosition ( )
inline

◆ moveForward()

void moveForward ( uint04 distance = 1)

◆ nextLine() [1/2]

bool nextLine ( )
virtual

Reimplemented in BufferedScanner.

◆ nextLine() [2/2]

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

Reimplemented in BufferedScanner.

◆ quoteCharacter()

char quoteCharacter ( ) const
inline

◆ resetLinePosition()

void resetLinePosition ( )

◆ setDelimiter()

void setDelimiter ( char delimiter)

◆ setFilePosition()

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

Reimplemented in BufferedScanner.

◆ setHasDelimiter()

void setHasDelimiter ( const bool has_delimiter)
inline

◆ setIgnoreEmptyLines()

void setIgnoreEmptyLines ( bool ignore_new_lines)
inline

◆ setIgnoreWhiteSpace()

void setIgnoreWhiteSpace ( bool ignore_white_space)
inline

◆ setQuoteCharacter()

void setQuoteCharacter ( char quote_character)
inline

◆ skip()

uint04 skip ( )

◆ skipTo() [1/3]

bool skipTo ( char location,
bool ignore_case = false )

◆ skipTo() [2/3]

bool skipTo ( const Buffer< char > & locations,
bool ignore_case = false )

◆ skipTo() [3/3]

bool skipTo ( const char * location,
bool ignore_case = false )

◆ skipWhiteSpace()

uint04 skipWhiteSpace ( )

Member Data Documentation

◆ m_cur_column

uint04 m_cur_column
protected

◆ m_cur_line_pos

uint04 m_cur_line_pos
protected

◆ m_current_file_position

uint08 m_current_file_position
protected

◆ m_current_line

String m_current_line
protected

◆ m_current_line_number

uint08 m_current_line_number
protected

◆ m_current_line_size

uint04 m_current_line_size
protected

◆ m_data_size

uint08 m_data_size
protected

◆ m_delimiter

char m_delimiter
protected

◆ m_file

File m_file
protected

◆ m_has_delimiter

bool m_has_delimiter
protected

◆ m_ignore_empty_lines

bool m_ignore_empty_lines
protected

◆ m_ignore_white_space

bool m_ignore_white_space = false
protected

◆ m_quote_character

char m_quote_character
protected

◆ m_time_format

String m_time_format
protected

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