MED fichier
Documentation MED
Guides d'utilisation
Guides de référence
Dev_V3
src
misc
MEDmodeAcces.cxx
Aller à la documentation de ce fichier.
1
/* This file is part of MED.
2
*
3
* COPYRIGHT (C) 1999 - 2016 EDF R&D, CEA/DEN
4
* MED is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* MED is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with MED. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
#include "
MEDmodeAcces.hxx
"
18
19
using namespace
std
;
20
21
static
MED_MODE_ACCES
&
MedModeAcces
=
MED_MODE_ACCES::Instance
();
22
23
MED_MODE_ACCES
&
MED_MODE_ACCES::Instance
() {
24
static
MED_MODE_ACCES
obj;
25
return
obj;
26
}
27
28
29
extern
"C"
valueType
getModeAcces
(
keyType
key) {
30
31
map<keyType, valueType >::const_iterator it;
32
33
it = MedModeAcces.find(key);
34
35
if
(it != MedModeAcces.end() )
return
(*it).second;
36
37
return
MED_ACC_UNDEF
;
38
}
39
40
MED_MODE_ACCES::~MED_MODE_ACCES
() {};
41
42
extern
"C"
med_err
setModeAcces
(
keyType
key,
valueType
v) {
43
44
// map<keyType, valueType >::const_iterator it;
45
46
// it = MedModeAcces.find(key);
47
48
// if (it == MedModeAcces.end() )
49
// MedModeAcces[key]=v;
50
// else if ( (*it).second != v )
51
// return -1;
52
MedModeAcces[key]=v;
53
return
0;
54
}
med_err
herr_t med_err
Definition:
med.h:310
MED_MODE_ACCES
Definition:
MEDmodeAcces.hxx:29
keyType
Definition:
MEDfieldChecked.hxx:25
MedModeAcces
static MED_MODE_ACCES & MedModeAcces
Definition:
MEDmodeAcces.cxx:21
MEDmodeAcces.hxx
std
STL namespace.
setModeAcces
med_err setModeAcces(keyType key, valueType v)
Definition:
MEDmodeAcces.cxx:42
MED_ACC_UNDEF
Definition:
med.h:117
MED_MODE_ACCES::~MED_MODE_ACCES
~MED_MODE_ACCES()
Definition:
MEDmodeAcces.cxx:40
getModeAcces
valueType getModeAcces(keyType key)
Definition:
MEDmodeAcces.cxx:29
med_bool
med_bool
Definition:
med.h:240
MED_MODE_ACCES::Instance
static MED_MODE_ACCES & Instance()
Definition:
MEDmodeAcces.cxx:23
Généré le Lundi 7 Novembre 2016 14:19:23 pour MED fichier par
1.8.9.1