Version: 8.3.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
NeutralPythonConv.hxx
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
#ifndef __NEUTRALPYTHONCONV_HXX__
21
#define __NEUTRALPYTHONCONV_HXX__
22
23
#include "
PythonPorts.hxx
"
24
25
namespace
YACS
26
{
27
namespace
ENGINE
28
{
29
// --- adaptator ports Neutral->Python for several types
30
31
class
NeutralPyDouble
:
public
ProxyPort
32
{
33
public
:
34
NeutralPyDouble
(
InputPyPort
*
p
)
35
:
ProxyPort
(p),
DataPort
(p->
getName
(), p->
getNode
(), p->
edGetType
()),
Port
(p->
getNode
()) {}
36
virtual
void
put
(
const
void
*data)
throw
(
ConversionException
);
37
void
put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
);
38
};
39
40
class
NeutralPyInt
:
public
ProxyPort
41
{
42
public
:
43
NeutralPyInt
(
InputPyPort
*
p
)
44
:
ProxyPort
(p),
DataPort
(p->
getName
(), p->
getNode
(), p->
edGetType
()),
Port
(p->
getNode
()) {}
45
virtual
void
put
(
const
void
*data)
throw
(
ConversionException
);
46
void
put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
);
47
};
48
49
class
NeutralPyString
:
public
ProxyPort
50
{
51
public
:
52
NeutralPyString
(
InputPyPort
*
p
)
53
:
ProxyPort
(p),
DataPort
(p->
getName
(), p->
getNode
(), p->
edGetType
()),
Port
(p->
getNode
()) {}
54
virtual
void
put
(
const
void
*data)
throw
(
ConversionException
);
55
void
put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
);
56
};
57
58
class
NeutralPyBool
:
public
ProxyPort
59
{
60
public
:
61
NeutralPyBool
(
InputPyPort
*
p
)
62
:
ProxyPort
(p),
DataPort
(p->
getName
(), p->
getNode
(), p->
edGetType
()),
Port
(p->
getNode
()) {}
63
virtual
void
put
(
const
void
*data)
throw
(
ConversionException
);
64
void
put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
);
65
};
66
67
class
NeutralPyObjref
:
public
ProxyPort
68
{
69
public
:
70
NeutralPyObjref
(
InputPyPort
*
p
)
71
:
ProxyPort
(p),
DataPort
(p->
getName
(), p->
getNode
(), p->
edGetType
()),
Port
(p->
getNode
()) {}
72
virtual
void
put
(
const
void
*data)
throw
(
ConversionException
);
73
void
put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
);
74
};
75
76
class
NeutralPySequence
:
public
ProxyPort
77
{
78
public
:
79
NeutralPySequence
(
InputPyPort
*
p
)
80
:
ProxyPort
(p),
DataPort
(p->
getName
(), p->
getNode
(), p->
edGetType
()),
Port
(p->
getNode
()) {}
81
virtual
void
put
(
const
void
*data)
throw
(
ConversionException
);
82
void
put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
);
83
};
84
85
class
NeutralPyStruct
:
public
ProxyPort
86
{
87
public
:
88
NeutralPyStruct
(
InputPyPort
*
p
)
89
:
ProxyPort
(p),
DataPort
(p->
getName
(), p->
getNode
(), p->
edGetType
()),
Port
(p->
getNode
()) {}
90
virtual
void
put
(
const
void
*data)
throw
(
ConversionException
);
91
void
put
(
YACS::ENGINE::Any
*data)
throw
(
ConversionException
);
92
};
93
}
94
}
95
#endif
src
runtime
NeutralPythonConv.hxx
Copyright © 2006-2017 CEA/DEN, EDF R&D