Table.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::Function1Types::Table
29 
30 Description
31  Templated table container function.
32 
33  Items are stored in a list of Tuple2's. First column is always stored as
34  scalar entries. Data is read in Tuple2 form.
35 
36  Usage:
37  \verbatim
38  <entryName> table
39  (
40  (0.0 (1 2 3))
41  (1.0 (4 5 6))
42  );
43  \endverbatim
44 
45 SourceFiles
46  Table.C
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef Table_H
51 #define Table_H
52 
53 #include "TableBase.H"
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 namespace Function1Types
60 {
61 
62 /*---------------------------------------------------------------------------*\
63  Class Table Declaration
64 \*---------------------------------------------------------------------------*/
65 
66 template<class Type>
67 class Table
68 :
69  public TableBase<Type>
70 {
71  // Private Member Functions
72 
73  //- No copy assignment
74  void operator=(const Table<Type>&) = delete;
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("table");
80 
81 
82  // Constructors
83 
84  //- Construct from entry name and dictionary
85  Table(const word& entryName, const dictionary& dict);
86 
87  //- Copy constructor
88  explicit Table(const Table<Type>& tbl);
89 
90  //- Construct and return a clone
91  virtual tmp<Function1<Type>> clone() const
92  {
93  return tmp<Function1<Type>>(new Table<Type>(*this));
94  }
95 
96 
97  //- Destructor
98  virtual ~Table() = default;
99 };
100 
101 
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 
104 } // End namespace Function1Types
105 } // End namespace Foam
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #ifdef NoRepository
110  #include "Table.C"
111 #endif
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::Function1::entryName
const word & entryName
Definition: Function1.H:133
Foam::Function1::dict
const word const dictionary & dict
Definition: Function1.H:135
Foam::Function1Types::Table::TypeName
TypeName("table")
Runtime type information.
Foam::Function1Types::Table::~Table
virtual ~Table()=default
Destructor.
TableBase.H
Foam::Function1Types::Table::Table
Table(const word &entryName, const dictionary &dict)
Construct from entry name and dictionary.
Definition: Table.C:35
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::Function1Types::Table
Templated table container function.
Definition: Table.H:66
Foam::Function1Types::TableBase
Base class for table with bounds handling, interpolation and integration.
Definition: TableBase.H:60
Foam::Function1Types::Table::clone
virtual tmp< Function1< Type > > clone() const
Construct and return a clone.
Definition: Table.H:90
Table.C