View Issue Details

IDProjectCategoryView StatusLast Update
0013605Open CASCADEOCCT:Application Frameworkpublic2012-01-13 14:05
ReporteragvAssigned Toagv 
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
OSAll 
Fixed in Version6.2.0 
Summary0013605: Transaction signal API in TDocStd_Document
DescriptionThere is a need that TDocStd_Document generates a signal to application that a
transaction event has happened (Open, Abort, Commit). This signal can be passed
by either of two ways:
  1. Using the virtual API of TDocStd_Document, so that the derived document
class could provide the treatment of an event or fire it to GUI or other
clients.
  2. Using the virtual API of TDocStd_Application: new methods
OnOpenTransaction, etc. can be called upon a transaction event in the document.
This way is more suitable if the application does not use a specialized Document
class.
Additional information
and documentation updates
Documentation remark, added by AGV 2007-02-15 13:00:02:

New features:
Virtual API for transaction events.
This improvement allows the application to receive signals from OCAF document
about each of the events:

   Open Transaction
   Commit Transaction
   Abort Transaction

Improvements:
Every time a document transaction event occurs, the application (class
TDocStd_Application) that owns the OCAF document calls the corresponding virtual
method:

   OnOpenTransaction (aDocument)
   OnCommitTransaction (aDocument)
   OnAbortTransaction (aDocument)

where "aDocument" is a reference to the instance of concerned OCAF document. By
default these methods do nothing, but the developer can redefine them in his/her
Application subclass, attaching the relevant GUI actions or other events.

If this API is inconvenient (e.g., for OCAF documents that are not owned by
Application), the developer can redefine the protected methods:

   OpenTransaction()
   CommitTransaction()
   AbortTransaction()

for the similar purposes. By the described improvement, these three methods were
defined as virtual.

In case of redefinition, it is mandatory to call
TColStd_Document::OpenTransaction() from the method in derived class (i.e.,
MyDocument::OpenTransaction()). The same for CommitTransaction() and
AbortTransaction().
Modified entities:
Application from TDocStd
Document from TDocStd
TagsNo tags attached.
Test case number

Attached Files

  • OCC13605.tar.gz (22,608 bytes)
  • OCC13605-v2.tar.gz (22,630 bytes)

Activities

2006-10-10 18:15

 

OCC13605.tar.gz (22,608 bytes)

2006-10-12 12:04

 

OCC13605-v2.tar.gz (22,630 bytes)

Issue History

Date Modified Username Field Change
2006-10-12 12:38 abv CC => abv
2006-10-12 12:54 bugmaster Assigned To bugmaster => agv
2006-10-12 12:54 bugmaster Status new => assigned
2006-10-31 16:51 bugmaster Status assigned => verified
2007-06-01 12:06 bugmaster Status verified => closed
2007-06-01 12:06 bugmaster Resolution @0@ => fixed
2011-08-02 10:32 bugmaster Category OCCT:OCAF => OCCT:Application Framework
2012-01-13 14:05 atp Description Updated
2012-01-13 14:05 atp Additional Information Updated