31 bool Foam::ensightFile::allowUndef_ =
false;
53 sprintf(buf, dirFmt_.c_str(),
n);
67 std::ostringstream oss;
68 oss <<
"%0" << n <<
"d";
118 bool old = allowUndef_;
129 scalar old = undefValue_;
138 std::streamsize count
148 return write(
string(value));
176 reinterpret_cast<char const *>(buf),
193 unsigned int ivalue(value);
197 reinterpret_cast<char const *>(&ivalue),
214 const label fieldWidth
219 unsigned int ivalue(value);
223 reinterpret_cast<char const *>(&ivalue),
245 reinterpret_cast<char const *>(&fvalue),
279 write(
string(key +
" undef"));
Ostream & writeUndef()
Write undef value.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
virtual int precision() const
Get precision of output field.
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
OFstream(const fileName &filePath, streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED, const bool append=false)
Construct from filePath.
static scalar undefValue(const scalar)
Assign the value to represent undef in the results.
static string subDir(const label)
Consistent zero-padded numbers for subdirectories.
virtual ostream & stdStream()
Access to underlying std::ostream.
virtual Ostream & writeKeyword(const string &key)
Write element keyword with trailing newline, optionally with undef.
~ensightFile()
Destructor.
static const floatScalar floatScalarVGreat
streamFormat
Enumeration for the format of data in the stream.
static string mask()
The '*' mask appropriate for subDir.
streamFormat format() const
Return current stream format.
virtual Ostream & write(const char *buf, std::streamsize count)
Binary write.
graph_traits< Graph >::vertices_size_type size_type
static bool allowUndef()
Return setting for whether 'undef' values are allowed in results.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Ostream & writeBinaryHeader()
Write "C Binary" for binary files (eg, geometry/measured)
void newline()
Add carriage return to ascii stream.
A class for handling character strings derived from std::string.
static label subDirWidth()
Return current width of subDir and mask.
IOstream & scientific(IOstream &io)
ensightFile(const fileName &filePath, IOstream::streamFormat format=IOstream::BINARY)
Construct from filePath.