35 template<
class LListBase,
class T>
44 const label len = this->size();
48 (len <= 1 || !shortLen)
53 os << len << token::BEGIN_LIST;
57 for (
const T& val : *
this)
59 if (space)
os << token::SPACE;
65 os << token::END_LIST;
70 os <<
nl << len <<
nl << token::BEGIN_LIST <<
nl;
73 for (
const T& val : *
this)
79 os << token::END_LIST;
88 template<
class LListBase,
class T>
89 Foam::Ostream& Foam::operator<<(Ostream& os, const UILList<LListBase, T>& lst)
91 return lst.writeList(
os, -1);
constexpr char nl
The newline '\n' character (0x0a)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write UILList with line-breaks when length exceeds shortLen.