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 | 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 Class
25  Foam::Function1Types::Table
26 
27 Description
28  Templated table container data entry. Items are stored in a list of
29  Tuple2's. First column is always stored as scalar entries. Data is read
30  in Tuple2 form, e.g. for an entry <entryName> that is (scalar, vector):
31 
32  \verbatim
33  <entryName> table
34  (
35  (0.0 (1 2 3))
36  (1.0 (4 5 6))
37  );
38  \endverbatim
39 
40 SourceFiles
41  Table.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef Table_H
46 #define Table_H
47 
48 #include "Function1.H"
49 #include "Tuple2.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace Function1Types
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class Table Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 template<class Type>
63 class Table
64 :
65  public TableBase<Type>
66 {
67  // Private Member Functions
68 
69  //- Disallow default bitwise assignment
70  void operator=(const Table<Type>&);
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("table");
77 
78 
79  // Constructors
80 
81  //- Construct from entry name and Istream
82  Table(const word& entryName, const dictionary& dict);
83 
84  //- Copy constructor
85  Table(const Table<Type>& tbl);
86 
87  //- Construct and return a clone
88  virtual tmp<Function1<Type>> clone() const
89  {
90  return tmp<Function1<Type>>(new Table<Type>(*this));
91  }
92 
93 
94  //- Destructor
95  virtual ~Table();
96 };
97 
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 } // End namespace Function1Types
102 } // End namespace Foam
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 #ifdef NoRepository
107  #include "Table.C"
108 #endif
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 #endif
113 
114 // ************************************************************************* //
Table(const word &entryName, const dictionary &dict)
Construct from entry name and Istream.
Definition: Table.C:32
const word const dictionary & dict
Definition: Function1.H:88
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Templated table container data entry. Items are stored in a list of Tuple2&#39;s. First column is always ...
Definition: Table.H:62
const word & entryName
Definition: Function1.H:88
virtual tmp< Function1< Type > > clone() const
Construct and return a clone.
Definition: Table.H:87
Base class for table with bounds handling, interpolation and integration.
Definition: TableBase.H:55
A class for handling words, derived from string.
Definition: word.H:59
virtual ~Table()
Destructor.
Definition: Table.C:56
TypeName("table")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:54
Namespace for OpenFOAM.