C++
struct AcAp { enum DocLockMode { kNone = 0x00, kAutoWrite = 0x01, kNotLocked = 0x02, kWrite = 0x04, kProtectedAutoWrite = 0x14, kRead = 0x20, kXWrite = 0x40 }; };
File
AcApDocLockmode.h
Members
Members | Description |
---|---|
kNone | No locking. |
kAutoWrite | This locking type indicates an Automatic Write lock. The purpose of this lock mode is to group contiguous sequences of ActiveX requests that were made without explicit locking, together as a single command. This insures their behavior as a single command with regards to Undo and notification, rather than as a bunch of separate commands/operations. This lock mode has the same effect as kWrite, except it is only effective when no other lock is active. An automatic lock will be unlocked when any other kind of lock is requested, complete with notification and the end undo markers and will occur just before the new notification and start undo markers for the new lock request. |
kNotLocked | This locking type indicates there is no locking on the document context. |
kWrite | This locking type indicates a Shared Write lock. It may coexist with Read locks placed by other execution contexts. It mutually excludes other kRead and kXWrite locks. It allows the execution context to examine modify the given document contents. |
kProtectedAutoWrite | This locking type is used instead of kAutoWrite before executing code which might perform a nested document lock which should leave the kAutoWrite lock intact. See the description following this table. |
kRead | This locking type indicates a Read Only lock. It may coexist with Read locks placed by other execution contexts. It mutually excludes other kWrite and kXWrite locks. It allows the execution context to examine the given document contents, but not to modify. |
kXWrite | This locking type indicates an Exclusive Write lock. It mutually excludes all other lock types by other execution contexts. It allows the execution context to examine and modify the given document contents. |
Description
Contains the enum for lock level in a document. A document must be locked by an execution context before it or its associated database and transaction manager can be modified. A document can also be locked to temporarily prevent its examination and/or modification by other execution contexts. Document locking is centralized at the application level to prevent the possibility of a deadlock situation.
See Also
AcApDocManagerReactor, AcApDocManager, AcApDocument