Version: 8.3.0
Main Page
Related Pages
Packages
Data Structures
Files
File List
Globals
SALOME KERNEL Developer
Deprecated List
Packages
Data Structures
Files
File List
idl
src
Basics
Communication
Container
DF
DSC
DSC_Basic
DSC_User
Basic
Datastream
Calcium
Calcium.cxx
calcium.h
Calcium.hxx
calcium_complex_port_uses.hxx
calcium_destructors_port_uses.cxx
calcium_double_port_uses.hxx
calcium_intc_port_uses.hxx
calcium_logical_port_uses.hxx
calcium_long_port_uses.hxx
calcium_port_factory.cxx
calcium_port_factory.hxx
calcium_provides_port.cxx
calcium_provides_port.hxx
calcium_real_port_uses.hxx
calcium_repository_types.cxx
calcium_string_port_uses.hxx
calcium_uses_port.cxx
calcium_uses_port.hxx
CalciumC.c
CalciumCInterface.cxx
CalciumCInterface.hxx
CalciumCouplingPolicy.cxx
CalciumCouplingPolicy.hxx
CalciumCxxInterface.cxx
CalciumCxxInterface.hxx
calciumE.h
CalciumException.hxx
calciumf.c
calciumf.h
CalciumGenericProvidesPort.hxx
CalciumGenericUsesPort.hxx
CalciumInterface.hxx
CalciumMacroCInterface.hxx
calciumP.h
CalciumPortTraits.hxx
CalciumProvidesPort.cxx
CalciumTypes.hxx
CalciumTypes2CorbaTypes.cxx
CalciumTypes2CorbaTypes.hxx
CalciumTypesManipulator.hxx
Copy2CorbaSpace.hxx
Copy2UserSpace.hxx
CorbaTypes2CalciumTypes.cxx
CorbaTypes2CalciumTypes.hxx
fortoc.h
test_CalciumInterface.cxx
test_DataIdContainer.cxx
testInterpolation.cxx
version.h
Palm
AdjacentFunctor.hxx
AdjacentPredicate.hxx
ConstTraits.hxx
CorbaTypeManipulator.hxx
CouplingPolicy.hxx
DataIdFilter.hxx
DisplayPair.hxx
fake.cc
FindKeyPredicate.hxx
GenericPort.hxx
GenericProvidesPort.hxx
GenericUsesPort.hxx
IteratorTraits.hxx
ProcessTimeIntervalTraits.hxx
testAdjacentFunctor.cxx
testAdjacentPredicate.cxx
base_port.cxx
base_port.hxx
DSC_Exception.hxx
port_factory.hxx
provides_port.cxx
provides_port.hxx
Superv_Component_i.cxx
Superv_Component_i.hxx
test_DSC_Exception.cxx
uses_port.cxx
uses_port.hxx
ParallelDSC
GenericObj
HDFPersist
KernelHelpers
Launcher
LifeCycleCORBA
Logger
ModuleCatalog
ModuleGenerator
MPIContainer
NamingService
Notification
NOTIFICATION_SWIG
ParallelContainer
Registry
ResourcesManager
SALOMEDS
SALOMEDSClient
SALOMEDSImpl
SALOMELocalTrace
SALOMESDS
SALOMETraceCollector
TestContainer
TestMPIContainer
TOOLSDS
UnitTests
Utils
Globals
CalciumCInterface.hxx
Go to the documentation of this file.
1
// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
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
/*
21
File : CalciumInterface.hxx
22
Author : Eric Fayolle (EDF)
23
Module : KERNEL
24
Modified by : $LastChangedBy$
25
Date : $LastChangedDate: 2007-03-01 13:27:58 +0100 (jeu, 01 mar 2007) $
26
Id : $Id$
27
*/
28
#ifndef _CALCIUM_C_INTERFACE_H_
29
#define _CALCIUM_C_INTERFACE_H_
30
31
#include "
CalciumMacroCInterface.hxx
"
32
#include "
CalciumTypes.hxx
"
33
#include "CalciumFortranInt.h"
34
#include <cstdlib>
35
36
/* D�claration de l'Interface entre l'API C et l'API C++
37
L'utilisateur CALCIUM n'a normalement pas a utliser cette interface
38
En C/C++ il utilisera celle d�finie dans Calcium.c (calcium.h)
39
2 En C++/CORBA directement celle de CalciumCxxInterface.hxx
40
*/
41
42
/* En CALCIUM l'utilisation de donn�es de type double
43
implique des dates de type double, pour les autres
44
types de donn�es les dates sont de type float
45
*/
46
template
<
class
T>
struct
CalTimeType
{
47
typedef
float
TimeType
;
48
};
49
50
template
<>
struct
CalTimeType
<double> {
51
typedef
double
TimeType
;
52
};
53
54
/* D�claration de ecp_lecture_... , ecp_ecriture_..., ecp_free_... */
55
56
/* Le premier argument est utilis� :
57
- comme suffixe dans la d�finition des noms ecp_lecture_ , ecp_ecriture_ et ecp_free_
58
Le second argument est utilis� :
59
- comme argument template � l'appel de la m�thode C++ correspondante
60
( le type CORBA de port correspondant est alors obtenu par un trait)
61
Le troisi�me argument est utilis�e :
62
- pour typer le param�tre data de la proc�dure g�n�r�e
63
- pour d�duire le type des param�tres t, ti tf via un trait
64
- comme premier param�tre template � l'appel de la m�thode C++ correspondante
65
(pour typer les donn�es pass�es en param�tre )
66
Notons que dans le cas CALCIUM_C2CPP_INTERFACE_(int,int,), le type int n'existe pas
67
en CORBA, le port CALCIUM correspondant utilise une s�quence de long. La m�thode
68
C++ CALCIUM de lecture rep�re cette diff�rence de type et charge
69
le manipulateur de donn�es d'effectuer une recopie (qui fonctionne si les types sont compatibles).
70
Notons qu'en CORBA CORBA:Long est mapp� sur long uniquement si celui-ci est 32bits sinon
71
il sera mapp� sur le type int (si il est 32bits). Le type CORBA:LongLong est mapp� sur le type long
72
s'il est 64 bits sinon cel� peut �tre un long long (s'il existe).
73
*/
74
CALCIUM_C2CPP_INTERFACE_HXX_
(
intc
,
int
,
int
,);
75
CALCIUM_C2CPP_INTERFACE_HXX_
(
long
,
long
,
long
,);
76
77
CALCIUM_C2CPP_INTERFACE_HXX_
(
integer
,
integer
,cal_int,);
78
CALCIUM_C2CPP_INTERFACE_HXX_
(int2integer,
integer
,
int
,);
79
CALCIUM_C2CPP_INTERFACE_HXX_
(long2integer,
integer
,
long
,);
80
81
CALCIUM_C2CPP_INTERFACE_HXX_
(
float
,
float
,
float
, );
82
CALCIUM_C2CPP_INTERFACE_HXX_
(
double
,
double
,
double
,);
83
84
CALCIUM_C2CPP_INTERFACE_HXX_
(float2double,
double
,
float
, );
85
86
/* Fonctionne mais essai suivant pour simplification de Calcium.c CALCIUM_C2CPP_INTERFACE_(bool,bool,);*/
87
CALCIUM_C2CPP_INTERFACE_HXX_
(
bool
,
bool
,
int
,);
88
CALCIUM_C2CPP_INTERFACE_HXX_
(
cplx
,
cplx
,
float
,);
89
CALCIUM_C2CPP_INTERFACE_HXX_
(
str
,
str
,
char
*,);
90
91
/* D�claration de ecp_fin */
92
extern
"C"
CalciumTypes::InfoType
ecp_fin_
(
void
* component,
int
code);
93
extern
"C"
CalciumTypes::InfoType
ecp_cd_
(
void
* component,
char
* instanceName);
94
extern
"C"
CalciumTypes::InfoType
ecp_fini_
(
void
* component,
char
* nomVar,
int
i);
95
extern
"C"
CalciumTypes::InfoType
ecp_fint_
(
void
* component,
char
* nomVar,
float
t);
96
extern
"C"
CalciumTypes::InfoType
ecp_effi_
(
void
* component,
char
* nomVar,
int
i);
97
extern
"C"
CalciumTypes::InfoType
ecp_efft_
(
void
* component,
char
* nomVar,
float
t);
98
99
#endif
src
DSC
DSC_User
Datastream
Calcium
CalciumCInterface.hxx
Copyright © 2007-2017 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS