1 // GEOM GEOMGUI : GUI for Geometry component
3 // Copyright (C) 2004 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : GEOM_Operation.cxx
25 // Author : Sergey ANIKIN
29 #include "GEOM_Operation.h"
31 #include "SUIT_Application.h"
32 #include "SalomeApp_Tools.h"
35 //================================================================
36 // Function : GEOM_Operation
38 //================================================================
39 GEOM_Operation::GEOM_Operation( SUIT_Application* app, GEOM::GEOM_IOperations_ptr oper )
40 : SUIT_Operation( app )
42 myIOperation = GEOM::GEOM_IOperations::_narrow( oper );
45 //================================================================
46 // Function : ~GEOM_Operation
48 //================================================================
49 GEOM_Operation::~GEOM_Operation()
53 //================================================================
54 // Function : onStartOperation()
55 // Purpose : Opens an internal transaction in GEOM engine
56 //================================================================
57 void GEOM_Operation::startOperation()
59 SUIT_Operation::startOperation();
61 if ( !myIOperation->_is_nil() ) {
63 myIOperation->StartOperation();
65 catch( const SALOME::SALOME_Exception& e ) {
66 SalomeApp_Tools:: QtCatchCorbaException( e );
71 //================================================================
72 // Function : onFinishOperation
73 // Purpose : Commits an internal transaction in GEOM engine
74 //================================================================
75 void GEOM_Operation::commitOperation()
77 SUIT_Operation::commitOperation();
79 if ( !myIOperation->_is_nil() ) {
81 myIOperation->FinishOperation();
83 catch( const SALOME::SALOME_Exception& e ) {
84 SalomeApp_Tools:: QtCatchCorbaException( e );
89 //================================================================
90 // Function : onSuspendOperation
92 //================================================================
93 void GEOM_Operation::suspendOperation()
95 SUIT_Operation::suspendOperation();
98 //================================================================
99 // Function : onResumeOperation
101 //================================================================
102 void GEOM_Operation::resumeOperation()
104 SUIT_Operation::resumeOperation();
107 //================================================================
108 // Function : onAbortOperation
109 // Purpose : Aborts an internal transaction in GEOM engine
110 //================================================================
111 void GEOM_Operation::abortOperation()
113 SUIT_Operation::abortOperation();
115 if ( !myIOperation->_is_nil() ) {
117 myIOperation->AbortOperation();
119 catch( const SALOME::SALOME_Exception& e ) {
120 SalomeApp_Tools::QtCatchCorbaException( e );