本文闡述FreeCAD中Transaction的實現原理。
注1:限于研究水平,分析難免不當,歡迎批評指正。
注2:文章內容會不定期更新。
一、概念
Ref. from?What is a Transaction??
A transaction is a group of operations that have the following properties: atomic, consistent, isolated, and durable (ACID). The support of transactions enables new types of applications to be developed, while simplifying the development process and making the application more robust. The remainder of this topic provides scenarios that demonstrate the need for these properties, then a table that defines each property.
In an?atomic?group of operations, either every operation in the group must succeed, or the effects of all of them must be undone (also known as?rolling back).?
Atomic Either all of the operations in the transaction succeed or none of the operations persist. Consistent If the data are consistent before the transaction begins, then they will be consistent after the transaction finishes. Isolated The effects of a transaction that is in progress are hidden from all other transactions. Durable When a transaction finishes, its results are persistent and will survive a system crash.
二、核心組件
三、關鍵流程
網絡資料
What is a Transaction?https://learn.microsoft.com/en-us/windows/win32/ktm/what-is-a-transaction
FreeCAD源碼分析:Undo/Redo實現原理https://blog.csdn.net/qq_26221775/article/details/124954477