23 #ifndef __GEOM_GEN_I_H__ 
   24 #define __GEOM_GEN_I_H__ 
   31 #include <SALOMEconfig.h> 
   32 #include CORBA_SERVER_HEADER(GEOM_Gen) 
   34 #include CORBA_CLIENT_HEADER(SALOMEDS) 
   35 #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes) 
   38 #include "SALOME_Component_i.hxx" 
   39 #include "SALOME_NamingService.hxx" 
   56 #include <TopTools_IndexedMapOfShape.hxx> 
   57 #include <TopTools_SequenceOfShape.hxx> 
   75                                       GEOM::GEOM_Gen_ptr      theEngine,
 
   95              PortableServer::POA_ptr poa,
 
   96              PortableServer::ObjectId * contId,
 
   97              const char *instanceName,
 
   98              const char *interfaceName);
 
  104   void register_name(
char * name);
 
  107   CORBA::ORB_ptr 
GetORB() { 
return CORBA::ORB::_duplicate(_orb); }
 
  110   SALOME_NamingService* 
GetNS() { 
return name_service; }
 
  116   SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
 
  120   SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
 
  124   CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
 
  125                       const SALOMEDS::TMPFile& theStream,
 
  129   CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
 
  130                            const SALOMEDS::TMPFile& theStream,
 
  134   void Close(SALOMEDS::SComponent_ptr theComponent);
 
  135   char* ComponentDataType();
 
  138   char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
 
  139                                const char* IORString,
 
  140                                CORBA::Boolean isMultiFile,
 
  141                                CORBA::Boolean isASCII);
 
  142   char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
 
  143                                const char* aLocalPersistentID,
 
  144                                CORBA::Boolean isMultiFile,
 
  145                                CORBA::Boolean isASCII);
 
  147   bool CanPublishInStudy(CORBA::Object_ptr theIOR);
 
  148   SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
 
  149                                        SALOMEDS::SObject_ptr theSObject,
 
  150                                        CORBA::Object_ptr theObject,
 
  151                                        const char* theName) 
throw (SALOME::SALOME_Exception) ;
 
  153   GEOM::ListOfGO* PublishNamedShapesInStudy(SALOMEDS::Study_ptr theStudy,
 
  154                                             CORBA::Object_ptr theObject);
 
  156   CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
 
  157   SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
 
  158   CORBA::Boolean CanPaste(
const char* theComponentName, CORBA::Long theObjectID);
 
  159   SALOMEDS::SObject_ptr PasteInto(
const SALOMEDS::TMPFile& theStream,
 
  160                                   CORBA::Long theObjectID,
 
  161                                   SALOMEDS::SObject_ptr theObject);
 
  166   SALOMEDS::SObject_ptr AddInStudy (SALOMEDS::Study_ptr       theStudy,
 
  167                                     GEOM::GEOM_BaseObject_ptr theObject,
 
  169                                     GEOM::GEOM_BaseObject_ptr theFather);
 
  175                                      GEOM::GEOM_Object_ptr   theObject,
 
  178                                      CORBA::Boolean          theInheritFirstArg,
 
  179                                      CORBA::Boolean          theAddPrefix);
 
  184   GEOM::ListOfGO* RestoreGivenSubShapesO (SALOMEDS::Study_ptr     theStudy,
 
  185                                           GEOM::GEOM_Object_ptr   theObject,
 
  188                                           CORBA::Boolean          theInheritFirstArg,
 
  189                                           CORBA::Boolean          theAddPrefix);
 
  195                                       SALOMEDS::SObject_ptr   theSObject,
 
  198                                       CORBA::Boolean          theInheritFirstArg,
 
  199                                       CORBA::Boolean          theAddPrefix);
 
  202   SALOMEDS::TMPFile* GetDependencyTree(SALOMEDS::Study_ptr theStudy,
 
  210   virtual void Undo(CORBA::Long theStudyID);
 
  213   virtual void Redo(CORBA::Long theStudyID);
 
  220   virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations (CORBA::Long theStudyID)
 
  221     throw (SALOME::SALOME_Exception);
 
  224   virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations (CORBA::Long theStudyID)
 
  225     throw (SALOME::SALOME_Exception);
 
  228   virtual GEOM::GEOM_I3DPrimOperations_ptr GetI3DPrimOperations (CORBA::Long theStudyID)
 
  229     throw (SALOME::SALOME_Exception);
 
  232   virtual GEOM::GEOM_IShapesOperations_ptr GetIShapesOperations (CORBA::Long theStudyID)
 
  233     throw (SALOME::SALOME_Exception);
 
  236   virtual GEOM::GEOM_IBlocksOperations_ptr GetIBlocksOperations (CORBA::Long theStudyID)
 
  237     throw (SALOME::SALOME_Exception);
 
  240   virtual GEOM::GEOM_IBooleanOperations_ptr GetIBooleanOperations (CORBA::Long theStudyID)
 
  241     throw (SALOME::SALOME_Exception);
 
  244   virtual GEOM::GEOM_ICurvesOperations_ptr GetICurvesOperations (CORBA::Long theStudyID)
 
  245     throw (SALOME::SALOME_Exception);
 
  248   virtual GEOM::GEOM_ILocalOperations_ptr GetILocalOperations (CORBA::Long theStudyID)
 
  249     throw (SALOME::SALOME_Exception);
 
  252   virtual GEOM::GEOM_IHealingOperations_ptr GetIHealingOperations (CORBA::Long theStudyID)
 
  253     throw (SALOME::SALOME_Exception);
 
  256   virtual GEOM::GEOM_IInsertOperations_ptr GetIInsertOperations (CORBA::Long theStudyID)
 
  257     throw (SALOME::SALOME_Exception);
 
  260   virtual GEOM::GEOM_IMeasureOperations_ptr GetIMeasureOperations (CORBA::Long theStudyID)
 
  261     throw (SALOME::SALOME_Exception);
 
  264   virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations (CORBA::Long theStudyID)
 
  265     throw (SALOME::SALOME_Exception);
 
  268   virtual GEOM::GEOM_IFieldOperations_ptr GetIFieldOperations (CORBA::Long theStudyID)
 
  269     throw (SALOME::SALOME_Exception);
 
  272   virtual GEOM::GEOM_IOperations_ptr GetPluginOperations (CORBA::Long theStudyID,
 
  273                                                           const char* theLibName)
 
  274     throw (SALOME::SALOME_Exception);
 
  277   virtual GEOM::GEOM_Object_ptr AddSubShape (GEOM::GEOM_Object_ptr theMainShape,
 
  280   virtual void RemoveObject(GEOM::GEOM_BaseObject_ptr theObject);
 
  282   virtual  char* GetStringFromIOR(GEOM::GEOM_Object_ptr theObject);
 
  284   virtual GEOM::GEOM_Object_ptr GetIORFromString(
const char* stringIOR);
 
  286   virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
 
  287                                        CORBA::Boolean isPublished,
 
  288                                        CORBA::Boolean isMultiFile,
 
  289                                        CORBA::Boolean& isValidScript);
 
  291   char* GetDumpName (
const char* theStudyEntry);
 
  296   virtual bool hasObjectInfo();
 
  297   virtual char* getObjectInfo(CORBA::Long studyId, 
const char* entry);
 
  300   virtual char* getVersion();
 
  303   SALOMEDS::SObject_ptr CreateFolder(
const char* theName,
 
  304                                      SALOMEDS::SObject_ptr theFather);
 
  307   void MoveToFolder(GEOM::GEOM_Object_ptr theObject,
 
  308                     SALOMEDS::SObject_ptr theFolder);
 
  312                          SALOMEDS::SObject_ptr theFolder);
 
  316              SALOMEDS::SObject_ptr where,
 
  322   void GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy,
 
  332   virtual GEOM::GEOM_BaseObject_ptr GetObject(CORBA::Long theStudyID, 
const char* theEntry);
 
  336                                     GEOM::GEOM_Object_ptr   theObject,
 
  337                                     SALOMEDS::SObject_ptr   theSObject,
 
  340                                     CORBA::Boolean          theInheritFirstArg,
 
  341                                     CORBA::Boolean          theAddPrefix);
 
  343   GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::Study_ptr     theStudy,
 
  344                                             SALOMEDS::SObject_ptr   theOldSO,
 
  345                                             SALOMEDS::SObject_ptr   theNewSO,
 
  346                                             GEOM::GEOM_Object_ptr   theNewO,
 
  349                                             CORBA::Boolean          theAddPrefix);
 
  351   GEOM::ListOfGO* RestoreGivenSubShapes (SALOMEDS::Study_ptr     theStudy,
 
  352                                          GEOM::GEOM_Object_ptr   theObject,
 
  353                                          SALOMEDS::SObject_ptr   theSObject,
 
  356                                          CORBA::Boolean          theInheritFirstArg,
 
  357                                          CORBA::Boolean          theAddPrefix);
 
  359   GEOM::ListOfGO* RestoreGivenSubShapesOneLevel (SALOMEDS::Study_ptr     theStudy,
 
  360                                                  SALOMEDS::SObject_ptr   theOldSO,
 
  361                                                  SALOMEDS::SObject_ptr   theNewSO,
 
  362                                                  GEOM::GEOM_Object_ptr   theNewO,
 
  363                                                  std::set<std::string>   theArgs,
 
  365                                                  CORBA::Boolean          theAddPrefix);
 
  368   void CreateAndPublishGroup(SALOMEDS::Study_ptr theStudy,
 
  369                              GEOM::GEOM_Object_var theMainShape,
 
  370                              const TopTools_IndexedMapOfShape& 
anIndices,
 
  371                              const TopTools_SequenceOfShape& SeqS,
 
  372                              const TColStd_SequenceOfAsciiString& SeqN,
 
  373                              const Standard_CString& GrName,
 
  374                              GEOM::ListOfGO_var aResList);
 
  376   void getUpwardDependency( GEOM::GEOM_BaseObject_ptr gbo,
 
  378                             std::map< std::string, std::set<std::string> > &passedEntries,
 
  381   void getDownwardDependency( GEOM::GEOM_BaseObject_ptr gbo,
 
  383                               std::map< std::string, std::set<std::string> > &passedEntries,
 
  386   void includeParentDependencies(GEOM::GEOM_BaseObject_ptr gbo,
 
  387                                  std::set<std::string>& aSelected,
 
  388                                  std::set<std::string>& aParents,
 
  389                                  std::set<std::string>& aChildren,
 
  390                                  std::set<std::string>& anOthers);
 
  392   void includeSubObjects(SALOMEDS::Study_ptr theStudy,
 
  393                          const std::string& aSelectedEntry,
 
  394                          std::set<std::string>& aSelected,
 
  395                          std::set<std::string>& aParents,
 
  396                          std::set<std::string>& aChildren,
 
  397                          std::set<std::string>& anOthers);
 
  399   void LoadPlugin(
const std::string& theLibName);