20: Passing Arguments
- Operation arguments are, by default, passed by unprotected reference. That is, the operation receives a reference to the argument's object. The operation may modify the object referred to.
- You may specify a passage for each argument to provide added protection
- Copied
- When an operation is called using a copied argument (specified by the "copied" keyword), the operation copies the object in the argument and works on the copy instead of the original.
- Protected/unprotected
- Arguments are, by default, unprotected. That is, the operation can modify the object supplied in the argument.
- The "protected" keyword provides a protected reference to the object. This protects the object used in the argument so the operation can read the object, but can't modify it.
- All attributes of an object for which you hold a protected reference return protected values.
- Note that a reference to a locked object's nested objects can only be a protected reference, no matter how you specify the reference. The reference to the locked object itself allows very limited change to the object such as ownership change.
- Owned
- This passage transfers ownership from the requester to the responder. (Ownership is discussed in detail in the Processes section.)
TS Ref - 26 JUN 1996
Generated by the sweat of Mike Boom's brow.