1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 "CALCIUM python wrapping : Superv_Component class
27 %module(docstring=DOCSTRING) calcium
29 %feature("autodoc", "1");
33 #include <SALOMEconfig.h>
34 #include <Calcium.hxx>
36 #include <Superv_Component_i.hxx>
37 #include <Salome_file_i.hxx>
38 #include <omniORB4/CORBA.h>
40 //--- from omniORBpy.h (not present on Debian Sarge packages)
44 PyObject* (*cxxObjRefToPyObjRef)(const CORBA::Object_ptr cxx_obj,
45 CORBA::Boolean hold_lock);
46 // Convert a C++ object reference to a Python object reference.
47 // If <hold_lock> is true, caller holds the Python interpreter lock.
49 CORBA::Object_ptr (*pyObjRefToCxxObjRef)(PyObject* py_obj,
50 CORBA::Boolean hold_lock);
51 // Convert a Python object reference to a C++ object reference.
52 // Raises BAD_PARAM if the Python object is not an object reference.
53 // If <hold_lock> is true, caller holds the Python interpreter lock.
55 PyObject* (*handleCxxSystemException)(const CORBA::SystemException& ex);
56 // Sets the Python exception state to reflect the given C++ system
57 // exception. Always returns NULL. The caller must hold the Python
75 PyObject* omnipy = PyImport_ImportModule((char*)"_omnipy");
78 PyErr_SetString(PyExc_ImportError,
79 (char*)"Cannot import _omnipy");
82 PyObject* pyapi = PyObject_GetAttrString(omnipy, (char*)"API");
83 api = (omniORBpyAPI*)PyCObject_AsVoidPtr(pyapi);
86 PyObject* engines = PyImport_ImportModule("Engines");
87 dsc = PyObject_GetAttrString(engines, "DSC");
90 %include <exception.i>
95 * Most of this code is borrowed from numpy distribution
96 * The following code originally appeared in enthought/kiva/agg/src/numeric.i,
97 * author unknown. It was translated from C++ to C by John Hunter. Bill
98 * Spotz has modified it slightly to fix some minor bugs, add some comments
99 * and some functionality.
109 #include <numpy/arrayobject.h>
111 typedef PyArrayObject ArrayObject;
113 /* Macros to extract array attributes.
115 #define is_array(a) ((a) && PyArray_Check((PyArrayObject *)a))
116 #define array_type(a) (int)(PyArray_TYPE(a))
117 #define array_dimensions(a) (((PyArrayObject *)a)->nd)
118 #define array_size(a,i) (((PyArrayObject *)a)->dimensions[i])
119 #define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a))
121 /* Given a PyObject, return a string describing its type.
123 const char* pytype_string(PyObject* py_obj) {
124 if (py_obj == NULL ) return "C NULL value";
125 if (PyCallable_Check(py_obj)) return "callable" ;
126 if (PyString_Check( py_obj)) return "string" ;
127 if (PyInt_Check( py_obj)) return "int" ;
128 if (PyFloat_Check( py_obj)) return "float" ;
129 if (PyDict_Check( py_obj)) return "dict" ;
130 if (PyList_Check( py_obj)) return "list" ;
131 if (PyTuple_Check( py_obj)) return "tuple" ;
132 if (PyFile_Check( py_obj)) return "file" ;
133 if (PyModule_Check( py_obj)) return "module" ;
134 if (PyInstance_Check(py_obj)) return "instance" ;
136 return "unkown type";
140 For documentation only : numpy typecodes
142 enum NPY_TYPECHAR { NPY_BOOLLTR = '?',
151 NPY_LONGLONGLTR = 'q',
152 NPY_ULONGLONGLTR = 'Q',
155 NPY_LONGDOUBLELTR = 'g',
157 NPY_CDOUBLELTR = 'D',
158 NPY_CLONGDOUBLELTR = 'G',
161 NPY_STRINGLTR2 = 'a',
162 NPY_UNICODELTR = 'U',
171 NPY_UNSIGNEDLTR = 'u',
172 NPY_FLOATINGLTR = 'f',
177 /* Given a Numeric typecode, return a string describing the type.
179 const char* typecode_string(int typecode) {
180 const char* type_names[] = {"bool","byte","unsigned byte","short",
181 "unsigned short","int","unsigned int","long","unsigned long",
182 "longlong","unsigned longlong",
183 "float","double","long double","complex float","complex double","complex long double",
184 "object","string","unicode","void","ntypes","notype","char","unkown"};
185 return type_names[typecode];
188 /* Make sure input has correct numeric type. Allow character and byte
189 * to match. Also allow int and long to match.
191 int type_match(int actual_type, int desired_type) {
192 return PyArray_EquivTypenums(actual_type, desired_type);
195 /* Given a PyObject pointer, cast it to a PyArrayObject pointer if
196 * legal. If not, set the python error string appropriately and
199 PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) {
200 PyArrayObject* ary = NULL;
201 if (is_array(input) && (typecode == PyArray_NOTYPE ||
202 PyArray_EquivTypenums(array_type(input),
204 ary = (PyArrayObject*) input;
206 else if is_array(input) {
207 const char* desired_type = typecode_string(typecode);
208 const char* actual_type = typecode_string(array_type(input));
209 PyErr_Format(PyExc_TypeError,
210 "Array of type '%s' required. Array of type '%s' given",
211 desired_type, actual_type);
215 const char * desired_type = typecode_string(typecode);
216 const char * actual_type = pytype_string(input);
217 PyErr_Format(PyExc_TypeError,
218 "Array of type '%s' required. A %s was given",
219 desired_type, actual_type);
225 /* Convert the given PyObject to a Numeric array with the given
226 * typecode. On Success, return a valid PyArrayObject* with the
227 * correct type. On failure, the python error string will be set and
228 * the routine returns NULL.
230 PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode,
233 PyArrayObject* ary = NULL;
235 if (is_array(input) && (typecode == PyArray_NOTYPE || type_match(array_type(input),typecode))) {
236 ary = (PyArrayObject*) input;
240 py_obj = PyArray_FromObject(input, typecode, 0, 0);
241 /* If NULL, PyArray_FromObject will have set python error value.*/
242 ary = (PyArrayObject*) py_obj;
248 /* Given a PyArrayObject, check to see if it is contiguous. If so,
249 * return the input pointer and flag it as not a new object. If it is
250 * not contiguous, create a new PyArrayObject using the original data,
251 * flag it as a new object and return the pointer.
253 PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object,
254 int min_dims, int max_dims)
256 PyArrayObject* result;
257 if (array_is_contiguous(ary)) {
262 result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary,
271 /* Convert a given PyObject to a contiguous PyArrayObject of the
272 * specified type. If the input object is not a contiguous
273 * PyArrayObject, a new one will be created and the new object flag
276 PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input,
278 int* is_new_object) {
282 PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode,
285 ary2 = make_contiguous(ary1, &is_new2, 0, 0);
286 if ( is_new1 && is_new2) {
291 *is_new_object = is_new1 || is_new2;
295 /* Test whether a python object is contiguous. If array is
296 * contiguous, return 1. Otherwise, set the python error string and
299 int require_contiguous(PyArrayObject* ary) {
301 if (!array_is_contiguous(ary)) {
302 PyErr_SetString(PyExc_TypeError, "Array must be contiguous. A discontiguous array was given");
308 /* Require the given PyArrayObject to have a specified number of
309 * dimensions. If the array has the specified number of dimensions,
310 * return 1. Otherwise, set the python error string and return 0.
312 int require_dimensions(PyArrayObject* ary, int exact_dimensions) {
314 if (array_dimensions(ary) != exact_dimensions) {
315 PyErr_Format(PyExc_TypeError,
316 "Array must have %d dimensions. Given array has %d dimensions",
317 exact_dimensions, array_dimensions(ary));
323 /* Require the given PyArrayObject to have one of a list of specified
324 * number of dimensions. If the array has one of the specified number
325 * of dimensions, return 1. Otherwise, set the python error string
328 int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n) {
331 char dims_str[255] = "";
333 for (i = 0; i < n && !success; i++) {
334 if (array_dimensions(ary) == exact_dimensions[i]) {
339 for (i = 0; i < n-1; i++) {
340 sprintf(s, "%d, ", exact_dimensions[i]);
343 sprintf(s, " or %d", exact_dimensions[n-1]);
345 PyErr_Format(PyExc_TypeError,
346 "Array must have %s dimensions. Given array has %d dimensions",
347 dims_str, array_dimensions(ary));
352 /* Require the given PyArrayObject to have a specified shape. If the
353 * array has the specified shape, return 1. Otherwise, set the python
354 * error string and return 0.
356 int require_size(PyArrayObject* ary, int* size, int n) {
360 char desired_dims[255] = "[";
362 char actual_dims[255] = "[";
363 for(i=0; i < n;i++) {
364 if (size[i] != -1 && size[i] != array_size(ary,i)) {
369 for (i = 0; i < n; i++) {
375 sprintf(s, "%d,", size[i]);
377 strcat(desired_dims,s);
379 len = strlen(desired_dims);
380 desired_dims[len-1] = ']';
381 for (i = 0; i < n; i++) {
382 sprintf(s, "%d,", array_size(ary,i));
383 strcat(actual_dims,s);
385 len = strlen(actual_dims);
386 actual_dims[len-1] = ']';
387 PyErr_Format(PyExc_TypeError,
388 "Array must have shape of %s. Given array has shape of %s",
389 desired_dims, actual_dims);
396 typedef PyObject ArrayObject;
403 %array_class(int, intArray);
404 %array_class(float, floatArray);
405 %array_class(double, doubleArray);
407 /* special struct to handle string arrays */
411 stringArray(int nelements,int size=0) {
413 data= new char*[nelements];
414 for(int i=0;i<nelements;i++)
416 data[i]=(char *)malloc((size+1)*sizeof(char));
417 data[i][size+1]='\0';
422 std::cerr << "~stringArray() " << nelem << std::endl;
423 for(int i=0;i<nelem;i++)
427 char* __getitem__(int index) {
430 void __setitem__(int index, char* value) {
432 data[index] = strdup(value);
438 /* End of special struct to handle string arrays */
441 This typemap can be used for input array objects only.
442 It accepts swig carray objects or numpy contiguous or non contiguous objects.
443 In case of non-contiguous numpy object, it is converted (new object) into a contiguous numpy object
444 This new object is deleted after the call.
446 %define TYPEMAP_IN3(type,typecode)
447 %typemap(in) type* IN_ARRAY3
448 (ArrayObject* array=NULL, int is_new_object) {
449 if ((SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0)) == -1)
453 array = obj_to_array_contiguous_allow_conversion($input, typecode, &is_new_object);
454 if (!array || !require_dimensions(array,1) || !require_size(array,size,1)) SWIG_fail;
455 $1 = (type*) array->data;
457 SWIG_exception(SWIG_TypeError, "type* expected");
461 %typemap(freearg) type* IN_ARRAY3 {
462 if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum);
466 TYPEMAP_IN3(int, PyArray_INT)
467 TYPEMAP_IN3(float, PyArray_FLOAT )
468 TYPEMAP_IN3(double, PyArray_DOUBLE)
472 %apply int* IN_ARRAY3 {int *eval};
473 %apply float* IN_ARRAY3 {float *eval};
474 %apply double* IN_ARRAY3 {double *eval};
476 /* Specific typemap for complex */
477 %typemap(in) float* ecpval
478 (ArrayObject* array=NULL, int is_new_object) {
479 if ((SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0)) == -1)
483 array = obj_to_array_contiguous_allow_conversion($input, PyArray_CFLOAT, &is_new_object);
484 if (!array || !require_dimensions(array,1) || !require_size(array,size,1)) SWIG_fail;
485 $1 = (float*) array->data;
487 SWIG_exception(SWIG_TypeError, "complex array expected");
491 %typemap(freearg) float* ecpval {
492 if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum);
494 /* End of Specific typemap for complex */
496 /* array of strings on input */
497 %typemap(in) char** eval
498 (ArrayObject* array=NULL, int is_new_object) {
500 if ((SWIG_ConvertPtr($input, (void **) &sarray, $descriptor(stringArray *),0)) == -1)
504 array = obj_to_array_contiguous_allow_conversion($input, PyArray_STRING, &is_new_object);
505 if (!array || !require_dimensions(array,1) || !require_size(array,size,1)) SWIG_fail;
506 $1 = (char**) malloc(array_size(array,0)*sizeof(char*));
507 for(int i=0;i<array_size(array,0);i++)
508 $1[i]=(char*) array->data + i* array->strides[0];
510 SWIG_exception(SWIG_TypeError, "string array expected");
519 %typemap(freearg) char** eval {
520 if (array$argnum) free($1);
521 if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum);
523 /* End of array of strings on input */
526 This typemap can be used for input/output array objects.
527 It accepts swig carray objects or numpy contiguous objects.
530 %define TYPEMAP_INPLACE3(type,typecode)
531 %typemap(in) type* INPLACE_ARRAY3 (ArrayObject* temp=NULL) {
532 if ((SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0)) == -1)
535 temp = obj_to_array_no_conversion($input,typecode);
536 if (!temp || !require_contiguous(temp)) SWIG_fail;
537 $1 = (type*) temp->data;
540 SWIG_exception(SWIG_TypeError, "type* expected");
546 TYPEMAP_INPLACE3(int, PyArray_INT)
547 TYPEMAP_INPLACE3(float, PyArray_FLOAT )
548 TYPEMAP_INPLACE3(double, PyArray_DOUBLE)
550 #undef TYPEMAP_INPLACE3
552 %apply int* INPLACE_ARRAY3 {int *lval};
553 %apply float* INPLACE_ARRAY3 {float *lval};
554 %apply double* INPLACE_ARRAY3 {double *lval};
556 /* typemap for complex inout */
557 %typemap(in) float* lcpval
558 (ArrayObject* temp=NULL) {
559 if ((SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0)) == -1)
562 temp = obj_to_array_no_conversion($input,PyArray_CFLOAT);
563 if (!temp || !require_contiguous(temp)) SWIG_fail;
564 $1 = (float*) temp->data;
567 SWIG_exception(SWIG_TypeError, "complex array expected");
571 /* End of typemap for complex inout */
573 /* typemap for array of strings on input/output */
574 %typemap(in) char** lval
575 (ArrayObject* temp=NULL) {
577 if ((SWIG_ConvertPtr($input, (void **) &sarray, $descriptor(stringArray *) ,0)) == -1)
580 temp = obj_to_array_no_conversion($input,PyArray_STRING);
581 if (!temp || !require_contiguous(temp)) SWIG_fail;
582 $1 = (char**) malloc(array_size(temp,0)*sizeof(char*));
583 for(int i=0;i<array_size(temp,0);i++)
584 $1[i]=(char*) temp->data+i*temp->strides[0];
587 SWIG_exception(SWIG_TypeError, "string array expected");
595 %typemap(freearg) char** lval {
596 if (temp$argnum) free($1);
598 /* End of typemap for array of strings on input/output */
600 %typemap(in) CORBA::Boolean
602 $1=(CORBA::Boolean)PyInt_AsLong($input);
604 %typemap(out) CORBA::Boolean
606 $result=PyInt_FromLong($1 ? 1 : 0);
609 %define CORBAPTR(type)
610 %typemap(in) type##_ptr
612 Py_BEGIN_ALLOW_THREADS
615 CORBA::Object_var obj = api->pyObjRefToCxxObjRef($input,0);
616 $1 = type##::_narrow(obj);
621 PyErr_SetString(PyExc_RuntimeError, "not a valid CORBA object ptr");
625 %typemap(freearg) type##_ptr {
631 CORBAPTR(Ports::PortProperties)
632 CORBAPTR(Ports::Port)
633 CORBAPTR(Engines::Container)
634 CORBAPTR(PortableServer::POA)
636 %typemap(out) Ports::Port_ptr
638 $result = api->cxxObjRefToPyObjRef($1, 1);
639 //All output Ports::Port_ptr variables are duplicated by security. Need to release them for python . Explanation ??
643 %typemap(out) Ports::PortProperties_ptr, Engines::Salome_file_ptr
645 $result = api->cxxObjRefToPyObjRef($1, 1);
648 %typemap(out) Engines::DSC::uses_port *
650 $result = PyList_New($1->length());
651 for (CORBA::ULong i=0; i < $1->length() ; i++)
652 PyList_SetItem($result,i,api->cxxObjRefToPyObjRef((*$1)[i], 1));
653 //delete the copy (created by new) of uses port sequence
660 // a general exception handler
662 Py_BEGIN_ALLOW_THREADS
666 catch(Engines::DSC::PortNotDefined& _e) {
668 PyObject* excc = PyObject_GetAttrString(dsc, "PortNotDefined");
669 PyObject* exci = PyEval_CallObject(excc, (PyObject *)NULL);
670 PyErr_SetObject(excc, exci);
675 catch(Engines::DSC::PortNotConnected& _e) {
677 PyObject* excc = PyObject_GetAttrString(dsc, "PortNotConnected");
678 PyObject* exci = PyEval_CallObject(excc, (PyObject *)NULL);
679 PyErr_SetObject(excc, exci);
684 catch(Engines::DSC::BadPortType& _e) {
686 PyObject* excc = PyObject_GetAttrString(dsc, "BadPortType");
687 PyObject* exci = PyEval_CallObject(excc, (PyObject *)NULL);
688 PyErr_SetObject(excc, exci);
693 catch (SALOME_Exception &e) {
695 PyErr_SetString(PyExc_RuntimeError,e.what());
698 catch (SALOME::SALOME_Exception &e) {
700 //This one should be converted into a python corba exception
701 PyErr_SetString(PyExc_RuntimeError,e.details.text);
704 catch (const CORBA::SystemException& e) {
706 return api->handleCxxSystemException(e);
710 PyErr_SetString(PyExc_ValueError,"Unknown exception");
717 * End of Exception section
724 enum Message { AddingConnection, RemovingConnection, ApplicationError };
728 class PySupervCompo:public Superv_Component_i
732 PySupervCompo(CORBA::ORB_ptr orb,
733 PortableServer::POA_ptr poa,
734 Engines::Container_ptr contai,
735 const char *instanceName,
736 const char *interfaceName);
738 virtual ~PySupervCompo();
739 CORBA::Boolean init_service(const char * service_name){return true;};
740 virtual provides_port * create_provides_data_port(const char* port_fab_type)
742 virtual uses_port * create_uses_data_port(const char* port_fab_type)
744 virtual void add_port(const char * port_fab_type,
745 const char * port_type,
746 const char * port_name)
747 throw (PortAlreadyDefined, BadFabType, BadType, BadProperty);
748 template < typename SpecificPortType >
749 SpecificPortType * add_port(const char * port_fab_type,
750 const char * port_type,
751 const char * port_name)
752 throw (PortAlreadyDefined, BadFabType, BadType, BadCast, BadProperty);
753 virtual void add_port(provides_port * port,
754 const char* provides_port_name)
755 throw (PortAlreadyDefined, NilPort, BadProperty);
756 virtual void add_port(uses_port * port,
757 const char* uses_port_name)
758 throw (PortAlreadyDefined, NilPort, BadProperty);
759 template <typename SpecificPortType >
760 SpecificPortType * get_port( const char * port_name)
761 throw (PortNotDefined, PortNotConnected, BadCast, UnexpectedState);
762 virtual Ports::Port_ptr get_provides_port(const char* provides_port_name,
763 const CORBA::Boolean connection_error)
764 throw (Engines::DSC::PortNotDefined,
765 Engines::DSC::PortNotConnected,
766 Engines::DSC::BadPortType);
767 virtual void connect_uses_port(const char* uses_port_name,
768 Ports::Port_ptr provides_port_ref)
769 throw (Engines::DSC::PortNotDefined,
770 Engines::DSC::BadPortType,
771 Engines::DSC::NilPort);
772 virtual void connect_provides_port(const char* provides_port_name)
773 throw (Engines::DSC::PortNotDefined);
774 virtual void disconnect_provides_port(const char* provides_port_name,
775 const Engines::DSC::Message message)
776 throw (Engines::DSC::PortNotDefined,
777 Engines::DSC::PortNotConnected);
779 virtual void disconnect_uses_port(const char* uses_port_name,
780 Ports::Port_ptr provides_port_ref,
781 const Engines::DSC::Message message)
782 throw (Engines::DSC::PortNotDefined,
783 Engines::DSC::PortNotConnected,
784 Engines::DSC::BadPortReference);
786 virtual Ports::PortProperties_ptr get_port_properties(const char* port_name);
788 // Interface for Salome_file
789 Engines::Salome_file_ptr getInputFileToService(const char* service_name, const char* Salome_file_name);
790 void checkInputFilesToService(const char* service_name);
791 Engines::Salome_file_ptr setInputFileToService(const char* service_name, const char* Salome_file_name);
792 Engines::Salome_file_ptr getOutputFileToService(const char* service_name, const char* Salome_file_name);
793 void checkOutputFilesToService(const char* service_name);
794 Engines::Salome_file_ptr setOutputFileToService(const char* service_name, const char* Salome_file_name);
795 // End of Interface for Salome_file
797 // DSC interface for python components
798 virtual void add_provides_port(Ports::Port_ptr ref, const char* provides_port_name, Ports::PortProperties_ptr port_prop);
799 virtual void add_uses_port(const char* repository_id, const char* uses_port_name, Ports::PortProperties_ptr port_prop);
800 virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name);
801 CORBA::Boolean is_connected(const char* port_name) throw (Engines::DSC::PortNotDefined);
802 // End of DSC interface for python components
808 //To get the address of the component
816 %apply int *OUTPUT { int *nval };
817 %apply float *INOUT { float *ti };
818 %apply float *INPUT { float *tf };
819 %apply int *INOUT { int *niter };
820 %apply double *INOUT { double *ti };
821 %apply double *INPUT { double *tf };
823 extern "C" void create_calcium_port(Superv_Component_i* compo,char* name,char* type,char *mode,char* depend);
826 %include "calciumP.h"
828 int cp_cd(Superv_Component_i *component,char *name);
830 int cp_een(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,int *eval);
831 int cp_edb(Superv_Component_i *component,int dep,double t,int n,char *nom,int nval,double *eval);
832 int cp_ere(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,float *eval);
833 int cp_ecp(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,float *ecpval);
834 int cp_elo(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,int *eval);
835 int cp_ech(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,char** eval,int strSize);
838 int cp_len(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,int *lval);
839 int cp_ldb(Superv_Component_i *component,int dep,double *ti,double *tf,int *niter,char *nom,int nmax,int *nval,double *lval);
840 int cp_lre(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,float *lval);
841 int cp_lcp(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,float *lcpval);
842 int cp_llo(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,int *lval);
843 int cp_lch(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,char** lval,int strSize);
845 int cp_fin(Superv_Component_i *component,int cp_end);