IOLongList.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  IOLongList
26 
27 Description
28  An IOLongList of a given type is a List of that type which supports
29  automated input and output.
30 
31 SourceFiles
32  IOLongList.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef IOLongList_H
37 #define IOLongList_H
38 
39 #include "LongList.H"
40 #include "regIOobject.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class IOLongList Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class T, label Offset = 19>
52 class IOLongList
53 :
54  public regIOobject,
55  public LongList<T, Offset>
56 {
57 
58 public:
59 
60  //- Runtime type information
61  TypeName("LongList");
62 
63 
64  // Constructors
65 
66  //- Construct from IOobject
67  IOLongList(const IOobject&);
68 
69  //- Construct from IOobject and size of IOLongList
70  IOLongList(const IOobject&, const label);
71 
72  //- Construct from IOobject and a List
73  IOLongList(const IOobject&, const LongList<T, Offset>&);
74 
75 
76  // Member functions
77 
78  bool writeData(Ostream&) const;
79 
80 
81  // Member operators
82 
83  void operator=(const IOLongList<T, Offset>&);
84 
85  void operator=(const LongList<T, Offset>&);
86 };
87 
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 } // End namespace Foam
92 
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95 #ifdef NoRepository
96 # include "IOLongList.C"
97 #endif
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 #endif
102 
103 // ************************************************************************* //
regIOobject.H
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
LongList.H
Foam::IOLongList::operator=
void operator=(const IOLongList< T, Offset > &)
Definition: IOLongList.C:91
IOLongList.C
An IOLongList of a given type is a list which supports automated input and output.
Foam::LongList
Definition: LongList.H:55
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::IOLongList::IOLongList
IOLongList(const IOobject &)
Construct from IOobject.
Definition: IOLongList.C:40
Foam::IOLongList
Definition: IOLongList.H:51
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:60
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::IOLongList::TypeName
TypeName("LongList")
Runtime type information.
Foam::IOLongList::writeData
bool writeData(Ostream &) const
Pure virtual writaData function.
Definition: IOLongList.C:110