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);
106 template<
class Type,
class ... Args>
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>
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>
239 const bool align =
false,
240 const unsigned long alignPad = 0
249 const bool align =
false
262 const bool align =
false,
263 const unsigned long alignPad = 0
275 const bool align =
false
296 (writeFormat, writeCompression)
316 const word& writeType,
326 const word& writeType,
413 template<
class ... Args>
423 #define DeclareTypeValueSets(Type, nullArg) \
424 UPtrList<const Field<Type>> Type##ValueSets;
426 #undef DeclareTypeValueSets
#define forAll(list, i)
Loop across all elements in list.
Pre-declare SubField and related Field type.
streamFormat
Enumeration for the format of data in the stream.
compressionType
Enumeration for the format of data in the stream.
void append(const T &)
Append an element at the end of the list.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual int precision() const =0
Get precision of output field.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Holds list of sampling positions.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A class for handling file names.
Base class for writing coordinate sets with data.
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.
Ostream & writeValue(const Type &value, Ostream &os, const bool align=false) const
Write a value.
void writeTable(const coordSet &set, #define TypeValueSetsConstArg(Type, nullArg) Ostream &os, const bool align=false) const
Write multi-column table of data.
virtual autoPtr< setWriter > clone() const =0
Construct and return a clone.
static void appendTypeValueSet(UPtrList< const Field< Types >> &valueSets, const Field< Type > &valueSet)
Helper for variadic write.
virtual ~setWriter()=0
Destructor.
const List< string > & delimiters() const
Possible delimiters that need quoting.
virtual void writeSegmentSeparator(Ostream &os) const
Write a segment separator.
static unsigned long columnWidth(Ostream &os)
Width of columns in tabulated output.
IOstream::streamFormat writeFormat_
Write format.
IOstream::compressionType writeCompression_
Write compression.
autoPtr< List< string > > delimiters_
Possible delimiters that need quoting. Constructed on demand from.
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.
TypeName("setWriter")
Runtime type information.
static autoPtr< setWriter > New(const word &writeType, const IOstream::streamFormat writeFormat=IOstream::ASCII, const IOstream::compressionType writeCompression=IOstream::UNCOMPRESSED)
Select given write options.
virtual void writeCoordSeparator(Ostream &os) const
Write a coordinate separator.
Ostream & writeWord(const word &w, Ostream &os, const bool align=false, const unsigned long alignPad=0) const
Write a word.
static void unpackTypeValueSets(wordList &valueSetNames #define TypeValueSetsNonConstArg(Type, nullArg))
Helper for variadic write.
virtual void writeValueSeparator(Ostream &os) const
Write a value separator.
declareRunTimeSelectionTable(autoPtr, setWriter, word,(const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression),(writeFormat, writeCompression))
setWriter(const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression)
Construct given write options.
A class for handling words, derived from string.
Include the header files for all the primitive types that Fields are instantiated for.
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)
Macros to ease declaration of run-time selection tables.
Foam::argList args(argc, argv)
#define AppendTypeValueSet(Type, nullArg)
#define DeclareTypeValueSets(Type, nullArg)
#define TypeValueSetsParameter(Type, nullArg)
#define TypeValueSetsConstArg(Type, nullArg)
#define TypeValueSetsNonConstArg(Type, nullArg)