merged
This commit is contained in:
parent
18a14d204c
commit
717568b6d0
30 changed files with 4093 additions and 209 deletions
22
simulator_SIC_XE/include/string_reader.h
Normal file
22
simulator_SIC_XE/include/string_reader.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef STRING_READER_H
|
||||
#define STRING_READER_H
|
||||
|
||||
#include "reader.h"
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
class StringReader : public Reader {
|
||||
public:
|
||||
explicit StringReader(const std::string &s);
|
||||
~StringReader() override;
|
||||
|
||||
int readByte() override;
|
||||
bool readBytes(uint8_t* buf, size_t len) override;
|
||||
std::string readString(size_t len) override;
|
||||
std::string readLine() override;
|
||||
|
||||
private:
|
||||
std::istringstream in;
|
||||
};
|
||||
|
||||
#endif // STRING_READER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue