Lockableclass | objects.t[3735] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
Note that Lockable should usually go BEFORE a Thing-derived class in the superclass list.
class
Lockable : Linkable
Lockable
Linkable
object
Lockable
IndirectLockable
LockableContainer
LockableWithKey
KeyedContainer
autoUnlockOnOpen
initiallyLocked
isLocked_
lockedDesc
lockStatusObvious
lockStatusReportable
dobjFor(Lock)
dobjFor(LockWith)
dobjFor(Open)
dobjFor(Unlock)
dobjFor(UnlockWith)
examineStatus
initializeThing
isLocked
makeLocked
Inherited from Linkable
:
masterObject
autoUnlockOnOpen | objects.t[3914] |
initiallyLocked | objects.t[3740] |
isLocked_ | objects.t[3839] |
lockedDesc | objects.t[3797] |
lockStatusObvious | objects.t[3812] |
By default, since we can be locked and unlocked with simple LOCK and UNLOCK commands, we assume the status is as obvious as the mechanism must be to allow such simple commands.
lockStatusReportable | objects.t[3833] |
This property is primarily of interest to mix-ins. To allow mix-ins to get a say, regardless of the order of superclasses, we'll by default defer to any inherited value if there is in fact an inherited value. If there's no inherited value, we'll simply return true.
We use this in the library for one case in particular: when we're mixed with Openable, we don't want to report the lock status for an open object because an Openable must by default be closed to be locked. That is, when an Openable is open, it's always unlocked, so reporting that it's unlocked is essentially redundant information.
dobjFor(Lock) | objects.t[3857] |
dobjFor(LockWith) | objects.t[3897] |
dobjFor(Open) | objects.t[3925] |
If the lock status isn't obvious, don't try to unlock the object as a precondition. Instead, test to make sure it's unlocked in the 'check' routine, and fail.
dobjFor(Unlock) | objects.t[3877] |
dobjFor(UnlockWith) | objects.t[3904] |
examineStatus ( ) | objects.t[3773] |
initializeThing ( ) OVERRIDDEN | objects.t[3842] |
isLocked ( ) | objects.t[3746] |
makeLocked (stat) | objects.t[3760] |