OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

includeEntry.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::functionEntries::includeEntry
00027 
00028 Description
00029     Specify an include file when reading dictionaries, expects a
00030     single string to follow.
00031 
00032     An example of the @c \#include directive:
00033     @verbatim
00034         #include "includeFile"
00035     @endverbatim
00036 
00037     The usual expansion of environment variables and other constructs
00038     (eg, the @c ~OpenFOAM/ expansion) is retained.
00039 
00040 See Also
00041     fileName, string::expand()
00042 
00043 SourceFiles
00044     includeEntry.C
00045 
00046 \*---------------------------------------------------------------------------*/
00047 
00048 #ifndef includeEntry_H
00049 #define includeEntry_H
00050 
00051 #include "functionEntry.H"
00052 
00053 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00054 
00055 namespace Foam
00056 {
00057 namespace functionEntries
00058 {
00059 
00060 /*---------------------------------------------------------------------------*\
00061                         Class includeEntry Declaration
00062 \*---------------------------------------------------------------------------*/
00063 
00064 class includeEntry
00065 :
00066     public functionEntry
00067 {
00068     // Private Member Functions
00069 
00070         //- Disallow default bitwise copy construct
00071         includeEntry(const includeEntry&);
00072 
00073         //- Disallow default bitwise assignment
00074         void operator=(const includeEntry&);
00075 
00076 protected:
00077 
00078     // Protected Member Functions
00079 
00080         //- Read the include fileName from Istream, expand and return
00081         static fileName includeFileName(Istream&);
00082 
00083 
00084 public:
00085 
00086     //- Runtime type information
00087     ClassName("include");
00088 
00089 
00090     // Member Functions
00091 
00092         //- Execute the functionEntry in a sub-dict context
00093         static bool execute(dictionary& parentDict, Istream&);
00094 
00095         //- Execute the functionEntry in a primitiveEntry context
00096         static bool execute
00097         (
00098             const dictionary& parentDict,
00099             primitiveEntry&,
00100             Istream&
00101         );
00102 
00103 };
00104 
00105 
00106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00107 
00108 } // End namespace functionEntries
00109 } // End namespace Foam
00110 
00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00112 
00113 #endif
00114 
00115 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd