Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CMa::Word_int Class Reference

#include <arch_int.h>

List of all members.

Public Methods

 Word_int ()
 Word_int (int i)
 Word_int (const Op::Code &code)
 Word_int (const Int_int &i)
int convertToint () const
Op::Code convertToCode () const


Detailed Description

Machine word class based on type "unsigned int"(unsigned integer). To be used as template parameter.

Implements unsigned integer aritmetics and conversions:

Integer aritmetics is implemented according to specification given by Vesal.

Author:
OM/modified by SL
Status: NOT TESTED/PROBABLY INCORRECT IMPLEMENTATION

TODO: Implement integer/word aritmetic correctly


Constructor & Destructor Documentation

CMa::Word_int::Word_int   [inline]
 

Default value 0.

CMa::Word_int::Word_int int    i [inline, explicit]
 

Construcs word from int. Newer fails.

CMa::Word_int::Word_int const Op::Code   code [inline, explicit]
 

Constructs a word from Op::Code. Assumption: Op::isValid(code).

CMa::Word_int::Word_int const Int_int   i [inline, explicit]
 

Constructs a word from an integer. Newer fails.


Member Function Documentation

Op::Code CMa::Word_int::convertToCode   const [inline]
 

Convets the word to Op::Code. If the word does not represent any valid code, the value X returned will be such, that !Op::isValid(X).

Author:
OM

int CMa::Word_int::convertToint   const [inline]
 

Converts the word to int, if possible. May return incorrect result if the result does not fit into int.


The documentation for this class was generated from the following file:
Generated on Tue Oct 12 03:30:46 1999 by doxygen1.2.18