CACAO
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
Value Class Reference

Represents the result of the addition of a certain IR-variable with a certain constant. More...

Inheritance diagram for Value:
InsertOnlyNamedEntry< Value > NamedEntry< Value >

Public Member Functions

s4 variable () const
 
s4 constant () const
 
bool isUnknown () const
 
void addConstant (s4 constant)
 Adds a constant to this value. More...
 
void subtractConstant (s4 constant)
 Subtracts a constant from this value. More...
 

Static Public Member Functions

static Value newAddition (s4 variable, s4 constant)
 
static Value newUnknown ()
 

Private Member Functions

 Value (s4 variable, s4 constant)
 Initializes this value with (variable + constant). More...
 

Private Attributes

s4 _variable
 
s4 _constant
 

Detailed Description

Represents the result of the addition of a certain IR-variable with a certain constant.

The addition may overflow.

Definition at line 36 of file Value.hpp.

Constructor & Destructor Documentation

Value::Value ( s4  variable,
s4  constant 
)
inlineprivate

Initializes this value with (variable + constant).

Definition at line 44 of file Value.hpp.

Member Function Documentation

void Value::addConstant ( s4  constant)
inline

Adds a constant to this value.

If this value is "unknown", it stays unknown.

Definition at line 99 of file Value.hpp.

s4 Value::constant ( ) const
inline

Definition at line 89 of file Value.hpp.

bool Value::isUnknown ( ) const
inline

Definition at line 94 of file Value.hpp.

Value Value::newAddition ( s4  variable,
s4  constant 
)
inlinestatic

Definition at line 72 of file Value.hpp.

Value Value::newUnknown ( )
inlinestatic

Definition at line 78 of file Value.hpp.

void Value::subtractConstant ( s4  constant)
inline

Subtracts a constant from this value.

If this value is "unknown", it stays unknown.

Definition at line 108 of file Value.hpp.

s4 Value::variable ( ) const
inline

Definition at line 83 of file Value.hpp.

Field Documentation

s4 Value::_constant
private

Definition at line 39 of file Value.hpp.

s4 Value::_variable
private

Definition at line 38 of file Value.hpp.


The documentation for this class was generated from the following file: