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