Version: 8.3.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
YACS
Introduction
Features
Packages
Building
TODOs
Base classes
Engine
SALOME Runtime
XML file loader
GUI design
Python wrapping
PMMLlib C++ examples
Configuring and Installing PMML from sources
PMMLlib
PMMLlib Python examples
Modules
Namespaces
Classes
Files
File List
idl
src
bases
engine
genericgui
hmi
pmml
pyqt
runtime
AutoGIL.hxx
CalStreamPort.cxx
CalStreamPort.hxx
CORBAComponent.cxx
CORBAComponent.hxx
CORBACORBAConv.cxx
CORBACORBAConv.hxx
CORBACppConv.cxx
CORBACppConv.hxx
CORBANeutralConv.cxx
CORBANeutralConv.hxx
CORBANode.cxx
CORBANode.hxx
CORBAPorts.cxx
CORBAPorts.hxx
CORBAPythonConv.cxx
CORBAPythonConv.hxx
CORBAXMLConv.cxx
CORBAXMLConv.hxx
CppComponent.cxx
CppComponent.hxx
CppContainer.cxx
CppContainer.hxx
CppCORBAConv.cxx
CppCORBAConv.hxx
CppCppConv.cxx
CppCppConv.hxx
CppNeutralConv.cxx
CppNeutralConv.hxx
CppNode.cxx
CppNode.hxx
CppPorts.cxx
CppPorts.hxx
CppPythonConv.cxx
CppPythonConv.hxx
CppXMLConv.cxx
CppXMLConv.hxx
DistributedPythonNode.cxx
DistributedPythonNode.hxx
NeutralCORBAConv.cxx
NeutralCORBAConv.hxx
NeutralCppConv.cxx
NeutralCppConv.hxx
NeutralInitConv.cxx
NeutralInitConv.hxx
NeutralPythonConv.cxx
NeutralPythonConv.hxx
NeutralXMLConv.cxx
NeutralXMLConv.hxx
OutNode.cxx
OutNode.hxx
PresetNode.cxx
PresetNode.hxx
PresetPorts.cxx
PresetPorts.hxx
PyOptimizerAlg.cxx
PyOptimizerAlg.hxx
PyStdout.cxx
PyStdout.hxx
PythonCORBAConv.cxx
PythonCORBAConv.hxx
PythonCppConv.cxx
PythonCppConv.hxx
PythonInitConv.cxx
PythonInitConv.hxx
PythonNeutralConv.cxx
PythonNeutralConv.hxx
PythonNode.cxx
PythonNode.hxx
PythonPorts.cxx
PythonPorts.hxx
PythonXMLConv.cxx
PythonXMLConv.hxx
RuntimeSALOME.cxx
RuntimeSALOME.hxx
SalomeComponent.cxx
SalomeComponent.hxx
SalomeContainer.cxx
SalomeContainer.hxx
SalomeContainerHelper.cxx
SalomeContainerHelper.hxx
SalomeContainerTmpForHP.cxx
SalomeContainerTmpForHP.hxx
SalomeContainerTools.cxx
SalomeContainerTools.hxx
SALOMEDispatcher.cxx
SALOMEDispatcher.hxx
SalomeHPComponent.cxx
SalomeHPComponent.hxx
SalomeHPContainer.cxx
SalomeHPContainer.hxx
SalomeHPContainerTools.cxx
SalomeHPContainerTools.hxx
SalomeOptimizerLoop.cxx
SalomeOptimizerLoop.hxx
SalomeProc.cxx
SalomeProc.hxx
SalomePythonComponent.cxx
SalomePythonComponent.hxx
SalomePythonNode.cxx
SalomePythonNode.hxx
SessionCataLoader.cxx
SessionCataLoader.hxx
StudyNodes.cxx
StudyNodes.hxx
StudyPorts.cxx
StudyPorts.hxx
TypeConversions.cxx
TypeConversions.hxx
VisitorSalomeSaveState.cxx
VisitorSalomeSaveState.hxx
VisitorSaveSalomeSchema.cxx
VisitorSaveSalomeSchema.hxx
XMLCORBAConv.cxx
XMLCORBAConv.hxx
XMLCppConv.cxx
XMLCppConv.hxx
XMLNeutralConv.cxx
XMLNeutralConv.hxx
XMLNode.cxx
XMLNode.hxx
XMLPorts.cxx
XMLPorts.hxx
XMLPythonConv.cxx
XMLPythonConv.hxx
YACSRuntimeSALOMEExport.hxx
salomegui
salomewrap
yacsloader
yacsorb
File Members
NeutralPythonConv.cxx
Go to the documentation of this file.
1
// Copyright (C) 2006-2016 CEA/DEN, EDF R&D
2
//
3
// This library is free software; you can redistribute it and/or
4
// modify it under the terms of the GNU Lesser General Public
5
// License as published by the Free Software Foundation; either
6
// version 2.1 of the License, or (at your option) any later version.
7
//
8
// This library is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
// Lesser General Public License for more details.
12
//
13
// You should have received a copy of the GNU Lesser General Public
14
// License along with this library; if not, write to the Free Software
15
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
//
17
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
//
19
20
#include "
TypeConversions.hxx
"
21
#include "
NeutralPythonConv.hxx
"
22
#include "
RuntimeSALOME.hxx
"
23
24
#include <iostream>
25
#include <string>
26
27
//#define _DEVDEBUG_
28
#include "
YacsTrace.hxx
"
29
30
using namespace
YACS::ENGINE;
31
using namespace
std;
32
33
void
NeutralPyDouble::put
(
const
void
*data)
throw
(
ConversionException
)
34
{
35
put((
YACS::ENGINE::Any
*)data);
36
}
37
39
42
void
NeutralPyDouble::put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
)
43
{
44
InterpreterUnlocker
loc;
45
PyObject* ob=
convertNeutralPyObject
(edGetType(),data);
46
DEBTRACE
(
"ob refcnt: "
<< ob->ob_refcnt );
47
_port->put(ob);
48
Py_DECREF(ob);
49
}
50
51
52
void
NeutralPyInt::put
(
const
void
*data)
throw
(
ConversionException
)
53
{
54
put((
YACS::ENGINE::Any
*)data);
55
}
56
58
61
void
NeutralPyInt::put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
)
62
{
63
InterpreterUnlocker
loc;
64
PyObject* ob=
convertNeutralPyObject
(edGetType(),data);
65
DEBTRACE
(
"ob refcnt: "
<< ob->ob_refcnt );
66
_port->put(ob);
67
Py_DECREF(ob);
68
}
69
70
void
NeutralPyString::put
(
const
void
*data)
throw
(
ConversionException
)
71
{
72
put((
YACS::ENGINE::Any
*)data);
73
}
74
76
79
void
NeutralPyString::put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
)
80
{
81
InterpreterUnlocker
loc;
82
PyObject* ob=
convertNeutralPyObject
(edGetType(),data);
83
DEBTRACE
(
"ob refcnt: "
<< ob->ob_refcnt );
84
_port->put(ob);
85
Py_DECREF(ob);
86
}
87
88
void
NeutralPyBool::put
(
const
void
*data)
throw
(
ConversionException
)
89
{
90
put((
YACS::ENGINE::Any
*)data);
91
}
92
94
97
void
NeutralPyBool::put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
)
98
{
99
InterpreterUnlocker
loc;
100
PyObject* ob=
convertNeutralPyObject
(edGetType(),data);
101
DEBTRACE
(
"ob refcnt: "
<< ob->ob_refcnt );
102
_port->put(ob);
103
Py_DECREF(ob);
104
}
105
106
void
NeutralPyObjref::put
(
const
void
*data)
throw
(
ConversionException
)
107
{
108
put((
YACS::ENGINE::Any
*)data);
109
}
110
112
115
void
NeutralPyObjref::put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
)
116
{
117
InterpreterUnlocker
loc;
118
PyObject* ob=
convertNeutralPyObject
(edGetType(),data);
119
DEBTRACE
(
"ob refcnt: "
<< ob->ob_refcnt );
120
_port->put(ob);
121
Py_DECREF(ob);
122
DEBTRACE
(
"ob refcnt: "
<< ob->ob_refcnt );
123
}
124
125
void
NeutralPySequence::put
(
const
void
*data)
throw
(
ConversionException
)
126
{
127
put((
YACS::ENGINE::Any
*)data);
128
}
129
131
134
void
NeutralPySequence::put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
)
135
{
136
DEBTRACE
(
"--------NeutralPySequence::put"
);
137
InterpreterUnlocker
loc;
138
PyObject* ob=
convertNeutralPyObject
(edGetType(),data);
139
DEBTRACE
(
"ob refcnt: "
<< ob->ob_refcnt );
140
#ifdef _DEVDEBUG_
141
cerr <<
"Sequence= "
;
142
PyObject_Print(ob,stderr,Py_PRINT_RAW);
143
cerr << endl;
144
#endif
145
_port->put(ob);
146
Py_DECREF(ob);
147
DEBTRACE
(
"ob refcnt: "
<< ob->ob_refcnt );
148
}
149
150
void
NeutralPyStruct::put
(
const
void
*data)
throw
(
ConversionException
)
151
{
152
put((
YACS::ENGINE::Any
*)data);
153
}
154
156
159
void
NeutralPyStruct::put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
)
160
{
161
InterpreterUnlocker
loc;
162
PyObject* ob=
convertNeutralPyObject
(edGetType(),data);
163
DEBTRACE
(
"ob refcnt: "
<< ob->ob_refcnt );
164
_port->put(ob);
165
Py_DECREF(ob);
166
DEBTRACE
(
"ob refcnt: "
<< ob->ob_refcnt );
167
}
src
runtime
NeutralPythonConv.cxx
Copyright © 2006-2017 CEA/DEN, EDF R&D