IODynList.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
11  cfMesh 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.
15 
16  cfMesh 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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  IODynList
26 
27 Description
28  An IODynList of a given type is a DynList of that type which supports
29  automated input and output.
30 
31 SourceFiles
32  IODynList.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef IODynList_H
37 #define IODynList_H
38 
39 #include "DynList.H"
40 #include "regIOobject.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class IODynList Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class T, class IndexType=label>
52 class IODynList
53 :
54  public regIOobject,
55  public DynList<T, IndexType>
56 {
57 
58 public:
59 
60  //- Runtime type information
61  TypeName("DynList");
62 
63 
64  // Constructors
65 
66  //- Construct from IOobject
67  IODynList(const IOobject&);
68 
69  //- Construct from IOobject and size of IODynList
70  IODynList(const IOobject&, const IndexType);
71 
72  //- Construct from IOobject and a List
74 
75 
76  // Member functions
77 
78  bool writeData(Ostream&) const;
79 
80 
81  // Member operators
82 
84 
85  void operator=(const DynList<T, IndexType>&);
86 };
87 
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 } // End namespace Foam
92 
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95 #ifdef NoRepository
96 # include "IODynList.C"
97 #endif
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 #endif
102 
103 // ************************************************************************* //
regIOobject.H
Foam::IODynList::writeData
bool writeData(Ostream &) const
Pure virtual writaData function.
Definition: IODynList.C:110
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Foam::IODynList::IODynList
IODynList(const IOobject &)
Construct from IOobject.
Definition: IODynList.C:40
IODynList.C
An IODynList of a given type is a List of that type which supports automated input and output.
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::DynList
Definition: DynList.H:53
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:60
Foam::IODynList
Definition: IODynList.H:51
Foam::IODynList::operator=
void operator=(const IODynList< T, IndexType > &)
Definition: IODynList.C:91
Foam::IODynList::TypeName
TypeName("DynList")
Runtime type information.
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
DynList.H