#include <type.h>
Inheritance diagram for type_record:
Public Member Functions | |
type_record () | |
void | dealloc () |
const uint | get_rec_size (void) |
void | put_rec_size (uint s) |
pSym | find_elem (STRING name) |
void | add_elem (pSym sym) |
const uint | get_ty_kind (void) |
Private Attributes | |
uint | size |
FIFO_LIST< pSym > | elem_list |
Note that this means that when the type is created, the elements must be added in correct order.
The record elements are represented by symbol objects. Note, however, that these objects are _not_ entered in the symbol table. A record element can only be accessed via its base base, so these names exist only in the scope of the base name.
Definition at line 496 of file type.h.
|
Definition at line 503 of file type.h. References size.
|
|
Reimplemented from type. Definition at line 527 of file type.h. References FIFO_LIST< pSym >::add(), and elem_list.
|
|
Reimplemented from type. Definition at line 509 of file type.h. References FIFO_LIST< pSym >::dealloc(), and elem_list.
|
|
Reimplemented from type. Definition at line 5 of file type.C. References elem_list, FIFO_LIST< pSym >::first(), FIFO_LIST< pSym >::get_item(), sym::get_name(), STRING::GetText(), FIFO_LIST< pSym >::next(), and NULL.
00006 { 00007 FIFO_LIST<pSym>::handle h; 00008 pSym elem_sym; 00009 pSym tmp; 00010 00011 elem_sym = NULL; 00012 for (h = elem_list.first(); h != NULL; h = elem_list.next( h )) { 00013 tmp = elem_list.get_item( h ); 00014 if (tmp->get_name().GetText() == name.GetText()) { 00015 elem_sym = tmp; 00016 break; 00017 } 00018 } 00019 return elem_sym; 00020 } // find_elem |
|
Reimplemented from type. Definition at line 515 of file type.h.
00516 { 00517 return size; 00518 } |
|
Reimplemented from type. Definition at line 532 of file type.h. References ty_record, and uint.
00533 { 00534 return ty_record; 00535 } |
|
Reimplemented from type. Definition at line 519 of file type.h. References size.
00520 { 00521 size = s; 00522 } |
|
Definition at line 500 of file type.h. Referenced by add_elem(), dealloc(), and find_elem(). |
|
Definition at line 499 of file type.h. Referenced by get_rec_size(), put_rec_size(), and type_record(). |