1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::coordinateSystems
28 Provides a centralized coordinateSystem collection.
31 Mixing normal constructors and the coordinateSystems::New constructor
32 may yield unexpected results.
37 \*---------------------------------------------------------------------------*/
38 #ifndef coordinateSystems_H
39 #define coordinateSystems_H
41 #include "coordinateSystem.H"
42 #include "IOPtrList.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class coordinateSystems Declaration
51 \*---------------------------------------------------------------------------*/
53 class coordinateSystems
55 public IOPtrList<coordinateSystem>
58 // Private Member Functions
60 //- Disallow default bitwise copy construct
61 coordinateSystems(const coordinateSystems&);
63 //- Disallow default bitwise assignment
64 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> >&
94 //- Return previously registered or read construct from "constant"
95 static const coordinateSystems& New(const objectRegistry&);
100 //- Find and return indices for all matches
101 labelList findIndices(const keyType& key) const;
103 //- Find and return index for the first match, return -1 if not found
104 label findIndex(const keyType& key) const;
106 //- Find and return index for the first match, returns -1 if not found
107 // \deprecated use findIndex() instead (deprecated Jul 2010)
108 label find(const keyType& key) const;
110 //- Search for given key
111 bool found(const keyType& key) const;
113 //- Return the table of contents (list of all keywords)
114 wordList toc() const;
117 bool writeData(Ostream&, bool subDict=true) const;
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 } // End namespace Foam
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 // ************************************************************************* //