Repository navigation
Expand file tree
/
Copy pathram.h
More file actions
60 lines (46 loc) · 1.32 KB
/
Copy pathram.h
File metadata and controls
60 lines (46 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef RAM_H
#define RAM_H
#include "stdint.h"
#include <string>
#include <QObject>
#include <QEventLoop>
#include <stxxl/vector>
#define sint int32_t
typedef stxxl::VECTOR_GENERATOR<sint>::result vector;
class RAM : public QObject
{
Q_OBJECT
signals:
void setCtxtProperty(const QString &name, const QVariant &data);
void setGuiProperty(const QString &name, const QVariant &data);
public:
RAM(QObject &appMgr);
/** returns the value inside the RAM at the specified location*/
sint getValueAt(sint addr);
/** stores the given value inside the RAM at the specified location*/
void setValueAt(sint addr, sint value);
/** returns the address range*/
sint getMaxAddress();
/** prints out a certain range of the RAM for deugging purposes*/
void debugRam();
void toggleHexDisplay(bool newState);
void toggleAnimations(bool newState);
void setRamViewAddress(int index, QString action);
void reset();
private:
vector memory;
sint addressView1;
sint addressView2;
bool formatHex;
bool doAnimations;
bool continueAnim;
bool idle;
bool followActive;
void updateList();
void highlightCell(sint addr);
bool addressInSight(sint addr);
public slots:
void stepAnimation();
void toggleFollowActive(const bool &newState);
};
#endif // RAM_H