| OCR Text |
Show Algorithm 1. Saving Objects Wr1te the file header. For each obJect graph in obJect list Search the obJect graph for headers. Write all headers. If object is not written then :31 Write flag bytes , class id, virtual address, and the object. For each pointer data member in object Else If a built-in type or character string Write target data. Else If pointer to a list (r r©' ') then Recurse on each object in the list. else if pointer to single object (r r*'' or r r>' ') Recurse on obJect. Write a reference to the shared object . plJilll.<'r 1o t.lw obj ect clesc r·ip t ior1 i.'-' rC'placecl with tbe type tag of the object and t lw hlock of' memory represent ing t he object is written out. After that, the slot list of the object is traversed and the targets of pointers are saved. If it is a pointer to anoth er object (this is indi cated in structgen, for instance, a pointer of type "*" (s ubobject pointer), ">" (shared object pointer), or a pointer of type '\Cli" (list pointer) .) , then the save routine is recursively invoked, otherwise the target of the poir1tcr is writt en ont. T'be geomet ric models are saved as binary files. The loading process takes a binary file and ba.secl on the synchroni zat ion bytes, it bllilds the obj ect according to Algorithm 2. First the machine informat ion is read. It is decoded and saved in tlw Alph a_! st r<'am t ab!<'. Th<' sha red table and the descr ip tor table in Alplra_] -;1. rl'<Lill ta ble are llushed. Or1 l' IJcotmtering the object !l cacler flag , the object descriptor is read Ill. T his |