fvExprDriverWriter.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) 2011-2018 Bernhard Gschaider
9  Copyright (C) 2019-2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::expressions::fvExprDriverWriter
29 
30 Description
31  Registered input/output for an expressions::fvExprDriver
32 
33 SourceFiles
34  fvExprDriverWriter.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef expressions_fvExprDriverWriter_H
39 #define expressions_fvExprDriverWriter_H
40 
41 #include "fvExprDriver.H"
42 #include "regIOobject.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace expressions
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class fvExprDriverWriter Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public regIOobject
58 {
59  // Private Data
60 
61  //- The driver to read/write
62  fvExprDriver& driver_;
63 
64 
65  // Private Member Functions
66 
67  //- No default construct
68  fvExprDriverWriter() = delete;
69 
70  //- No copy construct
71  fvExprDriverWriter(const fvExprDriverWriter&) = delete;
72 
73  //- No copy assignment
74  void operator=(const fvExprDriverWriter&) = delete;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeNameNoDebug("fvExprDriverWriter");
81 
82 
83  // Constructors
84 
85  //- Construct for named driver
86  fvExprDriverWriter(const word& name, fvExprDriver& driver);
87 
88 
89  //- Destructor
90  virtual ~fvExprDriverWriter() = default;
91 
92 
93  // Member Functions
94 
95  virtual bool readData(Istream& is);
96  virtual bool writeData(Ostream& os) const;
97 };
98 
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 } // End namespace expressions
103 } // End namespace Foam
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 #endif
108 
109 // ************************************************************************* //
regIOobject.H
Foam::expressions::fvExprDriverWriter
Registered input/output for an expressions::fvExprDriver.
Definition: fvExprDriverWriter.H:54
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::expressions::fvExprDriver
Base driver for parsing value expressions associated with an fvMesh.
Definition: fvExprDriver.H:136
fvExprDriver.H
Foam::expressions::fvExprDriverWriter::writeData
virtual bool writeData(Ostream &os) const
Pure virtual writeData function.
Definition: fvExprDriverWriter.C:88
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
os
OBJstream os(runTime.globalPath()/outputName)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::IOobject::name
const word & name() const noexcept
Return name.
Definition: IOobjectI.H:65
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:73
Foam::expressions::fvExprDriverWriter::~fvExprDriverWriter
virtual ~fvExprDriverWriter()=default
Destructor.
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::expressions::fvExprDriverWriter::TypeNameNoDebug
TypeNameNoDebug("fvExprDriverWriter")
Runtime type information.
Foam::expressions::fvExprDriverWriter::readData
virtual bool readData(Istream &is)
Virtual readData function.
Definition: fvExprDriverWriter.C:76