tableReaders.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 SourceFiles
25  tableReaders.C
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #ifndef tableReaders_H
30 #define tableReaders_H
31 
32 #include "tableReader.H"
33 #include "fieldTypes.H"
34 
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 
37 // Only used internally
38 #define makeTypeTableReadersTypeName(typeTableReader, dataType) \
39  \
40  defineNamedTemplateTypeNameAndDebug(typeTableReader<dataType>, 0)
41 
42 // Sometimes used externally
43 #define makeTableReadersTypeName(typeTableReader) \
44  \
45  makeTypeTableReadersTypeName(typeTableReader, scalar); \
46  makeTypeTableReadersTypeName(typeTableReader, vector); \
47  makeTypeTableReadersTypeName(typeTableReader, sphericalTensor); \
48  makeTypeTableReadersTypeName(typeTableReader, symmTensor); \
49  makeTypeTableReadersTypeName(typeTableReader, tensor)
50 
51 // Define type info for single dataType template instantiation (eg, vector)
52 #define makeTableReaderType(typeTableReader, dataType) \
53  \
54  defineNamedTemplateTypeNameAndDebug(typeTableReader<dataType>, 0); \
55  addTemplatedToRunTimeSelectionTable \
56  ( \
57  tableReader, typeTableReader, dataType, dictionary \
58  )
59 
60 
61 // Define type info for scalar, vector etc. instantiations
62 #define makeTableReaders(typeTableReader) \
63  \
64  makeTableReaderType(typeTableReader, scalar); \
65  makeTableReaderType(typeTableReader, vector); \
66  makeTableReaderType(typeTableReader, sphericalTensor); \
67  makeTableReaderType(typeTableReader, symmTensor); \
68  makeTableReaderType(typeTableReader, tensor)
69 
70 
71 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73 #endif
74 
75 // ************************************************************************* //
Include the header files for all the primitive types that Fields are instantiated for...