Marshaling wrappers are used to control the dumping technique used for individual objects during by-reference marshaling. SST provides three wrappers suitable for general use.
These wrappers are made available through extensions to Object:
Wrappers are typically used for defining the marshaling of message arguments at the point of sending or of the return value at the point of return. For example, suppose anArray is to be passed as the argument in the foo: message to some remoteObject (for example, remoteObject foo: anArray). Normally, arrays are considered mutable and are passed by reference. If you want anArray to go as a shallow copy, simply wrap it in a shallow value wrapper (for example, remoteObject foo: anArray sstAsShallowValue). Wrappers can also be nested.
If you use value wrappers, also note that objects dumped by value do not maintain identity outside the object subgraph of which they are a part. In contrast to the by-value marshaling behavior where the same object passed as the first and second arguments are identical at the receiver, if both the first and second are wrapped with separate deep or shallow wrappers, they will not be identical at the receiver. Objects within a particular value wrapped subgraph do however maintain identity (assuming they are not further wrapped).