FreeFOAM The Cross-Platform CFD Toolkit
coordinateSystems.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::coordinateSystems
26 
27 Description
28  Provides a centralized coordinateSystem collection.
29 
30 Note
31  Mixing normal constructors and the coordinateSystems::New constructor
32  may yield unexpected results.
33 
34 SourceFiles
35  coordinateSystems.C
36 
37 \*---------------------------------------------------------------------------*/
38 #ifndef coordinateSystems_H
39 #define coordinateSystems_H
40 
41 #include "coordinateSystem.H"
42 #include <OpenFOAM/IOPtrList.H>
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class coordinateSystems Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public IOPtrList<coordinateSystem>
56 {
57 
58  // Private Member Functions
59 
60  //- Disallow default bitwise copy construct
62 
63  //- Disallow default bitwise assignment
64  void operator=(const coordinateSystems&);
65 
66 public:
67 
68  //- Runtime type information
69  TypeName("coordinateSystems");
70 
71  // Constructors
72 
73  //- Read construct from IOobject
74  explicit coordinateSystems(const IOobject&);
75 
76  //- Construct from IOobject and a PtrList
78  (
79  const IOobject&,
81  );
82 
83  //- Construct from IOobject and transferring the PtrList contents
85  (
86  const IOobject&,
88  );
89 
90  // Selectors
91 
92  //- Return previously registered or read construct from "constant"
93  static const coordinateSystems& New(const objectRegistry&);
94 
95  // Member Functions
96 
97  //- Find and return index for a given keyword, returns -1 if not found
98  label find(const word& key) const;
99 
100  //- Search for given keyword
101  bool found(const word& keyword) const;
102 
103  //- Return the table of contents (list of all keywords)
104  wordList toc() const;
105 
106  //- write data
107  bool writeData(Ostream&, bool subDict=true) const;
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************ vim: set sw=4 sts=4 et: ************************ //