From 2ee1dbe11b21c4035b58473fdf9ef62be55aea16 Mon Sep 17 00:00:00 2001 From: caremoli Date: Wed, 13 Feb 2008 13:50:40 +0000 Subject: [PATCH] CCAR: add methods to transfer files (6) to Python wrapping for DSC component --- src/DSC/DSC_Python/calcium.i | 10 +++++++++- src/DSC/DSC_Python/dsccalcium.py | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/DSC/DSC_Python/calcium.i b/src/DSC/DSC_Python/calcium.i index 0deafca80..beb704e77 100644 --- a/src/DSC/DSC_Python/calcium.i +++ b/src/DSC/DSC_Python/calcium.i @@ -13,6 +13,7 @@ #include #include #include +#include #include //--- from omniORBpy.h (not present on Debian Sarge packages) @@ -453,7 +454,7 @@ TYPEMAP_INPLACE3(double, PyArray_DOUBLE) } } -%typemap(out) Ports::Port_ptr , Ports::PortProperties_ptr +%typemap(out) Ports::Port_ptr , Ports::PortProperties_ptr, Engines::Salome_file_ptr { $result = api->cxxObjRefToPyObjRef($1, 1); } @@ -565,6 +566,13 @@ class PySupervCompo:public Superv_Component_i virtual Ports::PortProperties_ptr get_port_properties(const char* port_name); + Engines::Salome_file_ptr getInputFileToService(const char* service_name, const char* Salome_file_name); + void checkInputFilesToService(const char* service_name); + Engines::Salome_file_ptr setInputFileToService(const char* service_name, const char* Salome_file_name); + Engines::Salome_file_ptr getOutputFileToService(const char* service_name, const char* Salome_file_name); + void checkOutputFilesToService(const char* service_name); + Engines::Salome_file_ptr setOutputFileToService(const char* service_name, const char* Salome_file_name); + %extend { //To get the address of the component diff --git a/src/DSC/DSC_Python/dsccalcium.py b/src/DSC/DSC_Python/dsccalcium.py index c96fdc16c..48836d661 100644 --- a/src/DSC/DSC_Python/dsccalcium.py +++ b/src/DSC/DSC_Python/dsccalcium.py @@ -51,3 +51,21 @@ class PyDSCComponent(SALOME_ComponentPy.SALOME_ComponentPy_i, def get_port_properties(self,name): return self.proxy.get_port_properties(name) + def setInputFileToService(self,service_name,Salome_file_name): + return self.proxy.setInputFileToService(service_name,Salome_file_name) + + def checkInputFilesToService(self,service_name): + return self.proxy.checkInputFilesToService(service_name) + + def getInputFileToService(self,service_name,Salome_file_name): + return self.proxy.getInputFileToService(service_name,Salome_file_name) + + def setOutputFileToService(self,service_name,Salome_file_name): + return self.proxy.setOutputFileToService(service_name,Salome_file_name) + + def getOutputFileToService(self,service_name,Salome_file_name): + return self.proxy.getOutputFileToService(service_name,Salome_file_name) + + def checkOutputFilesToService(self,service_name): + return self.proxy.checkOutputFilesToService(service_name) + -- 2.39.2