Salome HOME
PAL12607: Static objects in Geometry GUI libraries.
[modules/geom.git] / src / GEOM_I / GEOM_Gen_i.hh
index e0b09d6b9e83453b5f3ad8e6198a12405288427e..c00407e4e6a867419e610388031d3a8f58b4976d 100644 (file)
@@ -1,3 +1,22 @@
+// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either 
+// version 2.1 of the License.
+// 
+// This library is distributed in the hope that it will be useful 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public  
+// License along with this library; if not, write to the Free Software 
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 #ifndef __GEOM_GEN_I_H__
 #define __GEOM_GEN_I_H__
 
 // IDL headers
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(GEOM_Gen)
-#include CORBA_SERVER_HEADER(SALOMEDS)
-#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
 
+#include CORBA_CLIENT_HEADER(SALOMEDS)
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
 
-#include "SALOME_Component_i.hxx"
 
+#include "SALOME_Component_i.hxx"
 #include "SALOME_NamingService.hxx"
 
-//#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
-
 #include "GEOM_IBasicOperations_i.hh"
 #include "GEOM_ITransformOperations_i.hh"
 #include "GEOM_I3DPrimOperations_i.hh"
@@ -29,6 +46,8 @@
 #include "GEOM_IMeasureOperations_i.hh"
 #include "GEOM_IGroupOperations_i.hh"
 
+//#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
 
 //=====================================================================
 // GEOM_Gen_i : class definition
@@ -40,12 +59,13 @@ class GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Comp
   //-----------------------------------------------------------------------//
   // Constructor / Destructor                                              //
   //-----------------------------------------------------------------------//
-  // constructor to be called for servant creation. 
+
+  // constructor to be called for servant creation.
   GEOM_Gen_i();
   GEOM_Gen_i(CORBA::ORB_ptr orb,
             PortableServer::POA_ptr poa,
-            PortableServer::ObjectId * contId, 
-            const char *instanceName, 
+            PortableServer::ObjectId * contId,
+            const char *instanceName,
             const char *interfaceName);
 
   // destructor, doing nothing (for now)
@@ -57,7 +77,7 @@ class GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Comp
 
   //-----------------------------------------------------------------------//
   // Inherited methods from SALOMEDS::Driver                               //
-  //-----------------------------------------------------------------------//    
+  //-----------------------------------------------------------------------//
 
   SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
                          const char* theURL,
@@ -66,7 +86,7 @@ class GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Comp
   SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
                               const char* theURL,
                               bool isMultiFile);
-  
+
   CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
                      const SALOMEDS::TMPFile& theStream,
                      const char* theURL,
@@ -103,13 +123,18 @@ class GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Comp
                                  CORBA::Long theObjectID,
                                  SALOMEDS::SObject_ptr theObject);
 
-  //Adds theObject in the study with a name = theName, if theFather is not null the object is placed under theFather
-  SALOMEDS::SObject_ptr AddInStudy(SALOMEDS::Study_ptr theStudy, GEOM::GEOM_Object_ptr theObject, const char* theName, GEOM::GEOM_Object_ptr theFather);
+  /*! \brief Adds theObject in the study with a name = theName, if
+   *         theFather is not null the object is placed under theFather
+   */
+  SALOMEDS::SObject_ptr AddInStudy (SALOMEDS::Study_ptr theStudy,
+                                   GEOM::GEOM_Object_ptr theObject,
+                                   const char* theName,
+                                   GEOM::GEOM_Object_ptr theFather);
 
   //-----------------------------------------------------------------------//
-  // Transaction methods                                                    //
-  //-----------------------------------------------------------------------// 
+  // Transaction methods                                                   //
+  //-----------------------------------------------------------------------//
+
   //Undos one transaction in the document associated with theStudyID
   virtual void Undo(CORBA::Long theStudyID);
 
@@ -118,12 +143,12 @@ class GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Comp
 
   //-----------------------------------------------------------------------//
   // Operations methods                                                    //
-  //-----------------------------------------------------------------------// 
+  //-----------------------------------------------------------------------//
 
   //Returns a pointer to BasicOperations interface
   virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations (CORBA::Long theStudyID)
     throw (SALOME::SALOME_Exception);
-  
+
   //Returns a pointer to TransformOperations interface
   virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations (CORBA::Long theStudyID)
     throw (SALOME::SALOME_Exception);
@@ -169,7 +194,8 @@ class GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Comp
     throw (SALOME::SALOME_Exception);
 
   //Adds a new sub shape
-  virtual GEOM::GEOM_Object_ptr AddSubShape(GEOM::GEOM_Object_ptr theMainShape, const GEOM::ListOfLong& theIndices);
+  virtual GEOM::GEOM_Object_ptr AddSubShape (GEOM::GEOM_Object_ptr theMainShape,
+                                            const GEOM::ListOfLong& theIndices);
 
   virtual void RemoveObject(GEOM::GEOM_Object_ptr theObject);
 
@@ -177,25 +203,25 @@ class GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Comp
 
   virtual GEOM::GEOM_Object_ptr GetIORFromString(const char* stringIOR);
 
-  virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, 
-                                      CORBA::Boolean isPublished, 
+  virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
+                                      CORBA::Boolean isPublished,
                                       CORBA::Boolean& isValidScript);
 
   char* GetDumpName (const char* theStudyEntry);
 
   GEOM::string_array* GetAllDumpNames();
 
-  //********************************************************************************************************//
-  //     Internal methods
-  //********************************************************************************************************//
+  //-----------------------------------------------------------------------//
+  // Internal methods                                                      //
+  //-----------------------------------------------------------------------//
+
   virtual GEOM::GEOM_Object_ptr GetObject(CORBA::Long theStudyID, const char* theEntry);
 
  private:
+
    ::GEOMImpl_Gen* _impl;
    SALOME_NamingService * name_service;
-   char * _name; 
-
+   char * _name;
 };
 
-#endif 
+#endif