Go to the documentation of this file.
41 #ifndef Foam_vtk_formatter_H
42 #define Foam_vtk_formatter_H
123 template<
class... Args>
146 static constexpr uint64_t
npos = uint64_t(-1);
158 inline std::ostream&
os();
164 virtual const char*
name()
const = 0;
167 virtual const char*
encoding()
const = 0;
178 virtual uint64_t
offset(
const uint64_t numbytes);
185 virtual bool writeSize(
const uint64_t numbytes) = 0;
187 virtual void write(
const uint8_t val) = 0;
188 virtual void write(
const label val) = 0;
189 virtual void write(
const float val) = 0;
190 virtual void write(
const double val) = 0;
193 virtual void flush() = 0;
211 template<
class... Args>
217 template<
class... Args>
222 template<
class... Args>
242 template<
class... Args>
247 template<
class... Args>
257 const word& contentType,
258 const word& contentVersion,
259 const bool leaveOpen =
false
269 const word& contentVersion,
270 const bool leaveOpen =
false
280 const bool leaveOpen =
false
287 template<vtk::fileTag ContentType>
324 std::string file =
"",
349 template<
class Type, direction nComp=1,
int nTuple=0>
352 const word& dataName,
353 uint64_t payLoad =
npos,
354 bool leaveOpen =
false
366 template<
class Type, direction nComp=1,
int nTuple=0>
370 uint64_t payLoad =
npos,
371 bool leaveOpen =
false
381 template<
class Type, direction nComp=1,
int nTuple=0>
421 template<
class... Args>
425 const std::string& v,
431 template<
class... Args>
441 template<
class... Args>
451 template<
class... Args>
461 template<
class... Args>
471 template<
class... Args>
475 const std::string& v,
481 template<
class... Args>
491 template<
class... Args>
501 template<
class... Args>
511 template<
class... Args>
524 template<
class Type, direction nComp=1,
int nTuple=0>
527 return beginDataArray<Type, nComp, nTuple>
535 template<
class Type, direction nComp=1,
int nTuple=0>
538 return beginDataArray<Type, nComp, nTuple>
550 template<
class Type, direction nComp=1>
553 return (
count * nComp *
sizeof(Type));
Encapsulated combinations of output format options. This is primarily useful when defining the output...
A class for handling words, derived from Foam::string.
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.
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
label k
Boltzmann constant.
static const word null
An empty word.
Foam::argList args(argc, argv)