implemented rfile reading
This commit is contained in:
parent
ba18b92116
commit
5d2a0f867c
5 changed files with 107 additions and 0 deletions
19
simulator_SIC_XE/include/file_reader.h
Normal file
19
simulator_SIC_XE/include/file_reader.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
#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;
|
||||
|
||||
bool good() const;
|
||||
|
||||
private:
|
||||
std::ifstream in;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue