delpi
0.0.1
DElta-complete LP solver
Toggle main menu visibility
Loading...
Searching...
No Matches
BufferLineSource.h
Go to the documentation of this file.
1
8
#pragma once
9
10
#include <string>
11
#include <string_view>
12
13
namespace
delpi
{
14
25
class
BufferLineSource {
26
public
:
27
explicit
BufferLineSource(
const
std::string_view data) :
cur_
(data.data()),
end_
(data.data() + data.size()) {}
28
BufferLineSource(
const
char
*data, std::size_t length);
29
38
bool
nextLine
(std::string_view &out);
39
40
protected
:
46
void
initialize
(
const
char
*data, std::size_t length);
47
48
private
:
49
const
char
*
cur_
;
50
const
char
*
end_
;
51
};
52
53
}
// namespace delpi
delpi::BufferLineSource::end_
const char * end_
Pointer to the end of the buffer.
Definition
BufferLineSource.h:50
delpi::BufferLineSource::cur_
const char * cur_
Pointer to the current position in the buffer.
Definition
BufferLineSource.h:49
delpi::BufferLineSource::initialize
void initialize(const char *data, std::size_t length)
Force a reinitialization of the object, setting cur_ and end_ to the new values.
Definition
BufferLineSource.cpp:28
delpi::BufferLineSource::nextLine
bool nextLine(std::string_view &out)
Retrieve the next line from the buffer.
Definition
BufferLineSource.cpp:16
delpi
Global namespace for the delpi library.
delpi
parser
BufferLineSource.h
Generated by
1.17.0