71 template<
class Types,
class Type>
78 valueSets.resize(valueSets.size() + 1);
79 valueSets.set(valueSets.size() - 1,
nullptr);
90 valueSets.resize(valueSets.size() + 1);
91 valueSets.set(valueSets.size() - 1, &valueSet);
101 #undef TypeValueSetsNonConstArg
106 template<
class Type,
class ... Args>
113 #undef TypeValueSetsNonConstArg
114 const word& valueSetName,
119 valueSetNames.
append(valueSetName);
120 #define AppendTypeValueSet(Type, nullArg) \ 121 appendTypeValueSet(Type##ValueSets, valueSet); 123 #undef AppendTypeValueSet 137 template<
class Type,
class ... Args>
144 #undef TypeValueSetsNonConstArg
150 forAll(valueSetNamesPart, i)
152 valueSetNames.
append(valueSetNamesPart[i]);
153 #define AppendTypeValueSet(Type, nullArg) \ 154 appendTypeValueSet(Type##ValueSets, valueSetsPart[i]); 156 #undef AppendTypeValueSet 171 template<
class Type,
class ... Args>
178 #undef TypeValueSetsNonConstArg
239 const bool align =
false,
240 const unsigned long alignPad = 0
249 const bool align =
false 260 #undef TypeValueSetsConstArg
262 const bool align =
false,
263 const unsigned long alignPad = 0
273 #undef TypeValueSetsConstArg
275 const bool align =
false 296 (writeFormat, writeCompression)
316 const word& writeType,
326 const word& writeType,
360 #undef TypeValueSetsConstArg
373 #undef TypeValueSetsConstArg
407 template<
class ... Args>
417 #define DeclareTypeValueSets(Type, nullArg) \ 418 UPtrList<const Field<Type>> Type##ValueSets; 420 #undef DeclareTypeValueSets static autoPtr< setWriter > New(const word &writeType, const IOstream::streamFormat writeFormat=IOstream::ASCII, const IOstream::compressionType writeCompression=IOstream::UNCOMPRESSED)
Select given write options.
autoPtr< List< string > > delimiters_
Possible delimiters that need quoting. Constructed on demand from.
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
Ostream & writeWord(const word &w, Ostream &os, const bool align=false, const unsigned long alignPad=0) const
Write a word.
virtual void write(const fileName &outputDir, const fileName &setName, const coordSet &set, const wordList &valueSetNames #define TypeValueSetsConstArg(Type, nullArg)) const =0
Write a coordSet and associated data.
A list of keyword definitions, which are a keyword followed by any number of values (e...
void writeTableHeader(const coordSet &set, const wordList &valueSetNames, #define TypeValueSetsConstArg(Type, nullArg) Ostream &os, const bool align=false, const unsigned long alignPad=0) const
Write multi-column table header.
IOstream::compressionType writeCompression_
Write compression.
Base class for writing coordinate sets with data.
declareRunTimeSelectionTable(autoPtr, setWriter, word,(const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression),(writeFormat, writeCompression))
Ostream & writeValue(const Type &value, Ostream &os, const bool align=false) const
Write a value.
const List< string > & delimiters() const
Possible delimiters that need quoting.
#define TypeValueSetsConstArg(Type, nullArg)
virtual void writeValueSeparator(Ostream &os) const
Write a value separator.
virtual ~setWriter()=0
Destructor.
static void unpackTypeValueSets(wordList &valueSetNames #define TypeValueSetsNonConstArg(Type, nullArg))
Helper for variadic write.
#define TypeValueSetsParameter(Type, nullArg)
void writeTable(const coordSet &set, #define TypeValueSetsConstArg(Type, nullArg) Ostream &os, const bool align=false) const
Write multi-column table of data.
Holds list of sampling positions.
Include the header files for all the primitive types that Fields are instantiated for...
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
virtual void writeSegmentSeparator(Ostream &os) const
Write a segment separator.
void append(const T &)
Append an element at the end of the list.
streamFormat
Enumeration for the format of data in the stream.
static void appendTypeValueSet(UPtrList< const Field< Types >> &valueSets, const Field< Type > &valueSet)
Helper for variadic write.
static unsigned long columnWidth(Ostream &os)
Width of columns in tabulated output.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
virtual void writeCoordSeparator(Ostream &os) const
Write a coordinate separator.
setWriter(const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression)
Construct given write options.
compressionType
Enumeration for the format of data in the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
TypeName("setWriter")
Runtime type information.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
IOstream::streamFormat writeFormat_
Write format.
FOR_ALL_FIELD_TYPES(DefineFvWallInfoType)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Macros to ease declaration of run-time selection tables.
#define AppendTypeValueSet(Type, nullArg)
#define TypeValueSetsNonConstArg(Type, nullArg)
#define DeclareTypeValueSets(Type, nullArg)
virtual int precision() const =0
Get precision of output field.