ContainerDevice |
|
|
AppendAvailablePackages CopyBetweenContainerDevices CopyToContainerDevice FileInContainer MakeChoiceList MakeContainerDeviceList PreflightAnnouncement ReadPackageInfo ShowOptions WritePackageInfo |
|
ContainsNewObjects HandlesBackups HandlesCopying HandlesFiling Image Shelf SlowDevice WriteProtected Writeable |
| Field | Type | |
|---|---|---|
| ContainerDevice: | shelf: | Viewable |
| containsNewObjects: | Boolean | |
| writeable: | Boolean |
#endif Define Class ContainerDevice; // defines the storage server interface for the UI // (e.g. StoreroomShelf, Lamp's FilingWindow) mixes in with Object; field shelf: Viewable, weak, getter, setter; // StoreroomShelf field containsNewObjects: Boolean, getter; field writeable: Boolean, getter, setter; // Checks to see if the card technology can be written, // regardless of the CardLockswitchState attribute Image: Image, readOnly, noGetter; // icon attribute Shelf: Viewable; attribute ContainsNewObjects: Boolean; // note: any subclass that could return true from _ContainsNewObjects // or does not override FileInContainer intrinsic MakeContainerDeviceList(listToFill: ObjectList; operation: OperationNumber); // adds to <listToFill> all container devices // that meet criteria specified by <operation> operation ReadPackageInfo(package: PackageCluster): Boolean, noMethod; // fill in citation/target/etc of installedPackage, // or return false if feature not supported operation WritePackageInfo(package: PackageCluster), noMethod; // write out info to containerDevice (e.g. disk or link) operation MakeChoiceList(resultList: ObjectList); operation FileInContainer(objectToBeFiled: Object; moveFlag: Boolean; subContainer: Object): Object; operation CopyBetweenContainerDevices(destinationContainer: Object; storageBox: Object): Object, noMethod; operation CopyToContainerDevice(storageBox: Object): Object, noMethod; operation ShowOptions(storageShelf: Object; spoutPosition: Dot); // show/hide window when user touches StoreroomShelf placard operation AppendAvailablePackages(list: Object), noMethod; // append to ObjectList all packages that are available via this ContainerDevice // caller owns list and therefore must avoid destroying its contents attribute Writeable: Boolean; // Checks to see if the card technology can be written, // regardless of the CardLockswitchState attribute WriteProtected: Boolean, readOnly, noGetter; // If can't (or shouldn't) write to card (ROM or CardLockswitchState==locked). // In future, could use to implement a software writeProtect switch. operation PreflightAnnouncement(bytesToWrite: Unsigned): Boolean, noMethod; // If WriteProtected or not enough space for bytesToWrite, // Announce an appropriate message and return true attribute SlowDevice: Boolean, readOnly; // defaults to false; // override to return true if the device should be treated as slow by the UI attribute HandlesFiling: Boolean, readOnly; // used for compiling the ContainerDeviceList for Filing attribute HandlesBackups: Boolean, readOnly; // used for compiling the ContainerDeviceList for Backups attribute HandlesCopying: Boolean, readOnly; // used for compiling the ContainerDeviceList for Copiing end class;