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);
164 virtual const
char*
name() 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>
549 template<
class Type, direction nComp=1>
552 return (
count * nComp *
sizeof(Type));
label k
Boltzmann constant.
uint64_t sizeofData(label count)
Commonly used calculation for header and payload sizes.
Encapsulated combinations of output format options. This is primarily useful when defining the output...
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
fileAttr
Some common XML attributes for vtk files.
A class for handling words, derived from Foam::string.
dataArrayAttr
Some common names for XML DataArray entries.
Direction is an 8-bit unsigned integer type used to represent Cartesian directions, components etc.
fileTag
Some common XML tags for vtk files.
Foam::argList args(argc, argv)