00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 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 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your 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, see <http://www.gnu.org/licenses/>. 00023 00024 Namespace 00025 Foam::functionEntries 00026 00027 Description 00028 Namespace for containing a functionEntry. 00029 00030 00031 Class 00032 Foam::functionEntry 00033 00034 Description 00035 A functionEntry causes entries to be added/manipulated on the specified 00036 dictionary given an input stream. 00037 00038 In dictionaries, a @c '\#' sigil is typically used for a functionEntry. 00039 00040 SourceFiles 00041 functionEntry.C 00042 functionEntryIO.C 00043 00044 \*---------------------------------------------------------------------------*/ 00045 00046 #ifndef functionEntry_H 00047 #define functionEntry_H 00048 00049 #include <OpenFOAM/word.H> 00050 #include <OpenFOAM/memberFunctionSelectionTables.H> 00051 00052 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00053 00054 namespace Foam 00055 { 00056 00057 class primitiveEntry; 00058 class dictionary; 00059 00060 /*---------------------------------------------------------------------------*\ 00061 Class functionEntry Declaration 00062 \*---------------------------------------------------------------------------*/ 00063 00064 class functionEntry 00065 { 00066 // Private Member Functions 00067 00068 //- Disallow default bitwise copy construct 00069 functionEntry(const functionEntry&); 00070 00071 //- Disallow default bitwise assignment 00072 void operator=(const functionEntry&); 00073 00074 00075 public: 00076 00077 // Member Function Selectors 00078 00079 declareMemberFunctionSelectionTable 00080 ( 00081 bool, 00082 functionEntry, 00083 execute, 00084 dictionaryIstream, 00085 ( 00086 dictionary& parentDict, 00087 Istream& is 00088 ), 00089 (parentDict, is) 00090 ); 00091 00092 //- Execute the functionEntry in a sub-dict context 00093 static bool execute 00094 ( 00095 const word& functionName, 00096 dictionary& parentDict, 00097 Istream& 00098 ); 00099 00100 declareMemberFunctionSelectionTable 00101 ( 00102 bool, 00103 functionEntry, 00104 execute, 00105 primitiveEntryIstream, 00106 ( 00107 const dictionary& parentDict, 00108 primitiveEntry& entry, 00109 Istream& is 00110 ), 00111 (parentDict, entry, is) 00112 ); 00113 00114 //- Execute the functionEntry in a primitiveEntry context 00115 static bool execute 00116 ( 00117 const word& functionName, 00118 const dictionary& parentDict, 00119 primitiveEntry&, 00120 Istream& 00121 ); 00122 00123 00124 }; 00125 00126 00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00128 00129 } // End namespace Foam 00130 00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00132 00133 #endif 00134 00135 // ************************ vim: set sw=4 sts=4 et: ************************ //