本文阐述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