Base class for writing coordinate sets with data. More...


Public Member Functions | |
| TypeName ("setWriter") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, setWriter, word,(const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression),(writeFormat, writeCompression)) | |
| declareRunTimeSelectionTable (autoPtr, setWriter, dict,(const dictionary &dict),(dict)) | |
| setWriter (const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression) | |
| Construct given write options. More... | |
| setWriter (const dictionary &dict) | |
| Construct from dictionary. More... | |
| virtual | ~setWriter ()=0 |
| Destructor. More... | |
| 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. More... | |
| virtual void | write (const fileName &outputDir, const fileName &setName, const coordSet &set, const wordList &valueSetNames #define TypeValueSetsConstArg(Type, nullArg)) const |
| Write a coordSet and associated data. More... | |
| template<class ... Args> | |
| void | write (const fileName &outputDir, const fileName &setName, const coordSet &set, const Args &... args) const |
| Write fields for a single surface to file. For use in code where. More... | |
| template<class Type > | |
| Foam::Ostream & | writeValue (const Type &value, Ostream &os, const bool align) const |
Static Public Member Functions | |
| template<class Types , class Type > | |
| static void | appendTypeValueSet (UPtrList< const Field< Types >> &valueSets, const Field< Type > &valueSet) |
| Helper for variadic write. More... | |
| template<class Type > | |
| static void | appendTypeValueSet (UPtrList< const Field< Type >> &valueSets, const Field< Type > &valueSet) |
| Helper for variadic write. More... | |
| static void | unpackTypeValueSets (wordList &valueSetNames #define TypeValueSetsNonConstArg(Type, nullArg)) |
| Helper for variadic write. More... | |
| template<class Type , class ... Args> | |
| static void | unpackTypeValueSets (wordList &valueSetNames #define TypeValueSetsNonConstArg(Type, nullArg) FOR_ALL_FIELD_TYPES(TypeValueSetsNonConstArg), const word &valueSetName, const Field< Type > &valueSet, Args &... args) |
| Helper for variadic write. More... | |
| template<class Type , class ... Args> | |
| static void | unpackTypeValueSets (wordList &valueSetNames #define TypeValueSetsNonConstArg(Type, nullArg) FOR_ALL_FIELD_TYPES(TypeValueSetsNonConstArg), const wordList &valueSetNamesPart, const UPtrList< const Field< Type >> &valueSetsPart, Args &... args) |
| Helper for variadic write. More... | |
| template<class Type , class ... Args> | |
| static void | unpackTypeValueSets (wordList &valueSetNames #define TypeValueSetsNonConstArg(Type, nullArg) FOR_ALL_FIELD_TYPES(TypeValueSetsNonConstArg), const wordList &valueSetNamesPart, const PtrList< Field< Type >> &valueSetsPart, Args &... args) |
| Helper for variadic write. More... | |
| static autoPtr< setWriter > | New (const word &writeType, const IOstream::streamFormat writeFormat=IOstream::ASCII, const IOstream::compressionType writeCompression=IOstream::UNCOMPRESSED) |
| Select given write options. More... | |
| static autoPtr< setWriter > | New (const word &writeType, const dictionary &dict) |
| Select given a dictionary. More... | |
Protected Member Functions | |
| virtual void | writeValueSeparator (Ostream &os) const |
| Write a value separator. More... | |
| virtual void | writeCoordSeparator (Ostream &os) const |
| Write a coordinate separator. More... | |
| virtual void | writeSegmentSeparator (Ostream &os) const |
| Write a segment separator. More... | |
| const List< string > & | delimiters () const |
| Possible delimiters that need quoting. More... | |
| Ostream & | writeWord (const word &w, Ostream &os, const bool align=false, const unsigned long alignPad=0) const |
| Write a word. More... | |
| template<class Type > | |
| Ostream & | writeValue (const Type &value, Ostream &os, const bool align=false) const |
| Write a value. More... | |
| 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. More... | |
| void | writeTable (const coordSet &set, #define TypeValueSetsConstArg(Type, nullArg) Ostream &os, const bool align=false) const |
| Write multi-column table of data. More... | |
Static Protected Member Functions | |
| static unsigned long | columnWidth (Ostream &os) |
| Width of columns in tabulated output. More... | |
Protected Attributes | |
| IOstream::streamFormat | writeFormat_ |
| Write format. More... | |
| IOstream::compressionType | writeCompression_ |
| Write compression. More... | |
| autoPtr< List< string > > | delimiters_ |
| Possible delimiters that need quoting. Constructed on demand from. More... | |
Base class for writing coordinate sets with data.
setWriter::New("vtk")->write
(
"myDirectory",
"mySet",
coordSet(points, true),
"p", p,
"U", U
);
Definition at line 63 of file setWriter.H.
| setWriter | ( | const IOstream::streamFormat | writeFormat, |
| const IOstream::compressionType | writeCompression | ||
| ) |
Construct given write options.
Definition at line 249 of file setWriter.C.
Referenced by setWriter::columnWidth(), and setWriter::writeTable().

| setWriter | ( | const dictionary & | dict | ) |
Construct from dictionary.
Definition at line 259 of file setWriter.C.
References setWriter::New().

|
pure virtual |
Destructor.
Definition at line 340 of file setWriter.C.
Referenced by setWriter::columnWidth().

|
inlinestatic |
Helper for variadic write.
Definition at line 72 of file setWriter.H.
|
inlinestatic |
Helper for variadic write.
Definition at line 84 of file setWriter.H.
References setWriter::unpackTypeValueSets().

|
inlinestatic |
Helper for variadic write.
Definition at line 95 of file setWriter.H.
Referenced by setWriter::appendTypeValueSet(), setWriter::unpackTypeValueSets(), surfaceWriter::write(), and setWriter::write().

|
inlinestatic |
Helper for variadic write.
Definition at line 107 of file setWriter.H.
References AppendTypeValueSet, Foam::FOR_ALL_FIELD_TYPES(), TypeValueSetsParameter, and setWriter::unpackTypeValueSets().

|
inlinestatic |
Helper for variadic write.
Definition at line 138 of file setWriter.H.
References AppendTypeValueSet, Foam::FOR_ALL_FIELD_TYPES(), forAll, TypeValueSetsParameter, and setWriter::unpackTypeValueSets().

|
inlinestatic |
Helper for variadic write.
Definition at line 172 of file setWriter.H.
References Foam::FOR_ALL_FIELD_TYPES(), TypeValueSetsParameter, and setWriter::unpackTypeValueSets().

|
protectedvirtual |
Write a value separator.
Reimplemented in csvSetWriter.
Definition at line 43 of file setWriter.C.
References token::SPACE.
Referenced by rawSetWriter::write().

|
protectedvirtual |
|
protectedvirtual |
Write a segment separator.
Reimplemented in csvSetWriter, and rawSetWriter.
Definition at line 55 of file setWriter.C.
References Foam::nl.
|
protected |
Possible delimiters that need quoting.
Definition at line 61 of file setWriter.C.
References OStringStream::rewind(), OStringStream::str(), and setWriter::writeWord().

|
inlinestaticprotected |
Width of columns in tabulated output.
Definition at line 228 of file setWriter.H.
References IOstream::ASCII, setWriter::declareRunTimeSelectionTable(), dict, Foam::FOR_ALL_FIELD_TYPES(), setWriter::New(), Ostream::precision(), setWriter::setWriter(), setWriter::TypeName(), TypeValueSetsConstArg, IOstream::UNCOMPRESSED, setWriter::write(), setWriter::writeTable(), setWriter::writeTableHeader(), setWriter::writeValue(), setWriter::writeWord(), and setWriter::~setWriter().

|
inlineprotected |
Write a word.
Definition at line 83 of file setWriter.C.
References forAll, s(), and setWriter::writeTableHeader().
Referenced by setWriter::columnWidth(), and setWriter::delimiters().


|
protected |
Write multi-column table header.
Definition at line 119 of file setWriter.C.
References Foam::first(), Foam::FOR_ALL_FIELD_TYPES(), forAll, scalarName, setWriter::writeTable(), and WriteTypeValueSetNames.
Referenced by setWriter::columnWidth(), rawSetWriter::write(), csvSetWriter::write(), and setWriter::writeWord().


|
protected |
Write multi-column table of data.
Definition at line 193 of file setWriter.C.
References Foam::first(), Foam::FOR_ALL_FIELD_TYPES(), forAll, setWriter::setWriter(), and WriteTypeValueSets.
Referenced by setWriter::columnWidth(), rawSetWriter::write(), csvSetWriter::write(), and setWriter::writeTableHeader().


| TypeName | ( | "setWriter" | ) |
Runtime type information.
Referenced by setWriter::columnWidth().

| declareRunTimeSelectionTable | ( | autoPtr | , |
| setWriter | , | ||
| word | , | ||
| (const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression) | , | ||
| (writeFormat, writeCompression) | |||
| ) |
|
static |
Select given write options.
Definition at line 279 of file setWriter.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by setWriter::columnWidth(), setWriter::New(), sampledSets::read(), histogram::read(), layerAverage::read(), regionSizeDistribution::read(), streamlines::read(), and setWriter::setWriter().


|
static |
Select given a dictionary.
Definition at line 303 of file setWriter.C.
References IOstream::ASCII, IOstream::compressionEnum(), dict, IOstream::formatEnum(), dictionary::found(), dictionary::lookup(), setWriter::New(), and IOstream::UNCOMPRESSED.

|
pure virtual |
Write a coordSet and associated data.
Implemented in csvSetWriter, rawSetWriter, gnuplotSetWriter, noSetWriter, vtkSetWriter, and ensightSetWriter.
Referenced by setWriter::columnWidth(), and setWriter::write().

|
inlinevirtual |
Write a coordSet and associated data.
Reimplemented in csvSetWriter, rawSetWriter, gnuplotSetWriter, noSetWriter, vtkSetWriter, and ensightSetWriter.
Definition at line 364 of file setWriter.H.
References Foam::FOR_ALL_FIELD_TYPES(), TypeValueSetsParameter, and setWriter::write().

|
inline |
Write fields for a single surface to file. For use in code where.
the fields that are to be written are known. Takes any number of name, values arguments at the end. E.g.:
write ( Output options "myDirectory", "mySet",
Geometry coordSet(points, true),
Fields "p", Field<scalar>(points.size(), ...), "U", Field<vector>(points.size(), ...) );
Definition at line 408 of file setWriter.H.
References DeclareTypeValueSets, Foam::FOR_ALL_FIELD_TYPES(), TypeValueSetsParameter, setWriter::unpackTypeValueSets(), and setWriter::write().

| Foam::Ostream& writeValue | ( | const Type & | value, |
| Ostream & | os, | ||
| const bool | align | ||
| ) | const |
Definition at line 33 of file setWriterTemplates.C.
References Foam::component(), and Foam::setw().

|
protected |
Write format.
Definition at line 203 of file setWriter.H.
|
protected |
Write compression.
Definition at line 206 of file setWriter.H.
Referenced by rawSetWriter::write(), and csvSetWriter::write().
Possible delimiters that need quoting. Constructed on demand from.
the write.*Separator functions.
Definition at line 210 of file setWriter.H.