removeEntry.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::functionEntries::removeEntry
26 
27 Description
28  Remove a dictionary entry.
29 
30  The \c \#remove directive takes a list or a single wordRe.
31  For example,
32  \verbatim
33  #remove entry0
34  #remove ( entry1 entry2 entry3 otherEntry )
35  #remove "entry[1-3]"
36  #remove ( "entry[1-3]" otherEntry )
37  \endverbatim
38 
39  The removal only occurs in the current context.
40  Removing sub-entries or parent entries is not supported.
41 
42 SourceFiles
43  removeEntry.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef removeEntry_H
48 #define removeEntry_H
49 
50 #include "functionEntry.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 namespace functionEntries
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class removeEntry Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class removeEntry
64 :
65  public functionEntry
66 {
67 
68 public:
69 
70  //- Runtime type information
71  ClassName("remove");
72 
73 
74  // Constructors
75 
76  //- Disallow default bitwise copy construction
77  removeEntry(const removeEntry&) = delete;
78 
79 
80  // Member Functions
81 
82  //- Execute the functionEntry in a sub-dict context
83  static bool execute(dictionary& parentDict, Istream&);
84 
85 
86  // Member Operators
87 
88  //- Disallow default bitwise assignment
89  void operator=(const removeEntry&) = delete;
90 };
91 
92 
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95 } // End namespace functionEntries
96 } // End namespace Foam
97 
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 
100 #endif
101 
102 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
ClassName("remove")
Runtime type information.
static bool execute(dictionary &parentDict, Istream &)
Execute the functionEntry in a sub-dict context.
Definition: removeEntry.C:62
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
Definition: functionEntry.H:63
void operator=(const removeEntry &)=delete
Disallow default bitwise assignment.
Remove a dictionary entry.
Definition: removeEntry.H:62
removeEntry(const removeEntry &)=delete
Disallow default bitwise copy construction.
Namespace for OpenFOAM.