Salome HOME
CCAR: add Observer CORBA object to SALOMEDS module to implement a notification
[modules/kernel.git] / idl / SALOME_Component.idl
index db817c063dcec465700820fe481314e6d5a1ee47..e91c8b0463e4604c05257dee00d91819eeed31dd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SALOME_Component.idl
 //  Author : Paul RASCLE, EDF
 //  $Header: 
@@ -28,6 +29,7 @@
 
 #include "SALOMEDS.idl"
 #include "SALOME_Exception.idl"
+#include "SALOME_PyNode.idl"
 
 /*! \file SALOME_Component.idl \brief interfaces for Component and Container
 */
@@ -52,6 +54,12 @@ module Engines
     any value;
   };
 
+  //!  Structure data type to hold reference on data 
+  struct dataref
+  {
+    string ref;
+  };
+
   typedef sequence<KeyValuePair> FieldsDict;
 
   interface Component ;
@@ -72,9 +80,10 @@ module Engines
       \param componentName like COMPONENT, (Python or C++ implementation)
                            try to make a Python import of COMPONENT,
                            then a lib open of libCOMPONENTEngine.so
+      \param reason      in case of error (return false) a string explaining the error
       \return true if load successfull or already done, false otherwise
     */
-    boolean load_component_Library(in string componentName);
+    boolean load_component_Library(in string componentName, out string reason);
 
     //! Create a new servant instance of a component.
     /*!
@@ -89,6 +98,21 @@ module Engines
     Engines::Component create_component_instance(in string componentName,
                                                  in long studyId);
 
+    //! Create a new servant instance of a component with environment variables specified.
+    /*!
+      Component library must be loaded.
+      \param componentName Name of the component which will be registered
+                           in Registry and Name Service,
+                         (instance number suffix added to the registered name)
+      \param studyId        0 if instance is not associated to a study, 
+                            >0 otherwise (== study id)
+      \param env         a dict of env variables
+      \param reason      in case of error (return nil) a string explaining the error
+      \return a loaded component
+    */
+    Engines::Component create_component_instance_env(in string componentName,
+                                                     in long studyId, in FieldsDict env,
+                                                     out string reason);
     //! Find a servant instance of a component
     /*!
       \param registeredName  Name of the component in Registry or Name Service,
@@ -186,6 +210,13 @@ module Engines
       \param localFile the local file to create by copy
      */
     void copyFile(in Container contai, in string remoteFile, in string localFile);
+
+    //! Create a PyNode in the container
+    /*!
+      \param nodeName the name of the PyNode
+      \param code python code as text to load in the node
+     */
+    PyNode createPyNode(in string nodeName, in string code)  raises(SALOME::SALOME_Exception);
   };
 
   /*! \brief Interface of the %component.
@@ -203,15 +234,6 @@ module Engines
     //!  Determines whether the server has already been loaded or not.
     void ping();
 
-//    
-//       Set study associated to component instance
-//       \param studyId
-//       (=0:  multistudy component instance,
-//        >0: study id associated to this instance
-//       \return false if already set with a different value (change not possible)
-//     
-//     boolean setStudyId(in long studyId);
-
     //!  Get study associated to component instance
     /*!
       get study associated to component instance