All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
baseIOdictionary.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) 2011-2019 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::baseIOdictionary
26 
27 Description
28  baseIOdictionary is derived from dictionary and IOobject to give the
29  dictionary automatic IO functionality via the objectRegistry.
30  To facilitate IO,
31  IOdictionary is provided with a constructor from IOobject and writeData and
32  write functions.
33 
34 SourceFiles
35  baseIOdictionary.C
36  baseIOdictionaryIO.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef baseIOdictionary_H
41 #define baseIOdictionary_H
42 
43 #include "dictionary.H"
44 #include "regIOobject.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class baseIOdictionary Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class baseIOdictionary
56 :
57  public regIOobject,
58  public dictionary
59 {
60  // Private Data
61 
62  static bool writeDictionaries;
63 
64 public:
65 
66  TypeName("dictionary");
67 
68 
69  // Constructors
70 
71  //- Construct given an IOobject
72  baseIOdictionary(const IOobject&);
73 
74  //- Construct given an IOobject and dictionary
75  baseIOdictionary(const IOobject&, const dictionary&);
76 
77  //- Construct given an IOobject and Istream
79 
80  //- Copy constructor
82 
83  //- Move constructor
85 
86 
87  //- Destructor
88  virtual ~baseIOdictionary();
89 
90 
91  // Member Functions
92 
93  //- Return complete path + object name if the file exists
94  // either in the case/processor or case otherwise null
95  virtual fileName filePath() const = 0;
96 
97  //- Name function is needed to disambiguate those inherited
98  // from regIOobject and dictionary
99  const word& name() const;
100 
101  //- ReadData function required for regIOobject read operation
102  virtual bool readData(Istream&);
103 
104  //- WriteData function required for regIOobject write operation
105  virtual bool writeData(Ostream&) const;
106 
107  //- Is object global
108  virtual bool global() const = 0;
109 
110 
111  // Member Operators
112 
113  //- Assignment of other baseIOdictionary's entries to this
114  // baseIOdictionary
115  void operator=(const baseIOdictionary&);
116 
117  //- Move assignment
118  void operator=(baseIOdictionary&&);
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
void operator=(const baseIOdictionary &)
Assignment of other baseIOdictionary&#39;s entries to this.
baseIOdictionary(const IOobject &)
Construct given an IOobject.
A class for handling file names.
Definition: fileName.H:79
baseIOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO function...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
virtual bool global() const =0
Is object global.
virtual fileName filePath() const =0
Return complete path + object name if the file exists.
virtual ~baseIOdictionary()
Destructor.
A class for handling words, derived from string.
Definition: word.H:59
const word & name() const
Name function is needed to disambiguate those inherited.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
TypeName("dictionary")
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
Namespace for OpenFOAM.
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.