0.95.0-final
Finite Element Embedded Library and Language in C++
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
crbwrapper.hpp
Go to the documentation of this file.
1
/* -*- mode: c++ -*-
2
3
This file is part of the Feel library
4
5
Author(s): Christophe Prud'homme <christophe.prudhomme@feelpp.org>
6
Date: 2010-03-19
7
8
Copyright (C) 2010,2011 Université Joseph Fourier (Grenoble I)
9
10
This library is free software; you can redistribute it and/or
11
modify it under the terms of the GNU Lesser General Public
12
License as published by the Free Software Foundation; either
13
version 2.1 of the License, or (at your option) any later version.
14
15
This library is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
Lesser General Public License for more details.
19
20
You should have received a copy of the GNU Lesser General Public
21
License along with this library; if not, write to the Free Software
22
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
*/
29
#ifndef __CrbWrapper_H
30
#define __CrbWrapper_H 1
31
32
#define CRB_FUNC_EXEC_BODY_IN_TEMPDIR( classname, dirname ) \
33
{ \
34
char* currentWorkingDirectory = getCurrentWorkingDirectory (0) ; \
35
char* temporaryDirectory=createTemporaryDirectory(#dirname,p_exchangedData,0); \
36
\
37
int rc = 0; \
38
try \
39
{ \
40
CAST(classname*,p_state)->run( INPOINT_ARRAY, INPOINT_SIZE, OUTPOINT_ARRAY, OUTPOINT_SIZE ); \
41
} \
42
catch( ... ) \
43
{ \
44
rc = 1; \
45
} \
46
if (rc) { \
47
PRINT( "Error in class "#classname ); \
48
return WRAPPER_EXECUTION_ERROR; \
49
} \
50
deleteTemporaryDirectory ( temporaryDirectory , rc, 0 ) ; \
51
free ( currentWorkingDirectory ) ; \
52
}
53
54
#endif
/* __CrbWrapper_H */
Generated on Sun Dec 22 2013 13:10:57 for Feel++ by
1.8.5