foamVtkFileWriterI.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2018 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
29 
30 inline std::ofstream& Foam::vtk::fileWriter::os() noexcept
31 {
32  return os_;
33 }
34 
35 
37 {
38  return *format_;
39 }
40 
41 
42 inline bool Foam::vtk::fileWriter::isState(outputState test) const noexcept
43 {
44  return (test == state_);
45 }
46 
47 
48 inline bool Foam::vtk::fileWriter::notState(outputState test) const noexcept
49 {
50  return (test != state_);
51 }
52 
53 
54 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
55 
57 {
58  return contentType_;
59 }
60 
61 
63 {
64  return opts_;
65 }
66 
67 
69 {
70  return opts_.ext(contentType_);
71 }
72 
73 
74 inline bool Foam::vtk::fileWriter::legacy() const
75 {
76  return opts_.legacy();
77 }
78 
79 
80 inline bool Foam::vtk::fileWriter::parallel() const noexcept
81 {
82  return parallel_;
83 }
84 
85 
86 inline const Foam::word& Foam::vtk::fileWriter::state() const
87 {
88  return stateNames[state_];
89 }
90 
91 
92 inline const Foam::fileName& Foam::vtk::fileWriter::output() const noexcept
93 {
94  return outputFile_;
95 }
96 
97 
98 inline Foam::label Foam::vtk::fileWriter::nCellData() const noexcept
99 {
100  return nCellData_;
101 }
102 
103 
104 inline Foam::label Foam::vtk::fileWriter::nPointData() const noexcept
105 {
106  return nPointData_;
107 }
108 
109 
110 // ************************************************************************* //
Foam::vtk::outputOptions
Encapsulated combinations of output format options. This is primarily useful when defining the output...
Definition: foamVtkOutputOptions.H:55
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:63
Foam::vtk::fileWriter::legacy
bool legacy() const
Definition: foamVtkFileWriterI.H:67
Foam::fileName
A class for handling file names.
Definition: fileName.H:71
Foam::vtk::fileWriter::opts
vtk::outputOptions opts() const
Definition: foamVtkFileWriterI.H:55
Foam::vtk::fileWriter::output
const fileName & output() const noexcept
Definition: foamVtkFileWriterI.H:85
Foam::vtk::fileWriter::contentType
vtk::fileTag contentType() const
Definition: foamVtkFileWriterI.H:49
Foam::vtk::fileWriter::nPointData
label nPointData() const noexcept
Definition: foamVtkFileWriterI.H:97
Foam::vtk::fileWriter::os
std::ofstream & os() noexcept
Definition: foamVtkFileWriterI.H:23
Foam::vtk::fileWriter::os_
std::ofstream os_
Definition: foamVtkFileWriter.H:109
Foam::vtk::fileWriter::notState
bool notState(outputState test) const noexcept
Definition: foamVtkFileWriterI.H:41
Foam::word::ext
word ext() const
Definition: word.C:119
Foam::vtk::fileWriter::nCellData
label nCellData() const noexcept
Definition: foamVtkFileWriterI.H:91
Foam::vtk::fileWriter::parallel
bool parallel() const noexcept
Definition: foamVtkFileWriterI.H:73
Foam::vtk::fileWriter::isState
bool isState(outputState test) const noexcept
Definition: foamVtkFileWriterI.H:35
Foam::vtk::fileTag
fileTag
Definition: foamVtkCore.H:109
Foam::vtk::fileWriter::state
const word & state() const
Definition: foamVtkFileWriterI.H:79
Foam::vtk::fileWriter::format
vtk::formatter & format()
Definition: foamVtkFileWriterI.H:29
Foam::vtk::fileWriter::outputState
outputState
Definition: foamVtkFileWriter.H:69
Foam::vtk::fileWriter::ext
word ext() const
Definition: foamVtkFileWriterI.H:61
Foam::vtk::formatter
Abstract class for a VTK output stream formatter.
Definition: foamVtkFormatter.H:64