Formatting
[foam-extend-3.2.git] / src / engine / engineValve / valveBank.H
blobb920ede46da3e83d49d9b28d9ebb4fb832e1a8bd
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::valveBank
27 Description
28     A list of valves.
30 \*---------------------------------------------------------------------------*/
32 #ifndef valveBank_H
33 #define valveBank_H
35 #include "PtrList.H"
36 #include "engineValve.H"
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 namespace Foam
43 /*---------------------------------------------------------------------------*\
44                            Class valveBank Declaration
45 \*---------------------------------------------------------------------------*/
47 class valveBank
49     public PtrList<engineValve>
51 private:
53     // Private Member Functions
55         //- Disallow default bitwise copy construct
56         valveBank(const valveBank&);
58         //- Disallow default bitwise assignment
59         void operator=(const valveBank&);
62 public:
64     // Constructors
66         //- Construct from Istream
67         valveBank
68         (
69             const polyMesh& mesh,
70             Istream& is
71         )
72         {
73             PtrList<entry> valveEntries(is);
75             setSize(valveEntries.size());
77             forAll (valveEntries, valveI)
78             {
79                 this->set
80                 (
81                     valveI,
82                     new engineValve
83                     (
84                         valveEntries[valveI].keyword(),
85                         mesh,
86                         valveEntries[valveI].dict()
87                     )
88                 );
89             }
90         }
93     // Destructor - default
96     // Member Functions
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 } // End namespace Foam
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 #endif
108 // ************************************************************************* //