noneCondition.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) 2022 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::noneCondition
28 
29 Description
30  A no-op condition that simply returns true/nothing to do.
31 
32 SourceFiles
33  noneCondition.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef functionObjects_runTimeControls_noneCondition_H
38 #define functionObjects_runTimeControls_noneCondition_H
39 
40 #include "runTimeCondition.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace functionObjects
47 {
48 namespace runTimeControls
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class noneCondition Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class noneCondition
56 :
57  public runTimeCondition
58 {
59 public:
60 
61  //- Runtime type information
62  TypeNameNoDebug("none");
63 
64  //- Constructor
66  (
67  const word& name,
68  const objectRegistry& obr,
69  const dictionary& dict,
70  stateFunctionObject& state
71  );
72 
73  //- Destructor
74  virtual ~noneCondition() = default;
75 
76 
77  // Public Member Functions
78 
79  //- Apply the condition
80  virtual bool apply();
81 
82  //- Write
83  virtual void write();
84 
85  //- Reset
86  virtual void reset();
87 };
88 
89 
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91 
92 } // End namespace runTimeControls
93 } // End namespace functionObjects
94 } // End namespace Foam
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 #endif
99 
100 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual bool apply()
Apply the condition.
Definition: noneCondition.C:56
TypeNameNoDebug("none")
Runtime type information.
noneCondition(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Constructor.
Definition: noneCondition.C:43
A class for handling words, derived from Foam::string.
Definition: word.H:63
Base class for function objects, adding functionality to read/write state information (data required ...
Registry of regIOobjects.
Namespace for OpenFOAM.
virtual const word & name() const
Return the condition name.