Implementation of writeObject
- Let T be an associative table mapping objects to integer values.
- If T has an association for object o, then o has been sent before.
- To write an object o:
- If exists i such that (o, i) belongs to T, write i.
- Otherwise:
- assigns an identifier i to the object o.
- Add o->i to T.
- write recursively all the fields of o.
- 7 -