exprResultStoredStack.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) 2012-2018 Bernhard Gschaider <bgschaid@hfd-research.com>
9  Copyright (C) 2019-2020 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::exprResultStoredStack
29 
30 Description
31  An exprResultStack with persistence.
32 
33 SourceFiles
34  exprResultStoredStack.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef expressions_exprResultStoredStack_H
39 #define expressions_exprResultStoredStack_H
40 
41 #include "exprResultStack.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace expressions
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class exprResultStoredStack Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
57 {
58 protected:
59 
60  // Protected Member Functions
61 
62  //- Reset at new timestep - disabling locally
63  virtual void resetImpl() {}
64 
65 
66 public:
67 
68  //- Runtime type information
69  TypeNameNoDebug("exprResultStoredStack");
70 
71 
72  // Constructors
73 
74  //- Default construct
76 
77  //- Copy construct
79 
80  //- Construct from a dictionary
81  explicit exprResultStoredStack(const dictionary& dict);
82 
83 
84  // Selectors
85 
86  virtual autoPtr<exprResult> clone() const
87  {
88  return autoPtr<exprResult>
89  (
90  new exprResultStoredStack(*this)
91  );
92  }
93 
94 
95  //- Destructor
96  virtual ~exprResultStoredStack() = default;
97 
98 
99  // Member Operators
100 
101  //- Copy assignment
102  void operator=(const exprResultStoredStack& rhs);
103 };
104 
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 } // End namespace expressions
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************************************************************* //
exprResultStack.H
Foam::expressions::exprResultStoredStack::clone
virtual autoPtr< exprResult > clone() const
Clone.
Definition: exprResultStoredStack.H:85
Foam::expressions::exprResultStoredStack::exprResultStoredStack
exprResultStoredStack()
Default construct.
Definition: exprResultStoredStack.C:60
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::expressions::exprResultStack
A stack of polymorphic fields. Can be used to build a list of results one at a time.
Definition: exprResultStack.H:55
Foam::expressions::exprResultStoredStack::operator=
void operator=(const exprResultStoredStack &rhs)
Copy assignment.
Definition: exprResultStoredStack.C:93
Foam::expressions::exprResultStoredStack
An exprResultStack with persistence.
Definition: exprResultStoredStack.H:53
Foam::expressions::exprResultStoredStack::TypeNameNoDebug
TypeNameNoDebug("exprResultStoredStack")
Runtime type information.
Foam::expressions::exprResultStoredStack::resetImpl
virtual void resetImpl()
Reset at new timestep - disabling locally.
Definition: exprResultStoredStack.H:62
Foam::expressions::exprResultStoredStack::~exprResultStoredStack
virtual ~exprResultStoredStack()=default
Destructor.