-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbase_reg.h
More file actions
40 lines (28 loc) · 765 Bytes
/
Copy pathbase_reg.h
File metadata and controls
40 lines (28 loc) · 765 Bytes
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
#ifndef _BASE_REG_H
#define _BASE_REG_H
#include "common.h"
#include "base_parameter.h"
#pragma once
class base_reg : public base_parameter
{
public:
base_reg(void);
~base_reg(void);
base_reg(int *);
virtual void setprotected(bool b);
virtual bool isprotected(void);
void _setprotected(bool b){_protected=b;};
bool _isprotected(void){return _protected;};
void setvalue(int *a){_value=a;};
virtual unsigned int value(void){return *_value;};
virtual void value(unsigned int a){*_value=a;sethasvalue(true);};
virtual char *tostr(){return regs::regs_name[_reg];};
void reg_id(regs::regs a){_reg=a;};
regs::regs reg_id(){return _reg;};
virtual base_reg* copy();
protected:
//Set where is the value!
int *_value;
regs::regs _reg;
};
#endif