#include <type.h>
Inheritance diagram for type_array:
Public Member Functions | |
type_array () | |
const uchar | get_num_dims (void) |
void | set_num_dims (uint ndim) |
const uint | get_array_size (void) |
void | set_array__ize (uint s) |
const pTypeRange | get_array_range (void) |
void | set_array_range (pTypeRange r) |
const pType | get_array_base_type (void) |
void | set_array_base_type (pType tBase) |
const uint | get_ty_kind (void) |
Private Attributes | |
uchar | num_dims |
uint | size |
pTypeRange | range |
pType | base_type |
A multi-dimensional array is an "array of array". As a result, a multi-dimensional array is a recursive data structure. The current "top" represents the current highest dimension.
A note on array indexes:
If array A has three dimension, it will be index by A(k, j, i). Incrementing "i" will reference sequential array elements. So, assuming that all bounds start at zero, the index expression will be
index = i + ((j + (k * size_dim2)) * size_dim2)?? Should the "delta" from zero also be included here, to aid in generating code for index expressions. ??
Definition at line 424 of file type.h.
Constructor & Destructor Documentation
|
Definition at line 432 of file type.h. References base_type, NULL, num_dims, range, and size.
|
|
Reimplemented from type. Definition at line 467 of file type.h. References base_type.
00468 { 00469 return base_type; 00470 } |
|
Reimplemented from type. Definition at line 458 of file type.h. References range.
00459 { 00460 return range; 00461 } |
|
Reimplemented from type. Definition at line 449 of file type.h.
00450 { 00451 return size; 00452 } |
|
Reimplemented from type. Definition at line 440 of file type.h. References num_dims, and uchar.
00441 { 00442 return num_dims; 00443 } |
|
Reimplemented from type. Definition at line 476 of file type.h. References ty_array, and uint.
00477 { 00478 return ty_array; 00479 } |
|
Definition at line 453 of file type.h. References size.
00454 { 00455 size = s; 00456 } |
|
Reimplemented from type. Definition at line 471 of file type.h. References base_type.
00472 { 00473 base_type = tBase; 00474 } |
|
Reimplemented from type. Definition at line 462 of file type.h. References range.
00463 { 00464 range = r; 00465 } |
|
Reimplemented from type. Definition at line 444 of file type.h. References num_dims, and uchar.
|
|
Definition at line 429 of file type.h. Referenced by get_array_base_type(), set_array_base_type(), and type_array(). |
|
Definition at line 426 of file type.h. Referenced by get_num_dims(), set_num_dims(), and type_array(). |
|
Definition at line 428 of file type.h. Referenced by get_array_range(), set_array_range(), and type_array(). |
|
Definition at line 427 of file type.h. Referenced by get_array_size(), set_array__ize(), and type_array(). |