Go to the documentation of this file.
36 template<
class T,
unsigned N>
40 if (token::compound::isCompound(tag))
42 os << tag << token::SPACE;
50 template<
class T,
unsigned N>
59 template<
class T,
unsigned N>
68 os.writeKeyword(keyword);
71 os << token::END_STATEMENT <<
endl;
75 template<
class T,
unsigned N>
100 (
N <=
unsigned(shortLen))
103 is_contiguous<T>::value
104 || Detail::ListPolicy::no_linebreak<T>::value
112 os << token::BEGIN_LIST;
115 for (
unsigned i=0; i<
N; ++i)
117 if (i)
os << token::SPACE;
122 os << token::END_LIST;
129 os <<
nl << token::BEGIN_LIST <<
nl;
132 for (
unsigned i=0; i<
N; ++i)
138 os << token::END_LIST <<
nl;
146 template<
class T,
unsigned N>
160 Detail::readContiguous<T>
169 "FixedList<T, N>::readList(Istream&) : "
170 "reading the binary block"
179 "FixedList<T, N>::readList(Istream&) : "
180 "reading first token"
183 if (tok.isCompound())
186 list = dynamicCast<token::Compound<List<T>>>
188 tok.transferCompoundToken(is)
191 else if (tok.isLabel())
193 const label len = tok.labelToken();
198 else if (!tok.isPunctuation())
201 <<
"incorrect first token, expected <label> "
202 "or '(' or '{', found "
215 if (delimiter == token::BEGIN_LIST)
217 for (
unsigned i=0; i<
N; ++i)
223 "FixedList<T, N>::readList(Istream&) : "
237 "FixedList<T, N>::readList(Istream&) : "
238 "reading the single entry"
241 for (
unsigned i=0; i<
N; ++i)
Istream & readList(Istream &is)
bool isLabel() const noexcept
A class for handling words, derived from Foam::string.
void writeEntry(Ostream &os) const
char readBeginList(const char *funcName)
const char * cdata_bytes() const noexcept
bool fatalCheck(const char *operation) const
streamFormat format() const noexcept
char readEndList(const char *funcName)
static std::streamsize size_bytes() noexcept
Ostream & endl(Ostream &os)
A token holds an item read from Istream.
InfoProxy< token > info() const
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool isPunctuation() const noexcept
OBJstream os(runTime.globalPath()/outputName)
compound & transferCompoundToken()
errorManipArg< error, int > exit(error &err, const int errNo=1)
char * data_bytes() noexcept
Ostream & writeList(Ostream &os, const label shortLen=0) const
A traits class, which is primarily used for primitives.
void putBack(const token &tok)
A 1D vector of objects of type <T> with a fixed length <N>.
bool isCompound() const noexcept
#define FatalIOErrorInFunction(ios)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const Vector< label > N(dict.get< Vector< label >>("N"))
void checkSize(const label size) const
A template class to specify that a data type can be considered as being contiguous in memory.