42#ifndef Foam_vtk_formatter_H
43#define Foam_vtk_formatter_H
122 template<
class... Args>
145 static constexpr uint64_t
npos = uint64_t(-1);
163 virtual const
char*
name() const = 0;
166 virtual const
char*
encoding() const = 0;
177 virtual uint64_t
offset(const uint64_t numbytes);
184 virtual
bool writeSize(const uint64_t numbytes) = 0;
186 virtual
void write(const uint8_t val) = 0;
187 virtual
void write(const label val) = 0;
188 virtual
void write(const
float val) = 0;
189 virtual
void write(const
double val) = 0;
192 virtual
void flush() = 0;
210 template<class... Args>
216 template<class... Args>
221 template<class... Args>
241 template<class... Args>
246 template<class... Args>
256 const
word& contentType,
257 const
word& contentVersion,
258 const
bool leaveOpen = false
269 const
bool leaveOpen = false
279 const
bool leaveOpen = false
323 std::
string file =
"",
348 template<class Type,
direction nComp=1,
int nTuple=0>
351 const
word& dataName,
352 uint64_t payLoad =
npos,
353 bool leaveOpen = false
365 template<class Type,
direction nComp=1,
int nTuple=0>
369 uint64_t payLoad =
npos,
370 bool leaveOpen = false
380 template<class Type,
direction nComp=1,
int nTuple=0>
420 template<class... Args>
424 const std::
string& v,
430 template<class... Args>
440 template<class... Args>
450 template<class... Args>
460 template<class... Args>
470 template<class... Args>
474 const std::
string& v,
480 template<class... Args>
490 template<class... Args>
500 template<class... Args>
510 template<class... Args>
523 template<class Type,
direction nComp=1,
int nTuple=0>
534 template<
class Type, direction nComp=1,
int nTuple=0>
548template<
class Type, direction nComp=1>
551 return (count * nComp *
sizeof(Type));
565 #include "foamVtkFormatter.txx"
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Encapsulated combinations of output format options. This is primarily useful when defining the output...
A class for handling words, derived from Foam::string.
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
Namespace for handling VTK output. Contains classes and functions for writing VTK file content.
uint64_t sizeofData(label count)
Commonly used calculation for header and payload sizes.
fileAttr
Some common XML attributes for vtk files.
dataArrayAttr
Some common names for XML DataArray entries.
fileTag
Some common XML tags for vtk files.
Foam::argList args(argc, argv)