Storing a compound object, which contains other objects, is more difficult than storing a non compound object. Component objects must be stored first, followed by the containing object.
As part of the process of storing components, one or more head streams are created, with corresponding stream IDs. A store map is used to hold the associations between the in-memory component objects and their associated stream IDs.
The protocol for storing a compound object can be summarized:
construct a store map
store the components, and store their pointer/stream ID associations in the store map
store the containing object, using the store map to store the stream IDs of its components)
delete the store map.