StreamableObjects and StorableObjects are the two main categories of event data objects which can be stored in a CDF event. Both terms refer to C++ classes which have certain properties in common. While technically a StorableObject is always also a StreamableObject, the term StreamableObjects is used here to refer to classes which are Streamable but not Storable.
StorableObject classes have more requirements imposed on them than StreamableObject classes. All StorableObject classes ultimately derive from the class StorableObject. They must be manipulated through Handles (pointer-like classes) in order to enforce resource management policy. See the description of StorableObjects for more details.
StreamableObject classes have fewer requirements imposed on them. They do not even have to inherit from StreamableObject. They can be manipulated directly, as local variables for instance. See the description of StreamableObjects for more details. Only StorableObjects can be stored and searched for directly in a CDF event. StreamableObjects must be contained by a StorableObject in order to be stored in the EventRecord. They cannnot be searched for directly, but must be found by first finding their containing StorableObject.
Because classes do not have to inherit from StreamableObject in order to be streamable, it may appear that there is a third category of objects in addition to Streamable and Storable. This is not the case. Classes which provide the necessary methods for streaming, but do not inherit from the StreamableObject class, are functionally the same as StreamableObject child classes. By avoiding the inheritance, they may gain a little in performance since they can avoid virtual methods altogether.
Comments on this page may be sent to Rob Kennedy