Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / OpenFOAM / interpolations / interpolationTable / tableReaders / tableReaders.H
blob8e1c8a056104a9aff92e0fe1585ff9293bd6193d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011-2011 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 Class
25     Foam::tableReader
27 SourceFiles
28     tableReaders.C
30 \*---------------------------------------------------------------------------*/
32 #ifndef tableReaders_H
33 #define tableReaders_H
35 #include "tableReader.H"
36 #include "fieldTypes.H"
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 // Only used internally
41 #define makeTypeTableReadersTypeName(typeTableReader, dataType)               \
42                                                                               \
43     defineNamedTemplateTypeNameAndDebug(typeTableReader< dataType >, 0)
45 // Sometimes used externally
46 #define makeTableReadersTypeName(typeTableReader)                             \
47                                                                               \
48     makeTypeTableReadersTypeName(typeTableReader, scalar);                    \
49     makeTypeTableReadersTypeName(typeTableReader, vector);                    \
50     makeTypeTableReadersTypeName(typeTableReader, sphericalTensor);           \
51     makeTypeTableReadersTypeName(typeTableReader, symmTensor);                \
52     makeTypeTableReadersTypeName(typeTableReader, tensor)
54 // Define type info for single dataType template instantiation (eg, vector)
55 #define makeTableReaderType(typeTableReader, dataType)                        \
56                                                                               \
57     defineNamedTemplateTypeNameAndDebug(typeTableReader< dataType >, 0);      \
58     addTemplatedToRunTimeSelectionTable                                       \
59     (                                                                         \
60         tableReader, typeTableReader, dataType, dictionary                    \
61     )
64 // Define type info for scalar, vector etc. instantiations
65 #define makeTableReaders(typeTableReader)                                     \
66                                                                               \
67     makeTableReaderType(typeTableReader, scalar);                             \
68     makeTableReaderType(typeTableReader, vector);                             \
69     makeTableReaderType(typeTableReader, sphericalTensor);                    \
70     makeTableReaderType(typeTableReader, symmTensor);                         \
71     makeTableReaderType(typeTableReader, tensor)
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 #endif
78 // ************************************************************************* //