next up previous contents
Next: Floating Point Type Info Up: The Floating Point Type Previous: Floating Point Type Info

Floating Point Type Info Methods

Methods Description
'Class_Name'() Constructor to initialise the variables of the base classes. Note, the bounds of the integer type must be locally static. Therefore, they can be determined at compile time.
static double left() Returns the left bound of the integer type. Corresponds to the ``left'' VHDL attribute.
static double right() Returns the right bound of the integer type. Corresponds to the ``right'' VHDL attribute.
static double low() Returns the low bound of the integer type. Corresponds to the ``low'' VHDL attribute.
static double high() Returns the high bound of the integer type. Corresponds to the ``high'' VHDL attribute.
   

Example:

TYPE myreal IS INTEGER -1.0 TO 1.0;
is converted into the following type info class
class L3lib_Q4pack_I6myreal : integer_info_base {
  public:
   static double low() { return -1.0; };
   static double high() { return 1.0; }
   static double left() { return 1.0; }
   static double right() { return -1.0; }

   L3lib_Q4pack_I6myreal() : 
      integer_info_base(low(), high(), left(), right()) { }; 
   }
};


next up previous contents
Next: Floating Point Type Info Up: The Floating Point Type Previous: Floating Point Type Info

1998-11-17