22 lines
397 B
C++
22 lines
397 B
C++
#ifndef FILEDEVICE_H
|
|
#define FILEDEVICE_H
|
|
|
|
#include "Device.h"
|
|
#include <fstream>
|
|
#include <string>
|
|
|
|
class FileDevice : public Device {
|
|
private:
|
|
std::string filename;
|
|
std::fstream file;
|
|
|
|
public:
|
|
FileDevice(const std::string& fname);
|
|
~FileDevice();
|
|
|
|
bool test() const override;
|
|
uint8_t read() override;
|
|
void write(uint8_t value) override;
|
|
};
|
|
|
|
#endif // FILEDEVICE_H
|