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 Class 00025 Foam::coordinateSystems 00026 00027 Description 00028 Provides a centralized coordinateSystem collection. 00029 00030 Note 00031 Mixing normal constructors and the coordinateSystems::New constructor 00032 may yield unexpected results. 00033 00034 SourceFiles 00035 coordinateSystems.C 00036 00037 \*---------------------------------------------------------------------------*/ 00038 #ifndef coordinateSystems_H 00039 #define coordinateSystems_H 00040 00041 #include "coordinateSystem.H" 00042 #include <OpenFOAM/IOPtrList.H> 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class coordinateSystems Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class coordinateSystems 00054 : 00055 public IOPtrList<coordinateSystem> 00056 { 00057 00058 // Private Member Functions 00059 00060 //- Disallow default bitwise copy construct 00061 coordinateSystems(const coordinateSystems&); 00062 00063 //- Disallow default bitwise assignment 00064 void operator=(const coordinateSystems&); 00065 00066 public: 00067 00068 //- Runtime type information 00069 TypeName("coordinateSystems"); 00070 00071 // Constructors 00072 00073 //- Read construct from IOobject 00074 explicit coordinateSystems(const IOobject&); 00075 00076 //- Construct from IOobject and a PtrList 00077 coordinateSystems 00078 ( 00079 const IOobject&, 00080 const PtrList<coordinateSystem>& 00081 ); 00082 00083 //- Construct from IOobject and transferring the PtrList contents 00084 coordinateSystems 00085 ( 00086 const IOobject&, 00087 const Xfer<PtrList<coordinateSystem> >& 00088 ); 00089 00090 // Selectors 00091 00092 //- Return previously registered or read construct from "constant" 00093 static const coordinateSystems& New(const objectRegistry&); 00094 00095 // Member Functions 00096 00097 //- Find and return index for a given keyword, returns -1 if not found 00098 label find(const word& key) const; 00099 00100 //- Search for given keyword 00101 bool found(const word& keyword) const; 00102 00103 //- Return the table of contents (list of all keywords) 00104 wordList toc() const; 00105 00106 //- write data 00107 bool writeData(Ostream&, bool subDict=true) const; 00108 }; 00109 00110 00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00112 00113 } // End namespace Foam 00114 00115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00116 00117 #endif 00118 00119 // ************************ vim: set sw=4 sts=4 et: ************************ //