wordAndDictionary.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2020 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::wordAndDictionary
26 
27 Description
28  Tuple of a word and dictionary, used to read in per-field options for
29  function objects in the following syntax:
30 
31  fields
32  (
33  p
34  {
35  option1 true;
36  option2 false;
37  }
38 
39  U
40 
41  T
42  {
43  option1 false;
44  }
45  );
46 
47  IO is like the tuple, except that there are no enclosing parentheses, and
48  if the dictionary is empty then '{}' is omitted. The latter means that in
49  the absence of any options the syntax becomes that of a wordList, which
50  means it can be used for argument parsing for input of that form.
51 
52 SourceFiles
53  wordAndDictionary.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef wordAndDictionary_H
58 #define wordAndDictionary_H
59 
60 #include "dictionary.H"
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 
67 // Forward declaration of classes
68 class Istream;
69 class Ostream;
70 
71 // Forward declaration of friend functions and operators
72 class wordAndDictionary;
73 Istream& operator>>(Istream&, wordAndDictionary&);
74 Ostream& operator<<(Ostream&, const wordAndDictionary&);
75 
76 
77 /*---------------------------------------------------------------------------*\
78  Class wordAndDictionary Declaration
79 \*---------------------------------------------------------------------------*/
80 
82 :
83  public Tuple2<word, dictionary>
84 {
85 public:
86 
87  // Constructors
88 
89  //- Inherit tuple constructors
91 
92  //- Construct null
94 
95  //- Construct from Istream
97 
98 
99  //- Destructor
101 
102 
103  // IOstream Operators
104 
106  friend Ostream& operator<<(Ostream&, const wordAndDictionary&);
107 };
108 
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
A 2-tuple for storing two objects of different types.
Definition: HashTable.H:65
~wordAndDictionary()
Destructor.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
friend Istream & operator>>(Istream &, wordAndDictionary &)
friend Ostream & operator<<(Ostream &, const wordAndDictionary &)
Tuple of a word and dictionary, used to read in per-field options for function objects in the followi...
Istream & operator>>(Istream &, directionInfo &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
wordAndDictionary()
Construct null.
Ostream & operator<<(Ostream &, const ensightPart &)
Namespace for OpenFOAM.