Undo Redo

How can i implement undo redo operations in the import export samples

heXus's picture

You must use OCAF.

Saneesh Kumar's picture

What does it mean by I must use OCAF. OCAF is a sample right? Why we can't implement this in the undo redo sample?

Saneesh Kumar's picture

sorry why we cant implement undo redo in the import export sample?

if we override the OnNewDocument function will it work?

Forum supervisor's picture

Hi Saneesh,
OCAF is the component of OCCT => http://www.opencascade.org/occt/overview/compocc4/.
See also OCAF User's Guide.
It supposes that you keep your information in attributes: Standard (available with OCCT release) or in your own attributes developed by yourself.
After that you may use Undo/Redo services provided by TDocStd_Document class.
Regards

Saneesh Kumar's picture

Can you please list me what are the steps i should do?

Forum supervisor's picture

Hi,
1. read "Application Framework White Paper" & OCAF User's Guide.
2. Analyze Ocaf Sample (mfc based)
3. after that you may start implementation your own solution.
Regards

Saneesh Kumar's picture

Thank you for the reply