removeRegisteredObject.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) 2013-2016 OpenFOAM Foundation
9 Copyright (C) 2015-2020 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::functionObjects::removeRegisteredObject
29
30Group
31 grpUtilitiesFunctionObjects
32
33Description
34 Removes registered objects if present in the database.
35
36Usage
37 Example of function object specification:
38 \verbatim
39 removeRegisteredObject1
40 {
41 type removeRegisteredObject;
42 libs (utilityFunctionObjects);
43 ...
44 objects (obj1 obj2);
45 }
46 \endverbatim
47
48 Where the entries comprise:
49 \table
50 Property | Description | Required | Default value
51 type | type name: removeRegisteredObject | yes |
52 objects | objects to remove | yes |
53 \endtable
54
55See also
56 Foam::functionObject
57
58SourceFiles
59 removeRegisteredObject.C
60
61\*---------------------------------------------------------------------------*/
62
63#ifndef functionObjects_removeRegisteredObject_H
64#define functionObjects_removeRegisteredObject_H
65
67#include "wordList.H"
68
69// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70
71namespace Foam
72{
73namespace functionObjects
74{
75
76/*---------------------------------------------------------------------------*\
77 Class removeRegisteredObject Declaration
78\*---------------------------------------------------------------------------*/
79
80class removeRegisteredObject
81:
82 public regionFunctionObject
83{
84 // Private Data
85
86 //- Names of objects to control
87 wordList objectNames_;
88
89
90 // Private member functions
91
92 //- No copy construct
93 removeRegisteredObject(const removeRegisteredObject&) = delete;
95 //- No copy assignment
96 void operator=(const removeRegisteredObject&) = delete;
97
98
99public:
100
101 //- Runtime type information
102 TypeName("removeRegisteredObject");
103
104
105 // Constructors
106
107 //- Construct from Time and dictionary
109 (
110 const word& name,
111 const Time& runTime,
112 const dictionary& dict
113 );
114
115
116 //- Destructor
117 virtual ~removeRegisteredObject() = default;
118
119
120 // Member Functions
121
122 //- Read the removeRegisteredObject data
123 virtual bool read(const dictionary& dict);
124
125 //- Remove the registered objects
126 virtual bool execute();
127
128 //- Do nothing
129 virtual bool write();
130};
132
133// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134
135} // End namespace functionObjects
136} // End namespace Foam
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140#endif
141
142// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const noexcept
Return the name of this functionObject.
Specialization of Foam::functionObject for a region and providing a reference to the region Foam::obj...
Removes registered objects if present in the database.
virtual ~removeRegisteredObject()=default
Destructor.
virtual bool read(const dictionary &dict)
Read the removeRegisteredObject data.
TypeName("removeRegisteredObject")
Runtime type information.
virtual bool execute()
Remove the registered objects.
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
Namespace for OpenFOAM.
List< word > wordList
A List of words.
Definition: fileName.H:63
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73