General KERNEL Documentation     End User KERNEL Services  


idl/SALOME_Component.idl

Go to the documentation of this file.
00001 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00002 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
00003 // 
00004 //  This library is free software; you can redistribute it and/or 
00005 //  modify it under the terms of the GNU Lesser General Public 
00006 //  License as published by the Free Software Foundation; either 
00007 //  version 2.1 of the License. 
00008 // 
00009 //  This library is distributed in the hope that it will be useful, 
00010 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
00011 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00012 //  Lesser General Public License for more details. 
00013 // 
00014 //  You should have received a copy of the GNU Lesser General Public 
00015 //  License along with this library; if not, write to the Free Software 
00016 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
00017 // 
00018 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 //
00020 //
00021 //
00022 //  File   : SALOME_Component.idl
00023 //  Author : Paul RASCLE, EDF
00024 //  $Header: 
00025 
00026 #ifndef _SALOME_COMPONENT_IDL_
00027 #define _SALOME_COMPONENT_IDL_
00028 
00034 module Engines
00035 {
00040   typedef sequence<octet> TMPFile;  
00041   
00045   struct KeyValuePair
00046   {
00047     string key;
00048     any value;
00049   };
00050 
00051   typedef sequence<KeyValuePair> FieldsDict;
00052 
00053   interface Component ;
00054   interface fileRef ;
00055   interface fileTransfer ;
00056 
00062   interface Container
00063   {
00064 
00072     boolean load_component_Library(in string componentName);
00073 
00084     Component create_component_instance(in string componentName,
00085                          in long studyId);
00086 
00095     Component find_component_instance(in string registeredName,
00096                           in long studyId);
00097 
00108     Component load_impl(in string nameToRegister,
00109                in string componentName);
00110 
00115     void remove_impl(in Component component_i);
00116 
00120     void finalize_removal() ;
00121 
00125     void ping();
00126 
00130     readonly attribute string name ;
00131 
00135     oneway void Shutdown();
00136 
00140     string getHostName();
00141 
00145     long getPID();
00146 
00152     boolean Kill_impl() ;
00153 
00160     fileRef createFileRef(in string origFileName);
00161 
00167     fileTransfer getFileTransfer();
00168 
00169   };
00170 
00171 
00172 
00177   interface Component
00178   {
00182     readonly attribute string instanceName ;
00183 
00187     readonly attribute string interfaceName ;
00188 
00192     void ping();
00193 
00194 //     /*!
00195 //       Set study associated to component instance
00196 //       \param studyId
00197 //       (=0:  multistudy component instance,
00198 //        >0: study id associated to this instance
00199 //       \return false if already set with a different value (change not possible)
00200 //     */
00201 //     boolean setStudyId(in long studyId);
00202 
00209     long getStudyId();
00210 
00216     void destroy() ;
00217 
00221     Container GetContainerRef() ;
00222 
00229     void setProperties(in FieldsDict dico);
00230 
00235     FieldsDict getProperties();
00236 
00243     void Names( in string aGraphName , in string aNodeName ) ;
00244 
00248     boolean Kill_impl() ;
00249 
00254     boolean Stop_impl() ;
00255 
00260     boolean Suspend_impl() ;
00261 
00265     boolean Resume_impl() ;
00266 
00270     long CpuUsed_impl() ;
00271     
00276     TMPFile DumpPython(in Object theStudy,
00277                  in boolean isPublished, 
00278                  out boolean isValidScript); 
00279 
00280   } ;
00281 
00286   typedef sequence<octet> fileBlock;
00287 
00292   interface fileTransfer
00293   {
00302     long open(in string fileName);
00303 
00308     void close(in long fileId);
00309 
00314     fileBlock getBlock(in long fileId);
00315   };
00316 
00334   interface fileRef
00335   {
00336     readonly attribute string origFileName;
00337     readonly attribute string refMachine;
00338 
00339     Container getContainer();
00340 
00341     boolean addRef(in string machine,
00342           in string fileName);
00343 
00344     string getRef(in string machine);
00345   };
00346 
00347 } ;
00348 
00349 #endif