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-2015 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::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 "DataEntry.H"
49 #include "Tuple2.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 template<class Type>
57 class Table;
58 
59 template<class Type>
60 Ostream& operator<<
61 (
62  Ostream&,
63  const Table<Type>&
64 );
65 
66 /*---------------------------------------------------------------------------*\
67  Class Table Declaration
68 \*---------------------------------------------------------------------------*/
69 
70 template<class Type>
71 class Table
72 :
73  public TableBase<Type>
74 {
75  // Private Member Functions
76 
77  //- Disallow default bitwise assignment
78  void operator=(const Table<Type>&);
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("table");
85 
86 
87  // Constructors
88 
89  //- Construct from entry name and Istream
90  Table(const word& entryName, const dictionary& dict);
91 
92  //- Copy constructor
93  Table(const Table<Type>& tbl);
94 
95  //- Construct and return a clone
96  virtual tmp<DataEntry<Type> > clone() const
97  {
98  return tmp<DataEntry<Type> >(new Table<Type>(*this));
99  }
100 
101 
102  //- Destructor
103  virtual ~Table();
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #ifdef NoRepository
114 # include "Table.C"
115 #endif
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
120 
121 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Tuple2.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::Table::TypeName
TypeName("table")
Runtime type information.
Foam::Table::clone
virtual tmp< DataEntry< Type > > clone() const
Construct and return a clone.
Definition: Table.H:95
Foam::Table::Table
Table(const word &entryName, const dictionary &dict)
Construct from entry name and Istream.
Definition: Table.C:31
Foam::Table
Templated table container data entry. Items are stored in a list of Tuple2's. First column is always ...
Definition: Table.H:56
DataEntry.H
Foam::Table::~Table
virtual ~Table()
Destructor.
Definition: Table.C:60
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::Table::operator=
void operator=(const Table< Type > &)
Disallow default bitwise assignment.
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Table.C
Foam::TableBase
Base class for table with bounds handling, interpolation and integration.
Definition: TableBase.H:47