merged
This commit is contained in:
parent
18a14d204c
commit
717568b6d0
30 changed files with 4093 additions and 209 deletions
25
simulator_SIC_XE/include/file_reader.h
Normal file
25
simulator_SIC_XE/include/file_reader.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef FILE_READER_H
|
||||
#define FILE_READER_H
|
||||
|
||||
#include "reader.h"
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
|
||||
class FileReader : public Reader {
|
||||
public:
|
||||
explicit FileReader(const std::string &path, std::ios::openmode m = std::ios::binary);
|
||||
~FileReader() override;
|
||||
|
||||
int readByte() override;
|
||||
|
||||
bool readBytes(uint8_t* buf, size_t len) override;
|
||||
std::string readString(size_t len) override;
|
||||
std::string readLine() override;
|
||||
|
||||
bool good() const;
|
||||
|
||||
private:
|
||||
std::ifstream in;
|
||||
};
|
||||
|
||||
#endif // FILE_READER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue