43 maxLen = this->size();
46 const label len =
Foam::min(this->size(), maxLen);
50 <<
indent << token::BEGIN_LIST <<
nl;
53 const auto* iter = this->cdata();
56 for (label i = 0; i < len; ++i)
60 for (label i = len; i < maxLen; ++i)
66 os <<
indent << token::END_LIST <<
nl;
80 const label len = this->size();
83 const label netLen = (trimNull ? this->count_nonnull() : len);
89 << token::BEGIN_LIST << token::END_LIST <<
nl;
98 for (label i=0; i < len; ++i)
100 const T* ptr = (*this)[i];
108 <<
"cannot dereference nullptr at index " << i
109 <<
" in range [0," << len <<
")" Ostream & indent(Ostream &os)
Indent stream.
Ostream & write(Ostream &os, const bool trimNull=false) const
Write output, optionally silently trimming nullptrs.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & printAddresses(Ostream &os, label maxLen=-1) const
Write pointer values to Ostream (debugging only).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & incrIndent(Ostream &os)
Increment the indent level.