#include <SIG_Register.h>
Public Methods | |
SIG_Register (int size) throw (SIG_RegisterWrongSizeException) | |
Constructs a register with size bits. More... | |
void | copyReg (SIG_Register const& otherRegister) |
Copies the value of the supplied SIG_Register into this SIG_Register. More... | |
void | addReg (SIG_Register const& otherRegister) |
Adds the value of the supplied SIG_Register to this SIG_Register's value. More... | |
void | subReg (SIG_Register const& otherRegister) |
Substracts the value of the supplied SIG_Register from this SIG_Register's value. More... | |
void | loadValue (int newValue) |
Sets this SIG_Register's value to newValue. More... | |
void | mulReg (SIG_Register const& otherRegister) |
Multiplies this SIG_Register's value with the supplied ones. More... | |
void | divReg (SIG_Register const& otherRegister) |
Divides this SIG_Register's value by the supplied ones. More... | |
void | minReg (SIG_Register const& otherRegister) |
Sets this SIG_Register's value to the minimum of value and otherRegister.value. More... | |
void | maxReg (SIG_Register const& otherRegister) |
Sets this SIG_Register's value to the maximum of value and otherRegister.value. More... | |
void | modReg (SIG_Register const& otherRegister) |
Modulo-divides this SIG_Register's value by the supplied ones. More... | |
int | getValue () const |
int | getSize () const |
Returns the size of the register. More... | |
int | getMaxValue () const |
Returns the maximal value the register is able to hold. More... | |
int | getMinValue () const |
Returns the minimal value the register is able to hold. More... | |
Private Methods | |
void | makeValid () |
Produces the condition that ![]() | |
Private Attributes | |
int | value |
The value of the Register. More... | |
int | size |
The size of this SIG_Register in bits. More... |
The interpreter holds an QVector of Registers. At the moment every register is an integer value that holds the condition
.
Definition at line 16 of file SIG_Register.h.
|
Constructs a register with size bits.
Definition at line 4 of file SIG_Register.cpp. |
|
Adds the value of the supplied SIG_Register to this SIG_Register's value.
Definition at line 33 of file SIG_Register.cpp. |
|
Copies the value of the supplied SIG_Register into this SIG_Register.
Definition at line 27 of file SIG_Register.cpp. |
|
Divides this SIG_Register's value by the supplied ones. The result is rounded toward zero.
Definition at line 57 of file SIG_Register.cpp. |
|
Returns the maximal value the register is able to hold.
Definition at line 109 of file SIG_Register.cpp. |
|
Returns the minimal value the register is able to hold.
Definition at line 114 of file SIG_Register.cpp. |
|
Returns the size of the register.
Definition at line 104 of file SIG_Register.cpp. |
|
Definition at line 99 of file SIG_Register.cpp. |
|
Sets this SIG_Register's value to newValue.
Definition at line 45 of file SIG_Register.cpp. |
|
Produces the condition that
In the case
Definition at line 14 of file SIG_Register.cpp. Referenced by addReg(), divReg(), loadValue(), modReg(), mulReg(), and subReg(). |
|
Sets this SIG_Register's value to the maximum of value and otherRegister.value.
Definition at line 73 of file SIG_Register.cpp. |
|
Sets this SIG_Register's value to the minimum of value and otherRegister.value.
Definition at line 66 of file SIG_Register.cpp. |
|
Modulo-divides this SIG_Register's value by the supplied ones.
Definition at line 80 of file SIG_Register.cpp. |
|
Multiplies this SIG_Register's value with the supplied ones.
Definition at line 51 of file SIG_Register.cpp. |
|
Substracts the value of the supplied SIG_Register from this SIG_Register's value.
Definition at line 39 of file SIG_Register.cpp. |
|
The size of this SIG_Register in bits.
Definition at line 182 of file SIG_Register.h. |
|
The value of the Register.
It is always Definition at line 177 of file SIG_Register.h. |