1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::coordinateSystems
29 Provides a centralized coordinateSystem collection.
32 Mixing normal constructors and the coordinateSystems::New constructor
33 may yield unexpected results.
38 \*---------------------------------------------------------------------------*/
39 #ifndef coordinateSystems_H
40 #define coordinateSystems_H
42 #include "coordinateSystem.H"
43 #include "IOPtrList.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class coordinateSystems Declaration
52 \*---------------------------------------------------------------------------*/
54 class coordinateSystems
56 public IOPtrList<coordinateSystem>
59 // Private Member Functions
61 //- Disallow default bitwise copy construct
62 coordinateSystems(const coordinateSystems&);
64 //- Disallow default bitwise assignment
65 void operator=(const coordinateSystems&);
69 //- Runtime type information
70 TypeName("coordinateSystems");
74 //- Read construct from IOobject
75 explicit coordinateSystems(const IOobject&);
77 //- Construct from IOobject and a PtrList
81 const PtrList<coordinateSystem>&
84 //- Construct from IOobject and transferring the PtrList contents
88 const Xfer<PtrList<coordinateSystem> >&
93 //- Return previously registered or read construct from "constant"
94 static const coordinateSystems& New(const objectRegistry&);
98 //- Find and return index for a given keyword, returns -1 if not found
99 label find(const word& key) const;
101 //- Search for given keyword
102 bool found(const word& keyword) const;
104 //- Return the table of contents (list of all keywords)
105 wordList toc() const;
108 bool writeData(Ostream&, bool subDict=true) const;
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 } // End namespace Foam
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 // ************************************************************************* //