Loading...
Searching...
No Matches
IOmapDistribute.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2014 OpenFOAM Foundation
9 Copyright (C) 2018-2024 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::IOmapDistribute
29
30Description
31 IOmapDistribute is derived from mapDistribute and
32 IOobject to give the mapDistribute
33 automatic IO functionality via the objectRegistry.
34
35SourceFiles
36 IOmapDistribute.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef Foam_IOmapDistribute_H
41#define Foam_IOmapDistribute_H
42
43#include "mapDistribute.H"
44#include "regIOobject.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
51/*---------------------------------------------------------------------------*\
52 Class IOmapDistribute Declaration
53\*---------------------------------------------------------------------------*/
54
56:
57 public regIOobject,
58 public mapDistribute
59{
60 // Private Member Functions
61
62 //- Read if IOobject flags set. Return true if read.
63 bool readIOcontents();
64
65public:
66
67 //- Runtime type information
68 TypeName("mapDistribute");
69
70 // Constructors
71
72 //- Construct from IOobject
74
75 //- Construct from IOobject, copying mapDistribute contents
76 IOmapDistribute(const IOobject& io, const mapDistribute& map);
77
78 //- Construct from IOobject, moving mapDistribute contents
80
81
82 //- Destructor
83 virtual ~IOmapDistribute() = default;
84
85
86 // Member Functions
87
88 //- ReadData function required for regIOobject read operation
89 virtual bool readData(Istream&);
91 //- WriteData function required for regIOobject write operation
92 virtual bool writeData(Ostream&) const;
93};
94
95
96// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97
98} // End namespace Foam
99
100// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101
102#endif
103
104// ************************************************************************* //
IOmapDistribute(const IOobject &io)
Construct from IOobject.
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
TypeName("mapDistribute")
Runtime type information.
virtual ~IOmapDistribute()=default
Destructor.
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
mapDistribute() noexcept
Default construct - uses worldComm.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
Definition regIOobject.C:43
const auto & io
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68