Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/gui.git] / src / SalomeApp / SalomeApp_Module.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either 
6 // version 2.1 of the License.
7 // 
8 // This library is distributed in the hope that it will be useful 
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public  
14 // License along with this library; if not, write to the Free Software 
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // File:      SalomeApp_Module.h
20 // Created:   10/25/2004 11:33:06 AM
21 // Author:    Sergey LITONIN
22 // Copyright (C) CEA 2004
23
24 #ifndef SALOMEAPP_MODULE_H
25 #define SALOMEAPP_MODULE_H
26
27 #include "SalomeApp.h"
28
29 #include <LightApp_Module.h>
30
31 class CAM_DataModel;
32 class SalomeApp_Application;
33 class LightApp_Operation;
34 class LightApp_Selection;
35 class SALOME_ListIO;
36 class QString;
37
38 /*!
39  * \brief Base class for all salome modules
40 */
41 class SALOMEAPP_EXPORT SalomeApp_Module : public LightApp_Module
42 {
43   Q_OBJECT
44
45 public:
46   SalomeApp_Module( const QString& );
47   virtual ~SalomeApp_Module();
48
49   /*! engineIOR() should be a pure virtual method, to avoid logical errors!\n
50    * Implementation in derived classes can return the following values:\n
51    * module`s engine IOR - means that this is a standard SALOME module with a CORBA engine
52    * \li "" (empty string)   - means that this not correct SALOME module
53    */
54   virtual QString                     engineIOR() const = 0;
55   
56   /*! Convenient shortcuts*/
57
58   SalomeApp_Application*              getApp() const;
59
60   virtual void                        storeVisualParameters(int savePoint);
61   virtual void                        restoreVisualParameters(int savePoint);
62
63 protected:
64   virtual CAM_DataModel*              createDataModel();
65   virtual LightApp_Selection*         createSelection() const;
66   virtual void                        extractContainers( const SALOME_ListIO&, SALOME_ListIO& ) const;
67 };
68
69 #endif