Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

type_range Class Reference

Range types are limited to a complete range that can fit in 32-bits. More...

#include <type.h>

Inheritance diagram for type_range:

Inheritance graph
[legend]
Collaboration diagram for type_range:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 type_range ()
void set_lhs (int l)
const int get_lhs (void)
void set_rhs (int r)
const int get_rhs (void)
void set_dir (uint dir)
const uint get_dir (void)
void set_range (int l, int r, uint dir)
void set_box (void)
void unset_box (void)
const Boolean is_box (void)
const uint get_ty_kind (void)

Private Attributes

int lhs
 left hand side of the range

int rhs
 right hand side of range

uint direction: 2
uint unconstrained: 1
uint unused: 29

Detailed Description

Range types are limited to a complete range that can fit in 32-bits.

(e.g., 0..(2^32)-1 or -(2^31) .. (02^31)-1. This cannot represent ranges like TIME (defined in the standard library). The TIME range requires 64 bits (e.g., the range of time is 0..2^60). A special type is provided for this range (we'll see if this special type was a bad idea or not).

Definition at line 320 of file type.h.


Constructor & Destructor Documentation

type_range::type_range  )  [inline]
 

Definition at line 331 of file type.h.

References bad_range_dir, direction, FALSE, lhs, rhs, and unconstrained.

00331                  : type()
00332     {
00333         lhs = 0;
00334         rhs = 0;
00335         direction = bad_range_dir;
00336         unconstrained = FALSE;
00337     }


Member Function Documentation

const uint type_range::get_dir void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 360 of file type.h.

References direction, and uint.

00361     { 
00362         return direction; 
00363     }

const int type_range::get_lhs void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 342 of file type.h.

References lhs.

00343     { 
00344         return lhs; 
00345     }

const int type_range::get_rhs void   )  [inline]
 

Reimplemented from type.

Definition at line 351 of file type.h.

References rhs.

00352     { 
00353         return rhs; 
00354     }

const uint type_range::get_ty_kind void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 385 of file type.h.

References ty_range, and uint.

00386     {
00387         return ty_range;
00388     }

const Boolean type_range::is_box void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 380 of file type.h.

References Boolean, and unconstrained.

00381     { 
00382         return unconstrained; 
00383     }

void type_range::set_box void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 372 of file type.h.

References TRUE, and unconstrained.

00373     { 
00374         unconstrained = TRUE; 
00375     }

void type_range::set_dir uint  dir  )  [inline, virtual]
 

Reimplemented from type.

Definition at line 356 of file type.h.

References direction.

Referenced by set_range().

00357     { 
00358         direction = dir; 
00359     }

void type_range::set_lhs int  l  )  [inline, virtual]
 

Reimplemented from type.

Definition at line 338 of file type.h.

References lhs.

Referenced by set_range().

00339     { 
00340         lhs = l; 
00341     }

void type_range::set_range int  l,
int  r,
uint  dir
[inline, virtual]
 

Reimplemented from type.

Definition at line 365 of file type.h.

References set_dir(), set_lhs(), and set_rhs().

00366     {
00367         set_lhs( l );
00368         set_rhs( r );
00369         set_dir( dir );
00370     }

void type_range::set_rhs int  r  )  [inline, virtual]
 

Reimplemented from type.

Definition at line 347 of file type.h.

References rhs.

Referenced by set_range().

00348     { 
00349         rhs = r; 
00350     }

void type_range::unset_box void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 376 of file type.h.

References FALSE, and unconstrained.

00377     { 
00378         unconstrained = FALSE; 
00379     }


Member Data Documentation

uint type_range::direction [private]
 

Definition at line 326 of file type.h.

Referenced by get_dir(), set_dir(), and type_range().

int type_range::lhs [private]
 

left hand side of the range

Definition at line 323 of file type.h.

Referenced by get_lhs(), set_lhs(), and type_range().

int type_range::rhs [private]
 

right hand side of range

Definition at line 325 of file type.h.

Referenced by get_rhs(), set_rhs(), and type_range().

uint type_range::unconstrained [private]
 

Definition at line 326 of file type.h.

Referenced by is_box(), set_box(), type_range(), and unset_box().

uint type_range::unused [private]
 

Definition at line 326 of file type.h.


The documentation for this class was generated from the following file:
Generated on Wed Mar 31 21:16:13 2004 for Data Structures for a VHDL Compiler by doxygen 1.3.3