/usr/include/salome/CalciumMacroCInterface.hxx is in salome-kernel-dev 6.5.0-7ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
/*
File : CalciumInterface.hxx
Author : Eric Fayolle (EDF)
Module : KERNEL
Modified by : $LastChangedBy$
Date : $LastChangedDate: 2007-03-01 13:27:58 +0100 (jeu, 01 mar 2007) $
Id : $Id: CalciumMacroCInterface.hxx,v 1.1.2.3.14.3.12.1 2012-04-12 14:05:06 vsr Exp $
*/
#ifndef _CALCIUM_MACRO_C_INTERFACE_H_
#define _CALCIUM_MACRO_C_INTERFACE_H_
/****** CALCIUM_C2CPP_INTERFACE_HXX_ : ******/
/****** Declarations: ecp_lecture_... , ecp_ecriture_..., ecp_free_... ******/
#define CALCIUM_C2CPP_INTERFACE_HXX_(_name,_porttype,_type,_qual) \
extern "C" CalciumTypes::InfoType ecp_lecture_##_name (void * component, int dependencyType, \
CalTimeType< _type _qual >::TimeType * ti, \
CalTimeType< _type _qual >::TimeType * tf, long * i, \
const char * const nomvar, size_t bufferLength, \
size_t * nRead, _type _qual ** data ); \
\
\
extern "C" void ecp_lecture_##_name##_free ( _type _qual * data); \
\
\
extern "C" CalciumTypes::InfoType ecp_ecriture_##_name (void * component, int dependencyType, \
CalTimeType< _type _qual >::TimeType *t, \
long i, \
const char * const nomvar, size_t bufferLength, \
_type _qual * data ); \
/****** CALCIUM_C2CPP_INTERFACE_CXX_ : ******/
/******Definitions: ecp_lecture_... , ecp_ecriture_..., ecp_free_... ******/
#define CALCIUM_C2CPP_INTERFACE_CXX_(_name,_porttype,_type,_qual) \
extern "C" CalciumTypes::InfoType ecp_lecture_##_name (void * component, int dependencyType, \
CalTimeType< _type _qual >::TimeType * ti, \
CalTimeType< _type _qual >::TimeType * tf, long * i, \
const char * const nomvar, size_t bufferLength, \
size_t * nRead, _type _qual ** data ) \
{ \
Superv_Component_i * _component = static_cast<Superv_Component_i *>(component); \
double _ti=0.; \
double _tf=0.; \
if(dependencyType == CalciumTypes::CP_TEMPS) \
{ \
_ti=*ti; \
_tf=*tf; \
} \
size_t _nRead=0; \
size_t _bufferLength=bufferLength; \
\
if ( IsSameType< _porttype , cplx >::value ) _bufferLength*=2; \
DEBTRACE( "-------- CalciumInterface(lecture Inter Part) MARK 1 ------------------" ) \
try \
{ \
CalciumInterface::ecp_lecture< _type,_porttype >( *_component, dependencyType, _ti, _tf, *i, nomvar, \
_bufferLength, _nRead, *data); \
} \
catch ( const CalciumException & ex) \
{ \
DEBTRACE( ex.what() ); \
return ex.getInfo(); \
} \
catch ( ... ) \
{ \
DEBTRACE( "Unexpected exception ") ; \
return CalciumTypes::CPATAL; \
} \
if ( IsSameType< _porttype , cplx >::value ) \
{ \
*nRead=_nRead/2; \
DEBTRACE( "-------- CalciumInterface(lecture Inter Part) IsSameType cplx -------------" ) \
DEBTRACE( "-------- CalciumInterface(lecture Inter Part) _nRead : " << _nRead ) \
DEBTRACE( "-------- CalciumInterface(lecture Inter Part) *nRead : " << *nRead ) \
} \
else \
*nRead = _nRead; \
if (dependencyType == CalciumTypes::CP_SEQUENTIEL ) \
*ti=(CalTimeType< _type _qual >::TimeType)(_ti); \
DEBTRACE( "-------- CalciumInterface(lecture Inter Part), Data Ptr :" << *data ) \
return CalciumTypes::CPOK; \
}; \
\
\
extern "C" void ecp_lecture_##_name##_free ( _type _qual * data) \
{ \
CalciumInterface::ecp_free< _type, _porttype >(data); \
}; \
\
\
extern "C" CalciumTypes::InfoType ecp_ecriture_##_name (void * component, int dependencyType, \
CalTimeType< _type _qual >::TimeType *t, \
long i, \
const char * const nomvar, size_t bufferLength, \
_type _qual * data ) \
{ \
DEBTRACE( "-------- CalciumInterface(ecriture Inter Part) MARK 0 ------------------" ) \
Superv_Component_i * _component = static_cast<Superv_Component_i *>(component); \
/* Je ne sais pas pourquoi, je n'arrive pas à passer t par valeur : corruption de la pile*/ \
double _t=0.; \
if(dependencyType == CalciumTypes::CP_TEMPS) \
_t=*t; \
size_t _bufferLength=bufferLength; \
if ( IsSameType< _porttype , cplx >::value ) _bufferLength=_bufferLength*2; \
DEBTRACE( "-------- CalciumInterface(ecriture Inter Part) MARK 1 ------------------" ) \
try \
{ \
/*printf("-------- CalciumInterface(ecriture Inter Part), cp_name : Nom de la var. de type %s : %s\n",#_type,nomvar);*/ \
DEBTRACE( "----------->-" << nomvar ) \
CalciumInterface::ecp_ecriture< _type, _porttype >( *_component, dependencyType, \
_t,i,nomvar,_bufferLength,*data); \
} \
catch ( const CalciumException & ex) \
{ \
DEBTRACE( ex.what() ); \
return ex.getInfo(); \
} \
catch ( ... ) \
{ \
DEBTRACE("Unexpected exception " ); \
return CalciumTypes::CPATAL; \
} \
DEBTRACE( "-------- CalciumInterface(ecriture Inter Part), Valeur de data :" << data ) \
return CalciumTypes::CPOK; \
}; \
#endif
|