spo/ass2/FileDevice.h
2025-11-27 08:17:43 +01:00

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