1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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/>.
28 Various functions for collecting and writing binary data.
33 \*---------------------------------------------------------------------------*/
38 #include "labelList.H"
39 #include "floatScalar.H"
41 #include "DynamicList.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class writeFuns Declaration
54 \*---------------------------------------------------------------------------*/
58 //- Swap halves of word.
59 static void swapWord(label& word32);
60 static void swapWords(const label nWords, label* words32);
64 //- Write ascii or binary. If binary optionally in-place swaps argument
65 static void write(std::ostream&, const bool, DynamicList<floatScalar>&);
66 static void write(std::ostream&, const bool, DynamicList<label>&);
68 //- Write ascii or binary. If binary optionally in-place swaps argument
69 static void write(std::ostream&, const bool, List<floatScalar>&);
70 static void write(std::ostream&, const bool, labelList&);
72 //- Append point to DynamicList
73 static void insert(const point&, DynamicList<floatScalar>& dest);
75 //- Append elements of labelList to DynamicList
76 static void insert(const labelList&, DynamicList<label>&);
77 //- Append elements of scalarList to DynamicList
78 static void insert(const List<scalar>&, DynamicList<floatScalar>&);
80 //- Append elements of scalarList to DynamicList using map
84 const List<scalar>& source,
85 DynamicList<floatScalar>&
88 //- Append points to DynamicList of floats
89 static void insert(const List<point>& source, DynamicList<floatScalar>&);
90 //- As above but using map
94 const List<point>& source,
95 DynamicList<floatScalar>&
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 } // End namespace Foam
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 // ************************************************************************* //