removeEntry.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 | Copyright (C) 2011 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  // Private Member Functions
68 
69  //- Disallow default bitwise copy construct
70  removeEntry(const removeEntry&);
71 
72  //- Disallow default bitwise assignment
73  void operator=(const removeEntry&);
74 
75 
76 public:
77 
78  //- Runtime type information
79  ClassName("remove");
80 
81 
82  // Member Functions
83 
84  //- Execute the functionEntry in a sub-dict context
85  static bool execute(dictionary& parentDict, Istream&);
86 };
87 
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 } // End namespace functionEntries
92 } // End namespace Foam
93 
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 
96 #endif
97 
98 // ************************************************************************* //
static bool execute(dictionary &parentDict, Istream &)
Execute the functionEntry in a sub-dict context.
Definition: removeEntry.C:62
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
ClassName("remove")
Runtime type information.
Namespace for OpenFOAM.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
Definition: functionEntry.H:63
Remove a dictionary entry.
Definition: removeEntry.H:62