34#include <NDEVR/File.h>
35#include <NDEVR/String.h>
39 class TranslatedString;
63 bool skipTo(
char location,
bool ignore_case =
false);
65 bool skipTo(
const char* location,
bool ignore_case =
false);
68 void setHasDelimiter(
const bool has_delimiter) { m_has_delimiter = has_delimiter; }
73 template<
class t_type>
78 template<
class t_type>
81 template<
class t_type>
84 char* start = &m_current_line[m_cur_line_pos];
87 m_cur_line_pos += count;
92 template<
class t_type>
95 if (m_cur_column > column)
101 for (
uint04 i = m_cur_column; i < column; i++)
103 return getNext<t_type>();
114 return (
uint01*)&m_current_line[m_cur_line_pos];
130 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:56
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
OpenMode
Definition File.h:51
Contains methods for easily reading objects in an ascii stream.
Definition Scanner.h:45
const char * getCurrent() const
void getNext(String &next)
uint04 getLineLength() const
virtual uint01 * getByteArray()
Definition Scanner.h:112
virtual void setFilePosition(uint08 file_position, bool read_line=true)
void setHasDelimiter(const bool has_delimiter)
Definition Scanner.h:68
Scanner(const File &file, char delimiter='|', File::OpenMode mode=File::e_ascii_read)
bool skipTo(const char *location, bool ignore_case=false)
uint08 m_current_file_position
Definition Scanner.h:122
String m_time_format
Definition Scanner.h:120
TranslatedString getDebugPosition() const
uint08 m_current_line_number
Definition Scanner.h:121
void moveForward(uint04 distance=1)
bool m_ignore_empty_lines
Definition Scanner.h:129
uint04 m_current_line_size
Definition Scanner.h:126
void setQuoteCharacter(char quote_character)
Definition Scanner.h:70
bool skipTo(char location, bool ignore_case=false)
bool isComment(char comment) const
uint08 m_data_size
Definition Scanner.h:123
uint04 & linePosition()
Definition Scanner.h:69
Scanner(const String &string, char delimiter='|')
void setDelimiter(char delimiter)
char m_delimiter
Definition Scanner.h:127
String m_current_line
Definition Scanner.h:118
void setIgnoreEmptyLines(bool ignore_new_lines)
Definition Scanner.h:108
bool skipTo(const Buffer< char > &locations, bool ignore_case=false)
char quoteCharacter() const
Definition Scanner.h:71
File file() const
Definition Scanner.h:72
File m_file
Definition Scanner.h:119
const String & currentLine() const
Definition Scanner.h:56
uint04 m_cur_line_pos
Definition Scanner.h:124
uint04 m_cur_column
Definition Scanner.h:125
void setIgnoreWhiteSpace(bool ignore_white_space)
Definition Scanner.h:109
t_type getNext(uint04 count)
Definition Scanner.h:82
uint08 getCurrentLineNumber() const
uint08 getCurrentFilePosition()
virtual bool nextLine(String &string, bool clear_string=true)
t_type getColumn(uint04 column)
Definition Scanner.h:93
char m_quote_character
Definition Scanner.h:128
String & currentLine()
Definition Scanner.h:57
bool m_has_delimiter
Definition Scanner.h:131
The core String class for the NDEVR API.
Definition String.h:69
t_type getAs() const
Converts a string into an object. To use this function an object must have overwritten StringStream<t...
Definition String.h:143
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
Definition BaseValues.hpp:106
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96