foamVtkFormatter.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) 2016-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 Class
27  Foam::vtk::formatter
28 
29 Description
30  Abstract class for a VTK output stream formatter.
31 
32  Includes simple support for writing XML elements.
33  By default uses single-quoting for XML attributes.
34 
35 SourceFiles
36  foamVtkFormatter.C
37  foamVtkFormatterTemplates.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef foamVtkFormatter_H
42 #define foamVtkFormatter_H
43 
44 #include "int.H"
45 #include "label.H"
46 #include "uint64.H"
47 #include "direction.H"
48 #include "word.H"
49 #include "UList.H"
50 #include "DynamicList.H"
51 #include "foamVtkCore.H"
52 #include "foamVtkPTraits.H"
53 
54 #include <iostream>
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 namespace vtk
61 {
62 
63 class outputOptions;
64 
65 /*---------------------------------------------------------------------------*\
66  Class vtk::formatter Declaration
67 \*---------------------------------------------------------------------------*/
68 
69 class formatter
70 {
71 public:
72 
73  //- Quoting for XML attributes
74  enum quoteChar : char
75  {
76  DOUBLE_QUOTE = '\"',
77  SINGLE_QUOTE = '\'',
78  };
79 
80 
81 protected:
82 
83  // Private Data
84 
85  //- The output stream for the formatter
86  std::ostream& os_;
87 
88  //- LIFO stack of current XML tags
90 
91  //- Tag open/closed/ended state
92  mutable bool inTag_;
93 
94  //- Quoting character for XML attributes
95  char quote_;
96 
97 
98 protected:
99 
100  // Protected Member Functions
101 
102  //- Can write XML key/value attribute pair when inside a tag.
103  //- Emit warning and return false if this condition is not met.
104  bool canWriteAttr(const word& k) const;
105 
106  //- Can write tag-like top-level content (eg, comment, ...)
107  //- when not already inside a tag.
108  //- Emit warning and return false if this condition is not met.
109  bool canWriteToplevel(const char* what) const;
110 
111  //- Write XML key/value attribute pair (implementation).
112  template<class Type>
113  inline void writeAttr(const word& k, const Type& v);
114 
115  //- No-op write XML attribute (for templating code).
116  // \return formatter for chaining
117  inline formatter& xmlAttr();
118 
119  //- No-op XML comment loop (for templating code).
120  inline void xmlCommentLoop();
121 
122  //- Loop/output XML comments
123  template<class... Args>
124  inline void xmlCommentLoop(const std::string& text, Args&&... args);
125 
126  //- Open XML tag (implementation), checking if not already inside
127  //- another tag.
128  //- Emit warning and return false if this condition is not met.
129  bool openTagImpl(const word& tagName);
130 
131 
132  // Constructors
133 
134  //- Construct and attach to an output stream
135  inline formatter(std::ostream& os);
136 
137 
138 public:
139 
140  // Public typedefs
141 
142  //- The header data is vtk UInt64
143  typedef uint64_t headerType;
144 
145  //- Out of range position or size.
146  static constexpr uint64_t npos = uint64_t(-1);
147 
148 
149  //- Destructor
150  virtual ~formatter() = default;
151 
152 
153  // Member Functions
154 
155  // Access
156 
157  //- Access to the underlying output stream
158  inline std::ostream& os();
159 
160  //- The format-type / output options.
161  virtual const outputOptions& opts() const = 0;
162 
163  //- Name for the XML output type or the legacy output type.
164  virtual const char* name() const = 0;
165 
166  //- Name for the XML append encoding
167  virtual const char* encoding() const = 0;
168 
169  //- Change quoting char for XML attributes (default: SINGLE_QUOTE)
170  void quoting(const quoteChar quote);
171 
172  //- Increase the append data offset by numbytes and sizeof(uint64_t).
173  // The additional (uint64_t) size information is consistent with
174  // writeSize()
175  //
176  // \return The previous data offset or formatter::npos for formats
177  // that do not support appending data.
178  virtual uint64_t offset(const uint64_t numbytes);
179 
180  //- The encoded length for binary output is pass-through.
181  virtual std::size_t encodedLength(std::size_t n) const;
182 
183  //- Write leading size for binary output
184  // \return True if used by the formatter.
185  virtual bool writeSize(const uint64_t numbytes) = 0;
186 
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;
191 
192  //- Flush encoding, write newline etc.
193  virtual void flush() = 0;
194 
195 
196  // General Output
197 
198  //- Add indenting according to the current XML tag depth
199  // Two spaces per depth.
200  inline void indent();
201 
202  //- Add indenting of n spaces.
203  inline void indent(label n);
204 
205  //- Write XML header
206  // \return formatter for chaining
207  inline formatter& xmlHeader();
208 
209  //- Write XML comment (at the current indentation level)
210  // \return formatter for chaining
211  template<class... Args>
212  inline formatter& xmlComment(const std::string& text, Args&&... args);
213 
214 
215  //- Start an XML tag, optionally with attributes
216  // \return formatter for chaining
217  template<class... Args>
218  inline formatter& openTag(const word& tagName, Args&&... args);
219 
220  //- Start an XML tag, optionally with attributes
221  // \return formatter for chaining
222  template<class... Args>
223  inline formatter& openTag(vtk::fileTag t, Args&&... args);
224 
225  //- Finish an XML tag, optional as an empty container.
226  // Always adds a trailing newline.
227  // \return formatter for chaining
228  formatter& closeTag(const bool isEmpty = false);
229 
230  //- An end XML tag, optional with sanity check
231  // Always adds a trailing newline.
232  // \return formatter for chaining
233  formatter& endTag(const word& tagName = word::null);
234 
235  //- An end XML tag with sanity check
236  // Always adds a trailing newline.
237  // \return formatter for chaining
238  inline virtual formatter& endTag(vtk::fileTag t);
239 
240  //- Write XML tag without any attributes. Combines openTag/closeTag.
241  // \return formatter for chaining
242  template<class... Args>
243  inline formatter& tag(const word& t, Args&&... args);
244 
245  //- Write XML tag without any attributes. Combines openTag/closeTag.
246  // \return formatter for chaining
247  template<class... Args>
248  inline formatter& tag(vtk::fileTag t, Args&&... args);
249 
250 
251  //- Add a "VTKFile" XML tag for contentType, followed by a tag for
252  //- the contentType itself.
253  // \param leaveOpen Leave tag open for additional attributes.
254  // \return formatter for chaining
256  (
257  const word& contentType,
258  const word& contentVersion,
259  const bool leaveOpen = false
260  );
261 
262  //- Add a "VTKFile" XML tag for contentType, followed by a tag for
263  //- the contentType itself.
264  // \param leaveOpen Leave tag open for additional attributes.
265  // \return formatter for chaining
266  inline formatter& beginVTKFile
267  (
268  vtk::fileTag contentType,
269  const word& contentVersion,
270  const bool leaveOpen = false
271  );
272 
273  //- Add a "VTKFile" XML tag for contentType, followed by a tag for
274  //- the contentType itself.
275  // \param leaveOpen Leave tag open for additional attributes.
276  // \return formatter for chaining
277  inline formatter& beginVTKFile
278  (
279  vtk::fileTag contentType,
280  const bool leaveOpen = false
281  );
282 
283  //- Add a "VTKFile" XML tag for contentType, followed by a tag for
284  //- the contentType itself.
285  // \param leaveOpen Leave tag open for additional attributes.
286  // \return formatter for chaining
287  template<vtk::fileTag ContentType>
288  inline formatter& beginVTKFile(bool leaveOpen = false);
289 
290  //- Add a "AppendedData" XML tag with the current encoding and output
291  //- the requisite '_' prefix.
292  // \return formatter for chaining
294 
295  //- Begin "Block" XML section.
296  // \param index The index of the block
297  // \param name The name of the block (ignored if empty)
298  // \return formatter for chaining
299  formatter& beginBlock(label index, std::string name = "");
300 
301  //- End "Block" XML section.
302  // \return formatter for chaining
303  inline formatter& endBlock();
304 
305  //- Begin "Piece" XML section.
306  // \param index The index of the piece
307  // \param name The name of the piece (ignored if empty)
308  // \return formatter for chaining
309  formatter& beginPiece(label index, std::string name = "");
310 
311  //- End "Piece" XML section.
312  // \return formatter for chaining
313  inline virtual formatter& endPiece();
314 
315  //- Insert a single "DataSet" XML entry tag.
316  // \param index The index of the DataSet
317  // \param file The file name for the data (ignored if empty)
318  // \param autoName The name for the data extracted from the file name
319  // (without extension)
320  // \return formatter for chaining
322  (
323  label index,
324  std::string file = "",
325  bool autoName = true
326  );
327 
328  //- Insert a single "DataSet" XML entry tag.
329  // \param index The index of the DataSet
330  // \param file The file name for the data (ignored if empty)
331  // \param name The name for the dataset
332  // \return formatter for chaining
334  (
335  label index,
336  std::string file,
337  std::string name
338  );
339 
340  //- Begin "DataArray" XML section.
341  //
342  // \param dataName The name of the DataArray
343  // \param payLoad Additional payLoad information to increment
344  // the offset for an append formatter and add the "offset"
345  // attribute accordingly.
346  // \param leaveOpen Leave tag open for additional attributes.
347  //
348  // \return formatter for chaining
349  template<class Type, direction nComp=1, int nTuple=0>
351  (
352  const word& dataName,
353  uint64_t payLoad = npos,
354  bool leaveOpen = false
355  );
356 
357  //- Begin "DataArray" XML section.
358  //
359  // \param dataName The name of the DataArray as an enumeration
360  // \param payLoad Additional payLoad information to increment
361  // the offset for an append formatter and add the "offset"
362  // attribute accordingly.
363  // \param leaveOpen Leave tag open for additional attributes.
364  //
365  // \return formatter for chaining
366  template<class Type, direction nComp=1, int nTuple=0>
367  inline formatter& beginDataArray
368  (
369  const vtk::dataArrayAttr& dataName,
370  uint64_t payLoad = npos,
371  bool leaveOpen = false
372  );
373 
374  //- End "DataArray" XML section
375  // \return formatter for chaining
376  inline virtual formatter& endDataArray();
377 
378  //- Insert a single "PDataArray" XML entry tag.
379  // For some entries, the name is optional.
380  // \return formatter for chaining
381  template<class Type, direction nComp=1, int nTuple=0>
382  formatter& PDataArray(const word& dataName);
383 
384 
385  //- Begin "FieldData" XML section.
386  inline formatter& beginFieldData();
387 
388  //- Begin "CellData" XML section.
389  inline formatter& beginCellData();
390 
391  //- Begin "PointData" XML section.
392  inline formatter& beginPointData();
393 
394  //- End "FieldData" XML section.
395  inline virtual formatter& endFieldData();
396 
397  //- End "CellData" XML section.
398  inline virtual formatter& endCellData();
399 
400  //- End "PointData" XML section.
401  inline virtual formatter& endPointData();
402 
403 
404  //- End "AppendedData" XML section
405  // \return formatter for chaining
407 
408  //- End "VTKFile" XML section.
409  // \return formatter for chaining
410  inline virtual formatter& endVTKFile();
411 
412 
413  //- Emit "TimeValue" for FieldData (name as per Catalyst output)
414  formatter& writeTimeValue(scalar timeValue);
415 
416 
417  // XML Attributes
418 
419  //- Pair-wise write of XML key/value attributes
420  // \return formatter for chaining
421  template<class... Args>
422  inline formatter& xmlAttr
423  (
424  const word& k,
425  const std::string& v,
426  Args&&... args
427  );
428 
429  //- Pair-wise write of XML key/value attributes
430  // \return formatter for chaining
431  template<class... Args>
432  inline formatter& xmlAttr
433  (
434  const word& k,
435  const int32_t v,
436  Args&&... args
437  );
438 
439  //- Pair-wise write of XML key/value attributes
440  // \return formatter for chaining
441  template<class... Args>
442  inline formatter& xmlAttr
443  (
444  const word& k,
445  const int64_t v,
446  Args&&... args
447  );
448 
449  //- Pair-wise write of XML key/value attributes
450  // \return formatter for chaining
451  template<class... Args>
452  inline formatter& xmlAttr
453  (
454  const word& k,
455  const uint64_t v,
456  Args&&... args
457  );
458 
459  //- Pair-wise write of XML key/value attributes
460  // \return formatter for chaining
461  template<class... Args>
462  inline formatter& xmlAttr
463  (
464  const word& k,
465  const scalar v,
466  Args&&... args
467  );
468 
469  //- Pair-wise write of XML key/value attributes
470  // \return formatter for chaining
471  template<class... Args>
472  inline formatter& xmlAttr
473  (
474  const vtk::fileAttr& k,
475  const std::string& v,
476  Args&&... args
477  );
478 
479  //- Pair-wise write of XML key/value attributes
480  // \return formatter for chaining
481  template<class... Args>
482  inline formatter& xmlAttr
483  (
484  const vtk::fileAttr& k,
485  const int32_t v,
486  Args&&... args
487  );
488 
489  //- Pair-wise write of XML key/value attributes
490  // \return formatter for chaining
491  template<class... Args>
492  inline formatter& xmlAttr
493  (
494  const vtk::fileAttr& k,
495  const int64_t v,
496  Args&&... args
497  );
498 
499  //- Pair-wise write of XML key/value attributes
500  // \return formatter for chaining
501  template<class... Args>
502  inline formatter& xmlAttr
503  (
504  const vtk::fileAttr& k,
505  const uint64_t v,
506  Args&&... args
507  );
508 
509  //- Pair-wise write of XML key/value attributes
510  // \return formatter for chaining
511  template<class... Args>
512  inline formatter& xmlAttr
513  (
514  const vtk::fileAttr& k,
515  const scalar v,
516  Args&&... args
517  );
518 
519 
520  // Housekeeping
521 
522  //- Open "DataArray" XML tag and leave open (requires a closeTag).
523  // \deprecated Use beginDataArray instead (SEPT-2018)
524  template<class Type, direction nComp=1, int nTuple=0>
525  formatter& openDataArray(const word& dataName)
526  {
527  return beginDataArray<Type, nComp, nTuple>
528  (
529  dataName, formatter::npos, true
530  );
531  }
532 
533  //- Open "DataArray" XML tag and leave open (requires a closeTag).
534  // \deprecated Use beginDataArray instead (SEPT-2018)
535  template<class Type, direction nComp=1, int nTuple=0>
536  formatter& openDataArray(const vtk::dataArrayAttr& dataName)
537  {
538  return beginDataArray<Type, nComp, nTuple>
539  (
540  dataName, formatter::npos, true
541  );
542  }
543 
544 };
545 
546 
547 // Global Functions
548 
549 //- Commonly used calculation for header and payload sizes
550 template<class Type, direction nComp=1>
551 inline uint64_t sizeofData(label count)
552 {
553  return (count * nComp * sizeof(Type));
554 }
555 
556 
557 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
558 
559 } // End namespace vtk
560 } // End namespace Foam
561 
562 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
563 
564 #include "foamVtkFormatterI.H"
565 
566 #ifdef NoRepository
567  #include "foamVtkFormatterTemplates.C"
568 #endif
569 
570 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
571 
572 #endif
573 
574 // ************************************************************************* //
Foam::vtk::outputOptions
Encapsulated combinations of output format options. This is primarily useful when defining the output...
Definition: foamVtkOutputOptions.H:59
Foam::vtk::formatter::inTag_
bool inTag_
Tag open/closed/ended state.
Definition: foamVtkFormatter.H:91
Foam::vtk::formatter::writeTimeValue
formatter & writeTimeValue(scalar timeValue)
Emit "TimeValue" for FieldData (name as per Catalyst output)
Definition: foamVtkFormatter.C:296
Foam::vtk::formatter::openTagImpl
bool openTagImpl(const word &tagName)
Definition: foamVtkFormatter.C:76
Foam::vtk::formatter::openTag
formatter & openTag(const word &tagName, Args &&... args)
Start an XML tag, optionally with attributes.
int.H
System signed integer.
Foam::vtk::formatter::endDataArray
virtual formatter & endDataArray()
End "DataArray" XML section.
Definition: foamVtkFormatterI.H:294
Foam::vtk::formatter::closeTag
formatter & closeTag(const bool isEmpty=false)
Finish an XML tag, optional as an empty container.
Definition: foamVtkFormatter.C:99
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::vtk::formatter::writeSize
virtual bool writeSize(const uint64_t numbytes)=0
Write leading size for binary output.
Foam::vtk::formatter::offset
virtual uint64_t offset(const uint64_t numbytes)
Increase the append data offset by numbytes and sizeof(uint64_t).
Definition: foamVtkFormatter.C:64
Foam::vtk::sizeofData
uint64_t sizeofData(label count)
Commonly used calculation for header and payload sizes.
Definition: foamVtkFormatter.H:550
Foam::DynamicList< word >
Foam::vtk::formatter::os_
std::ostream & os_
The output stream for the formatter.
Definition: foamVtkFormatter.H:85
Foam::vtk::formatter::~formatter
virtual ~formatter()=default
Destructor.
foamVtkFormatterTemplates.C
Foam::vtk::formatter::endCellData
virtual formatter & endCellData()
End "CellData" XML section.
Definition: foamVtkFormatterI.H:276
Foam::vtk::formatter::xmlComment
formatter & xmlComment(const std::string &text, Args &&... args)
Write XML comment (at the current indentation level)
Foam::vtk::formatter::beginAppendedData
formatter & beginAppendedData()
Definition: foamVtkFormatter.C:181
Foam::vtk::formatter::endPiece
virtual formatter & endPiece()
End "Piece" XML section.
Definition: foamVtkFormatterI.H:306
Foam::vtk::formatter::encodedLength
virtual std::size_t encodedLength(std::size_t n) const
The encoded length for binary output is pass-through.
Definition: foamVtkFormatter.C:70
Foam::vtk::fileAttr
fileAttr
Some common XML attributes for vtk files.
Definition: foamVtkCore.H:143
Foam::vtk::formatter::quote_
char quote_
Quoting character for XML attributes.
Definition: foamVtkFormatter.H:94
Foam::vtk::formatter::SINGLE_QUOTE
Single-quote XML attributes.
Definition: foamVtkFormatter.H:76
Foam::vtk::formatter::xmlAttr
formatter & xmlAttr()
No-op write XML attribute (for templating code).
Definition: foamVtkFormatterI.H:30
Foam::vtk::formatter::beginDataArray
formatter & beginDataArray(const word &dataName, uint64_t payLoad=npos, bool leaveOpen=false)
Begin "DataArray" XML section.
Foam::vtk::formatter::endPointData
virtual formatter & endPointData()
End "PointData" XML section.
Definition: foamVtkFormatterI.H:282
Foam::vtk::formatter::xmlCommentLoop
void xmlCommentLoop()
No-op XML comment loop (for templating code).
Definition: foamVtkFormatterI.H:36
Foam::vtk::formatter::PDataArray
formatter & PDataArray(const word &dataName)
Insert a single "PDataArray" XML entry tag.
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::vtk::formatter::os
std::ostream & os()
Access to the underlying output stream.
Definition: foamVtkFormatterI.H:70
Foam::vtk::formatter::openDataArray
formatter & openDataArray(const word &dataName)
Open "DataArray" XML tag and leave open (requires a closeTag).
Definition: foamVtkFormatter.H:524
Foam::vtk::formatter::quoteChar
quoteChar
Quoting for XML attributes.
Definition: foamVtkFormatter.H:73
Foam::vtk::formatter::indent
void indent()
Add indenting according to the current XML tag depth.
Definition: foamVtkFormatterI.H:76
Foam::vtk::formatter::encoding
virtual const char * encoding() const =0
Name for the XML append encoding.
Foam::vtk::formatter::formatter
formatter(std::ostream &os)
Construct and attach to an output stream.
Definition: foamVtkFormatterI.H:59
Foam::vtk::formatter::endVTKFile
virtual formatter & endVTKFile()
End "VTKFile" XML section.
Definition: foamVtkFormatterI.H:312
Foam::vtk::formatter::name
virtual const char * name() const =0
Name for the XML output type or the legacy output type.
Foam::vtk::formatter::DOUBLE_QUOTE
Double-quote XML attributes.
Definition: foamVtkFormatter.H:75
Foam::vtk::formatter::writeAttr
void writeAttr(const word &k, const Type &v)
Write XML key/value attribute pair (implementation).
Definition: foamVtkFormatterI.H:321
Foam::vtk::formatter::beginPiece
formatter & beginPiece(label index, std::string name="")
Begin "Piece" XML section.
Definition: foamVtkFormatter.C:222
Foam::vtk::dataArrayAttr
dataArrayAttr
Some common names for XML DataArray entries.
Definition: foamVtkCore.H:159
Foam::vtk::formatter::endBlock
formatter & endBlock()
End "Block" XML section.
Definition: foamVtkFormatterI.H:300
Foam::vtk::formatter::openDataArray
formatter & openDataArray(const vtk::dataArrayAttr &dataName)
Open "DataArray" XML tag and leave open (requires a closeTag).
Definition: foamVtkFormatter.H:535
Foam::vtk::formatter::flush
virtual void flush()=0
Flush encoding, write newline etc.
Foam::vtk::formatter::beginBlock
formatter & beginBlock(label index, std::string name="")
Begin "Block" XML section.
Definition: foamVtkFormatter.C:201
Foam::vtk::fileTag
fileTag
Some common XML tags for vtk files.
Definition: foamVtkCore.H:113
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::vtk::formatter::opts
virtual const outputOptions & opts() const =0
The format-type / output options.
Foam::vtk::formatter::xmlHeader
formatter & xmlHeader()
Write XML header.
Definition: foamVtkFormatterI.H:91
Foam::vtk::formatter::beginFieldData
formatter & beginFieldData()
Begin "FieldData" XML section.
Definition: foamVtkFormatterI.H:262
Foam::vtk::formatter::xmlTags_
DynamicList< word > xmlTags_
LIFO stack of current XML tags.
Definition: foamVtkFormatter.H:88
direction.H
Direction is an 8-bit unsigned integer type used to represent the Cartesian directions etc.
Foam::vtk::formatter::beginPointData
formatter & beginPointData()
Begin "PointData" XML section.
Definition: foamVtkFormatterI.H:256
Foam::vtk::formatter::endTag
formatter & endTag(const word &tagName=word::null)
An end XML tag, optional with sanity check.
Definition: foamVtkFormatter.C:125
UList.H
Foam::BitOps::count
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Definition: BitOps.H:74
foamVtkFormatterI.H
Foam::vtk::formatter::tag
formatter & tag(const word &t, Args &&... args)
Write XML tag without any attributes. Combines openTag/closeTag.
label.H
Foam::vtk::formatter::DataSet
formatter & DataSet(label index, std::string file="", bool autoName=true)
Insert a single "DataSet" XML entry tag.
Definition: foamVtkFormatter.C:243
k
label k
Boltzmann constant.
Definition: LISASMDCalcMethod2.H:41
foamVtkCore.H
Foam::word::null
static const word null
An empty word.
Definition: word.H:77
Foam::vtk::formatter::quoting
void quoting(const quoteChar quote)
Change quoting char for XML attributes (default: SINGLE_QUOTE)
Definition: foamVtkFormatter.C:58
Foam::vtk::formatter::beginCellData
formatter & beginCellData()
Begin "CellData" XML section.
Definition: foamVtkFormatterI.H:250
Foam::vtk::formatter::headerType
uint64_t headerType
The header data is vtk UInt64.
Definition: foamVtkFormatter.H:142
Foam::vtk::formatter::npos
static constexpr uint64_t npos
Out of range position or size.
Definition: foamVtkFormatter.H:145
DynamicList.H
word.H
Foam::vtk::formatter::beginVTKFile
formatter & beginVTKFile(const word &contentType, const word &contentVersion, const bool leaveOpen=false)
Definition: foamVtkFormatter.C:158
Foam::vtk::formatter::endAppendedData
formatter & endAppendedData()
End "AppendedData" XML section.
Definition: foamVtkFormatter.C:192
foamVtkPTraits.H
Foam::vtk::formatter::write
virtual void write(const uint8_t val)=0
args
Foam::argList args(argc, argv)
Foam::vtk::formatter::canWriteAttr
bool canWriteAttr(const word &k) const
Definition: foamVtkFormatter.C:31
Foam::vtk::formatter::endFieldData
virtual formatter & endFieldData()
End "FieldData" XML section.
Definition: foamVtkFormatterI.H:288
Foam::vtk::formatter::canWriteToplevel
bool canWriteToplevel(const char *what) const
Definition: foamVtkFormatter.C:43
uint64.H
64bit unsigned integer
Foam::vtk::formatter
Abstract class for a VTK output stream formatter.
Definition: foamVtkFormatter.H:68