1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
28 IOdictionary is derived from dictionary and IOobject to give the dictionary
29 automatic IO functionality via the objectRegistry. To facilitate IO,
30 IOdictioanry is provided with a constructor from IOobject and writeData and
37 \*---------------------------------------------------------------------------*/
39 #ifndef IOdictionary_H
40 #define IOdictionary_H
42 #include "dictionary.H"
43 #include "regIOobject.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class IOdictionary Declaration
52 \*---------------------------------------------------------------------------*/
61 static bool writeDictionaries;
64 // Private Member Functions
66 //- Read dictionary from file
67 void readFile(const bool);
72 TypeName("dictionary");
77 //- Construct given an IOobject
78 IOdictionary(const IOobject&);
80 //- Construct given an IOobject and dictionary
81 IOdictionary(const IOobject&, const dictionary&);
83 //- Construct given an IOobject and Istream
84 IOdictionary(const IOobject&, Istream&);
88 virtual ~IOdictionary();
93 //- Name function is needed to disambiguate those inherited
94 // from regIOobject and dictionary
95 const word& name() const;
97 //- ReadData function required for regIOobject read operation
98 bool readData(Istream&);
100 //- WriteData function required for regIOobject write operation
101 bool writeData(Ostream&) const;
106 //- Assignment of other IOdictionary's entries to this IOdictionary
107 void operator=(const IOdictionary&);
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 } // End namespace Foam
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 // ************************************************************************* //