28 lines
562 B
C++
28 lines
562 B
C++
#ifndef LOADER_H
|
|
#define LOADER_H
|
|
#include <iostream>
|
|
|
|
class Machine;
|
|
|
|
class Loader
|
|
{
|
|
private:
|
|
Machine* machine;
|
|
|
|
public:
|
|
Loader();
|
|
// Prebere niz dolžine len
|
|
std::string readString(std::istream &in, int len);
|
|
|
|
// Prebere en bajt (2 heksadecimalni znaka)
|
|
int readByte(std::istream &in);
|
|
|
|
// Prebere eno "besedo" (3 bajte = 6 heksadecimalnih znakov)
|
|
int readWord(std::istream &in);
|
|
|
|
bool loadSection(Machine& machine, std::istream& stream);
|
|
|
|
bool loadObj(Machine& machine, const std::string& filename);
|
|
};
|
|
|
|
#endif // LOADER_H
|