41 #ifndef Foam_vtk_formatter_H 42 #define Foam_vtk_formatter_H 120 template<
class... Args>
143 static constexpr uint64_t
npos = uint64_t(-1);
161 virtual const
char*
name() const = 0;
164 virtual const
char*
encoding() const = 0;
175 virtual uint64_t
offset(const uint64_t numbytes);
182 virtual
bool writeSize(const uint64_t numbytes) = 0;
184 virtual
void write(const uint8_t val) = 0;
185 virtual
void write(const label val) = 0;
186 virtual
void write(const
float val) = 0;
187 virtual
void write(const
double val) = 0;
190 virtual
void flush() = 0;
208 template<class... Args>
214 template<class... Args>
219 template<class... Args>
239 template<class... Args>
244 template<class... Args>
254 const
word& contentType,
255 const
word& contentVersion,
256 const
bool leaveOpen = false
266 const
word& contentVersion,
267 const
bool leaveOpen = false
277 const
bool leaveOpen = false
284 template<vtk::
fileTag ContentType>
321 std::
string file = "",
346 template<class Type,
direction nComp=1,
int nTuple=0>
349 const
word& dataName,
350 uint64_t payLoad =
npos,
351 bool leaveOpen = false
363 template<class Type,
direction nComp=1,
int nTuple=0>
367 uint64_t payLoad =
npos,
368 bool leaveOpen = false
378 template<class Type,
direction nComp=1,
int nTuple=0>
418 template<class... Args>
422 const
std::
string& v,
428 template<class... Args>
438 template<class... Args>
448 template<class... Args>
458 template<class... Args>
468 template<class... Args>
472 const
std::
string& v,
478 template<class... Args>
488 template<class... Args>
498 template<class... Args>
508 template<class... Args>
521 template<class Type,
direction nComp=1,
int nTuple=0>
524 return beginDataArray<Type, nComp, nTuple>
532 template<
class Type, direction nComp=1,
int nTuple=0>
535 return beginDataArray<Type, nComp, nTuple>
546 template<
class Type, direction nComp=1>
549 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)