// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // 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, or (at your option) any later version. // // 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 // // File : SALOME_PyNode.idl // Author : Christian CAREMOLI, EDF // $Header: // #ifndef _SALOME_PYNODE_IDL_ #define _SALOME_PYNODE_IDL_ #include "SALOME_GenericObj.idl" #include "SALOME_Exception.idl" /*! \file SALOME_PyNode.idl \brief interface for remote python execution */ /*! \brief This is a package of interfaces used for executing Python code on remote container */ module Engines { typedef sequence pickledArgs; typedef sequence listofstring; interface PyNodeBase : SALOME::GenericObj { /*! This methode executes the python code in \a codeStr and can append/remove symboles in context to make them available or not for future call of execute on this. \param [in] codeStr - the python code (without statement) to be executed, that can modify the context initialized at initialization. */ void executeAnotherPieceOfCode(in string codeStr) raises (SALOME::SALOME_Exception); }; interface PyNode : PyNodeBase { /*! \brief execute a python function defined in the node \param functionName the python function defined in the node to execute \param inargs input argument values (tuple,dict) provided as a python pickle \return output argument values (tuple) as a python pickle */ pickledArgs execute(in string functionName, in pickledArgs inargs) raises (SALOME::SALOME_Exception); } ; interface PyScriptNode : PyNodeBase { /*! This method compiles, but NOT EXECUTE, the code \a codeStr. The result of the compiled code will be used then on execute step. \param codeStr - the python code (without statement) to be executed, that can modify the context initialized at initialization. */ void assignNewCompiledCode(in string codeStr) raises (SALOME::SALOME_Exception); /*! \brief execute a python script defined in the node \param outargsname output argument names \param inargs input argument values (dict) provided as a python pickle \return output argument values (tuple) as a python pickle */ pickledArgs execute(in listofstring outargsname, in pickledArgs inargs) raises (SALOME::SALOME_Exception); } ; }; #endif