FreeFOAM The Cross-Platform CFD Toolkit
includeEntry.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) 1991-2010 OpenCFD Ltd.
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::includeEntry
26 
27 Description
28  Specify an include file when reading dictionaries, expects a
29  single string to follow.
30 
31  An example of the @c \#include directive:
32  @verbatim
33  #include "includeFile"
34  @endverbatim
35 
36  The usual expansion of environment variables and other constructs
37  (eg, the @c ~OpenFOAM/ expansion) is retained.
38 
39 See Also
40  fileName, string::expand()
41 
42 SourceFiles
43  includeEntry.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef includeEntry_H
48 #define includeEntry_H
49 
50 #include <OpenFOAM/functionEntry.H>
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 namespace functionEntries
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class includeEntry Declaration
61 \*---------------------------------------------------------------------------*/
62 
64 :
65  public functionEntry
66 {
67  // Private Member Functions
68 
69  //- Disallow default bitwise copy construct
70  includeEntry(const includeEntry&);
71 
72  //- Disallow default bitwise assignment
73  void operator=(const includeEntry&);
74 
75 protected:
76 
77  // Protected Member Functions
78 
79  //- Read the include fileName from Istream, expand and return
81 
82 
83 public:
84 
85  //- Runtime type information
86  ClassName("include");
87 
88 
89  // Member Functions
90 
91  //- Execute the functionEntry in a sub-dict context
92  static bool execute(dictionary& parentDict, Istream&);
93 
94  //- Execute the functionEntry in a primitiveEntry context
95  static bool execute
96  (
97  const dictionary& parentDict,
99  Istream&
100  );
101 
102 };
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 } // End namespace functionEntries
108 } // End namespace Foam
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 #endif
113 
114 // ************************ vim: set sw=4 sts=4 et: ************************ //