-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SALOME_Component.idl
// Author : Paul RASCLE, EDF
// $Header:
#include "SALOMEDS.idl"
#include "SALOME_Exception.idl"
+#include "SALOME_PyNode.idl"
/*! \file SALOME_Component.idl \brief interfaces for Component and Container
*/
any value;
};
+ //! Structure data type to hold reference on data
+ struct dataref
+ {
+ string ref;
+ };
+
typedef sequence<KeyValuePair> FieldsDict;
interface Component ;
\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.
/*!
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,
\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.
//! 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