19 lines
No EOL
367 B
C++
19 lines
No EOL
367 B
C++
#ifndef FILE_DEVICE_H
|
|
#define FILE_DEVICE_H
|
|
|
|
#include "device.h"
|
|
#include <fstream>
|
|
#include <string>
|
|
|
|
class FileDevice : public Device {
|
|
public:
|
|
explicit FileDevice(const std::string &filename);
|
|
~FileDevice();
|
|
unsigned char read() override;
|
|
void write(unsigned char value) override;
|
|
|
|
private:
|
|
std::fstream fileStream;
|
|
};
|
|
|
|
#endif // FILE_DEVICE_H
|