initial register implementation
This commit is contained in:
21
emulator/components/Register.cpp
Normal file
21
emulator/components/Register.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// Created by black on 12.06.25.
|
||||
//
|
||||
|
||||
#include "Register.h"
|
||||
|
||||
|
||||
Register* Register::getInstance() {
|
||||
if (m_instance == nullptr) {
|
||||
m_instance = new Register();
|
||||
} else {
|
||||
m_instance = new Register();
|
||||
}
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
void Register::setRegister() {
|
||||
}
|
||||
|
||||
int Register::getRegister(int r) {
|
||||
}
|
||||
30
emulator/components/Register.h
Normal file
30
emulator/components/Register.h
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// Created by black on 12.06.25.
|
||||
//
|
||||
|
||||
#ifndef REGISTER_H
|
||||
#define REGISTER_H
|
||||
|
||||
|
||||
|
||||
class Register {
|
||||
|
||||
private:
|
||||
Register() = default;
|
||||
|
||||
static Register *m_instance;
|
||||
|
||||
public:
|
||||
static Register* getInstance();
|
||||
|
||||
void setRegister();
|
||||
|
||||
int getRegister(int r);
|
||||
|
||||
};
|
||||
|
||||
Register *Register::m_instance = nullptr;
|
||||
|
||||
|
||||
|
||||
#endif //REGISTER_H
|
||||
Reference in New Issue
Block a user