34#include <NDEVR/File.h>
35#include <NDEVR/String.h>
39 class TranslatedString;
46 void setDelimiter(
char delimiter);
47 uint08 getCurrentLineNumber()
const;
48 uint08 getCurrentFilePosition();
50 virtual bool nextLine();
51 virtual bool nextLine(
String&
string,
bool clear_string =
true);
54 const char* getCurrent()
const;
55 void moveForward(
uint04 distance = 1);
56 bool isComment(
char comment)
const;
57 uint04 getLineLength()
const;
59 bool skipTo(
char location,
bool ignore_case =
false);
60 bool skipTo(
const Buffer<char>& locations,
bool ignore_case =
false);
61 bool skipTo(
const char* location,
bool ignore_case =
false);
63 void resetLinePosition();
64 void setHasDelimiter(
const bool has_delimiter) { m_has_delimiter = has_delimiter; }
69 template<
class t_type>
72 void getNext(
String& next);
74 template<
class t_type>
77 template<
class t_type>
80 char* start = &m_current_line[m_cur_line_pos];
83 m_cur_line_pos += count;
88 template<
class t_type>
91 if (m_cur_column > column)
97 for (
uint04 i = m_cur_column; i < column; i++)
99 return getNext<t_type>();
106 virtual void setFilePosition(
uint08 file_position,
bool read_line =
true);
110 return (
uint01*)&m_current_line[m_cur_line_pos];
126 bool m_ignore_white_space =
false;
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
OpenMode
Definition File.h:50
virtual uint01 * getByteArray()
Definition Scanner.h:108
void setHasDelimiter(const bool has_delimiter)
Definition Scanner.h:64
uint08 m_current_file_position
Definition Scanner.h:118
String m_time_format
Definition Scanner.h:116
uint08 m_current_line_number
Definition Scanner.h:117
bool m_ignore_empty_lines
Definition Scanner.h:125
uint04 m_current_line_size
Definition Scanner.h:122
void setQuoteCharacter(char quote_character)
Definition Scanner.h:66
uint08 m_data_size
Definition Scanner.h:119
uint04 & linePosition()
Definition Scanner.h:65
char m_delimiter
Definition Scanner.h:123
String m_current_line
Definition Scanner.h:114
void setIgnoreEmptyLines(bool ignore_new_lines)
Definition Scanner.h:104
char quoteCharacter() const
Definition Scanner.h:67
File file() const
Definition Scanner.h:68
File m_file
Definition Scanner.h:115
const String & currentLine() const
Definition Scanner.h:52
uint04 m_cur_line_pos
Definition Scanner.h:120
uint04 m_cur_column
Definition Scanner.h:121
void setIgnoreWhiteSpace(bool ignore_white_space)
Definition Scanner.h:105
t_type getNext(uint04 count)
Definition Scanner.h:78
t_type getColumn(uint04 column)
Definition Scanner.h:89
char m_quote_character
Definition Scanner.h:124
String & currentLine()
Definition Scanner.h:53
bool m_has_delimiter
Definition Scanner.h:127
t_type getAs() const
Definition String.h:334
Definition TranslatedString.h:9
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:98
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer -Can represent exact integer values 0 thro...
Definition BaseValues.hpp:132
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120