created basic simulator
This commit is contained in:
parent
8c02a9e950
commit
5a06b2bc0b
12 changed files with 541 additions and 0 deletions
22
ass2/FileDevice.h
Normal file
22
ass2/FileDevice.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue