added reading start
This commit is contained in:
parent
5d2a0f867c
commit
d438feb9ee
7 changed files with 128 additions and 4 deletions
|
|
@ -1,4 +1,6 @@
|
|||
#pragma once
|
||||
#ifndef READER_H
|
||||
#define READER_H
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
|
||||
|
|
@ -12,4 +14,8 @@ public:
|
|||
virtual bool readBytes(uint8_t* buf, size_t len) = 0;
|
||||
// read up to len bytes into a std::string; may return shorter string on EOF
|
||||
virtual std::string readString(size_t len) = 0;
|
||||
};
|
||||
// read a line (up to newline), return empty string on EOF
|
||||
virtual std::string readLine() = 0;
|
||||
};
|
||||
|
||||
#endif // READER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue