Loading...
Searching...
No Matches
ITstream.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2015,2024 OpenFOAM Foundation
9 Copyright (C) 2017-2025 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "error.H"
30#include "ITstream.H"
31#include "SpanStream.H"
32#include <algorithm>
33#include <memory>
34
35// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
36
37namespace Foam
38{
39
40// Convert input sequence into a list of tokens.
41// Return the number of tokens in the resulting list.
42static label parseStream(ISstream& is, tokenList& tokens)
43{
44 tokens.clear();
45
46 label count = 0;
47 token tok;
48 while (!is.read(tok).bad() && tok.good())
49 {
50 if (count >= tokens.size())
51 {
52 // Increase capacity (doubling) with min-size [64]
53 tokens.resize(Foam::max(label(64), label(2*tokens.size())));
54 }
55
56 tokens[count] = std::move(tok);
57 ++count;
58 }
59
60 tokens.resize(count);
61
62 return count;
64
65} // End namespace Foam
66
67
68// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
69
71{
72 static std::unique_ptr<ITstream> singleton;
73
74 if (!singleton)
75 {
76 singleton = std::make_unique<ITstream>(Foam::zero{}, "empty-stream");
77 }
78 else
79 {
80 singleton->ITstream::clear(); // Ensure it really is empty
81 singleton->ITstream::seek(0); // rewind() bypassing virtual
82 }
83
84 // Set stream as bad - indicates it is not a valid stream
85 singleton->setBad();
86
87 return *singleton;
88}
89
90
91Foam::tokenList Foam::ITstream::parse_chars
92(
93 const char* s,
94 size_t nbytes,
95 IOstreamOption streamOpt
96)
97{
98 tokenList tokens;
99 if (s && nbytes > 0) // extra safety
100 {
101 ISpanStream is(s, nbytes, streamOpt);
102 parseStream(is, tokens);
103 }
104 return tokens;
105}
106
107
108// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
109
110void Foam::ITstream::reset(const char* input, size_t nbytes)
111{
112 tokenList tokens;
113 if (input && nbytes > 0) // extra safety
114 {
115 ISpanStream is(input, nbytes, static_cast<IOstreamOption>(*this));
116
117 parseStream(is, static_cast<tokenList&>(*this));
118 ITstream::seek(0); // rewind() bypassing virtual
119 }
120 else
121 {
122 ITstream::seek(0); // rewind() bypassing virtual
124 }
125}
126
127
128// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
129
130void Foam::ITstream::reserveCapacity(const label newCapacity)
131{
132 // Reserve - leave excess capacity for further appends
133
134 label len = tokenList::size();
135
136 if (len < newCapacity)
137 {
138 // Min-size (16) when starting from zero
139 if (!len) len = 8;
140
141 // Increase capacity. Strict doubling
142 do
143 {
144 len *= 2;
145 }
146 while (len < newCapacity);
147
149 }
150}
151
152
153// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
154
155Foam::ITstream::ITstream(const ITstream& is)
156:
157 Istream(static_cast<IOstreamOption>(is)),
158 tokenList(is),
159 name_(is.name_),
160 tokenIndex_(0)
161{
162 setOpened();
163 setGood();
164}
165
166
168:
169 Istream(static_cast<IOstreamOption>(is)),
170 tokenList(std::move(static_cast<tokenList&>(is))),
171 name_(std::move(is.name_)),
172 tokenIndex_(0)
173{
174 setOpened();
175 setGood();
176}
177
178
180(
181 IOstreamOption streamOpt,
182 const string& name
183)
184:
185 Istream(IOstreamOption(streamOpt.format(), streamOpt.version())),
186 tokenList(),
187 name_(name),
188 tokenIndex_(0)
189{
190 setOpened();
191 setGood();
192}
193
194
196(
198 const string& name,
200)
201:
202 ITstream(streamOpt, name)
203{}
204
205
207(
208 const UList<token>& tokens,
209 IOstreamOption streamOpt,
210 const string& name
211)
212:
213 Istream(IOstreamOption(streamOpt.format(), streamOpt.version())),
214 tokenList(tokens),
215 name_(name),
216 tokenIndex_(0)
217{
218 setOpened();
219 setGood();
220}
221
222
224(
225 List<token>&& tokens,
226 IOstreamOption streamOpt,
227 const string& name
228)
229:
230 Istream(IOstreamOption(streamOpt.format(), streamOpt.version())),
231 tokenList(std::move(tokens)),
232 name_(name),
233 tokenIndex_(0)
234{
235 setOpened();
236 setGood();
237}
238
239
241(
242 const UList<char>& input,
243 IOstreamOption streamOpt,
244 const string& name
245)
247 ITstream(streamOpt, name)
248{
249 reset(input.cdata(), input.size_bytes());
250}
251
252
254(
255 const char* input,
256 IOstreamOption streamOpt,
257 const string& name
258)
259:
260 ITstream(streamOpt, name)
261{
262 if (input)
263 {
264 reset(input, strlen(input));
265 }
266}
267
268
269// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
270
271void Foam::ITstream::print(Ostream& os) const
272{
273 os << "ITstream : " << name_.c_str() << ", line ";
274
275 if (tokenList::empty())
276 {
277 os << lineNumber();
278 }
279 else
280 {
281 const tokenList& toks = *this;
282
283 os << toks.front().lineNumber();
284
285 if (toks.front().lineNumber() < toks.back().lineNumber())
286 {
287 os << '-' << toks.back().lineNumber();
288 }
290 os << ", ";
291
293}
294
295
296std::string Foam::ITstream::toString() const
297{
298 if (tokenList::empty())
299 {
300 return std::string();
301 }
302 else if (tokenList::size() == 1 && tokenList::front().isStringType())
303 {
304 // Already a string-type (WORD, STRING, ...). Just copy.
305 return tokenList::front().stringToken();
306 }
307
308 // Stringify
309 OCharStream buf;
310 buf.precision(16); // Some reasonably high precision
311
312 auto iter = tokenList::cbegin();
313 const auto last = tokenList::cend();
314
315 // Note: could also just use the buffer token-wise
316
317 // Contents - space separated
318 if (iter != last)
319 {
320 buf << *iter;
321
322 for (++iter; (iter != last); (void)++iter)
323 {
324 buf << token::SPACE << *iter;
325 }
326 }
328 const auto view = buf.view();
329
330 return std::string(view.data(), view.size());
331}
332
333
335{
336 // Use putback token if it exists
338 {
340 }
341
342 return peekNoFail(tokenIndex_);
343}
344
345
347{
348 if (tokenIndex_ < 0 || tokenIndex_ >= tokenList::size())
349 {
351 << "Token index " << tokenIndex_ << " out of range [0,"
352 << tokenList::size() << "]\n"
354 }
355
356 return tokenList::operator[](tokenIndex_);
357}
358
359
360void Foam::ITstream::seek(label pos) noexcept
361{
362 lineNumber_ = 0;
363
365 {
366 // Seek end (-1) or seek is out of range
367 tokenIndex_ = tokenList::size();
368
369 if (!tokenList::empty())
370 {
371 // The closest reference lineNumber
372 lineNumber_ = tokenList::cdata()[tokenIndex_-1].lineNumber();
373 }
374
375 setEof();
376 }
377 else
378 {
379 tokenIndex_ = pos;
380
381 if (tokenIndex_ < tokenList::size())
382 {
383 lineNumber_ = tokenList::cdata()[tokenIndex_].lineNumber();
384 }
386 setOpened();
387 setGood();
388 }
389}
390
391
392bool Foam::ITstream::skip(label n) noexcept
393{
394 if (!n)
395 {
396 // No movement - just check the current range
397 return (tokenIndex_ >= 0 && tokenIndex_ < tokenList::size());
398 }
399
400 tokenIndex_ += n; // Move forward (+ve) or backwards (-ve)
401
402 bool noError = true;
403
404 if (tokenIndex_ < 0)
405 {
406 // Underflow range
407 noError = false;
408 tokenIndex_ = 0;
409 }
410 else if (tokenIndex_ >= tokenList::size())
411 {
412 // Overflow range
413 noError = false;
414 tokenIndex_ = tokenList::size();
415
416 if (!tokenList::empty())
417 {
418 // The closest reference lineNumber
419 lineNumber_ = tokenList::cdata()[tokenIndex_-1].lineNumber();
420 }
421 }
422
423 // Update stream information
424 if (tokenIndex_ < tokenList::size())
425 {
426 lineNumber_ = tokenList::cdata()[tokenIndex_].lineNumber();
427 setOpened();
428 setGood();
429 }
430 else
431 {
433 }
434
435 return noError;
436}
437
438
440{
441 // Use putback token if it exists
442 if (Istream::getBack(tok))
443 {
444 lineNumber_ = tok.lineNumber();
445 return *this;
446 }
447
448 tokenList& toks = *this;
449 const label nToks = toks.size();
450
451 if (tokenIndex_ < nToks)
452 {
453 tok = toks[tokenIndex_++];
454 lineNumber_ = tok.lineNumber();
455
456 if (tokenIndex_ == nToks)
457 {
458 setEof();
459 }
460 }
461 else
462 {
463 if (eof())
464 {
466 << "attempt to read beyond EOF"
467 << exit(FatalIOError);
468 setBad();
469 }
470 else
471 {
472 setEof();
473 }
474
475 tok.reset();
476
477 if (nToks)
478 {
479 tok.lineNumber(toks.back().lineNumber());
480 }
481 else
482 {
483 tok.lineNumber(this->lineNumber());
485 }
486
487 return *this;
488}
489
490
491Foam::labelRange Foam::ITstream::find
492(
493 const token::punctuationToken delimOpen,
494 const token::punctuationToken delimClose,
495 label pos
496) const
497{
498 if (pos < 0)
499 {
500 pos = tokenIndex_;
501 }
502
503 labelRange slice;
504
505 for (label depth = 0; pos < tokenList::size(); ++pos)
506 {
507 const token& tok = tokenList::operator[](pos);
508
509 if (tok.isPunctuation())
510 {
511 if (tok.isPunctuation(delimOpen))
512 {
513 if (!depth)
514 {
515 // Initial open delimiter
516 slice.start() = pos;
517 }
518
519 ++depth;
520 }
521 else if (tok.isPunctuation(delimClose))
522 {
523 --depth;
524
525 if (depth < 0)
526 {
527 // A closing delimiter without an open!
528 // Raise error?
529 break;
530 }
531 if (!depth)
532 {
533 // The end - include delimiter into the count
534 slice.size() = (pos - slice.start()) + 1;
535 break;
536 }
537 }
539 }
540
541 return slice;
542}
543
544
545Foam::ITstream Foam::ITstream::extract(const labelRange& range)
546{
547 ITstream result
548 (
549 static_cast<IOstreamOption>(*this),
550 this->name()
551 );
552 result.setLabelByteSize(this->labelByteSize());
553 result.setScalarByteSize(this->scalarByteSize());
554
555 // Validate the slice range of list
556 const labelRange slice(range.subset0(tokenList::size()));
557
558 if (!slice.good())
559 {
560 // No-op
561 return result;
562 }
563
564 auto first = tokenList::begin(slice.begin_value());
565 auto last = tokenList::begin(slice.end_value());
566
567 result.resize(label(last - first));
568
569 // Move tokens into result list
570 std::move(first, last, result.begin());
571 result.seek(0); // rewind() bypassing virtual
574 (void) remove(slice); // Adjust the original list
575
576 return result;
578
579
580Foam::label Foam::ITstream::remove(const labelRange& range)
581{
582 // Validate the slice range of list
584
585 if (!slice.good())
586 {
587 // No-op
588 return 0;
589 }
590
591 if (slice.end_value() >= tokenList::size())
592 {
593 // Remove entire tail
594 tokenList::resize(slice.begin_value());
595 }
596 else
597 {
598 // Attempt to adjust the current token index to something sensible...
599 if (slice.contains(tokenIndex_))
600 {
601 // Within the removed slice - reposition tokenIndex before it
602 seek(slice.begin_value());
603 skip(-1);
604 }
605 else if (tokenIndex_ >= slice.end_value())
606 {
607 // After the removed slice - reposition tokenIndex relatively
608 skip(-slice.size());
609 }
610
611 // Move tokens down in the list
612 std::move
614 tokenList::begin(slice.end_value()),
616 tokenList::begin(slice.begin_value())
617 );
619 // Truncate
621 }
622
623 if (tokenIndex_ >= tokenList::size())
624 {
625 tokenIndex_ = tokenList::size();
626 setEof();
627 }
628 else if (tokenIndex_ >= 0 && tokenIndex_ < tokenList::size())
629 {
630 lineNumber_ = tokenList::operator[](tokenIndex_).lineNumber();
631 }
633 return slice.size();
634}
635
636
637// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
638
640{
642 return *this;
643}
644
645
647{
649 return *this;
650}
651
652
654{
656 return *this;
657}
658
659
661{
663 return *this;
664}
665
666
668{
670 return *this;
671}
672
673
675{
677 return *this;
678}
679
680
682{
684 return *this;
685}
686
687
689{
691 return *this;
692}
693
694
696{
698 return *this;
699}
700
701
703{
705 return *this;
706}
707
708
709Foam::Istream& Foam::ITstream::read(char*, std::streamsize)
710{
712 return *this;
713}
714
715
716void Foam::ITstream::add_tokens(const token& tok)
717{
718 reserveCapacity(tokenIndex_ + 1);
719
720 tokenList::operator[](tokenIndex_) = tok;
721 ++tokenIndex_;
722}
723
724
726{
727 reserveCapacity(tokenIndex_ + 1);
728
729 tokenList::operator[](tokenIndex_) = std::move(tok);
730 ++tokenIndex_;
731}
732
733
735{
736 const label len = toks.size();
737 reserveCapacity(tokenIndex_ + len);
738
739 std::copy_n(toks.begin(), len, tokenList::begin(tokenIndex_));
740 tokenIndex_ += len;
741}
742
743
745{
746 const label len = toks.size();
747 reserveCapacity(tokenIndex_ + len);
748
749 std::move(toks.begin(), toks.end(), tokenList::begin(tokenIndex_));
750 tokenIndex_ += len;
751 toks.clear();
752}
753
754
755// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
756
758{
759 // Self-assignment is a no-op
760 if (this != &is)
761 {
762 Istream::operator=(is);
764 name_ = is.name_;
765 ITstream::seek(0); // rewind() bypassing virtual
766 }
767}
768
769
771{
773 ITstream::seek(0); // rewind() bypassing virtual
774}
775
776
778{
779 tokenList::operator=(std::move(toks));
780 ITstream::seek(0); // rewind() bypassing virtual
781}
782
783
784// ************************************************************************* //
scalar range
Input/output streams with (internal or external) character storage.
label n
A simple container for options an IOstream can normally have.
versionNumber version() const noexcept
Get the stream version.
streamFormat format() const noexcept
Get the current stream format.
void setBad() noexcept
Set stream state to be 'bad'.
Definition IOstream.H:488
label lineNumber() const noexcept
Const access to the current stream line number.
Definition IOstream.H:409
unsigned scalarByteSize() const noexcept
The sizeof (scalar) in bytes associated with the stream.
Definition IOstream.H:340
bool bad() const noexcept
True if stream is corrupted.
Definition IOstream.H:305
virtual void print(Ostream &os) const
Print stream description to Ostream.
Definition IOstream.C:87
label lineNumber_
The file line.
Definition IOstream.H:140
void setEof() noexcept
Set stream state as reached 'eof'.
Definition IOstream.H:472
void setLabelByteSize(unsigned nbytes) noexcept
Set the sizeof (label) in bytes associated with the stream.
Definition IOstream.H:348
bool eof() const noexcept
True if end of input seen.
Definition IOstream.H:289
void setScalarByteSize(unsigned nbytes) noexcept
Set the sizeof (scalar) in bytes associated with the stream.
Definition IOstream.H:356
unsigned labelByteSize() const noexcept
The sizeof (label) in bytes associated with the stream.
Definition IOstream.H:332
void setGood() noexcept
Set stream state to be good.
Definition IOstream.H:174
void setOpened() noexcept
Set stream opened.
Definition IOstream.H:150
Similar to IStringStream but using an externally managed buffer for its input. This allows the input ...
Generic input stream using a standard (STL) stream.
Definition ISstream.H:54
virtual Istream & read(token &t) override
Return next token from stream.
Definition ISstream.C:535
An input stream of tokens.
Definition ITstream.H:56
virtual const fileName & name() const override
The name of the input token stream.
Definition ITstream.H:317
std::string toString() const
Concatenate tokens into a space-separated std::string. The resulting string may contain quote charact...
Definition ITstream.C:289
label remove(const labelRange &range)
Remove a (start,size) subset from the list and move remaining elements down.
Definition ITstream.C:573
virtual Istream & read(token &tok) override
Return next token from stream.
Definition ITstream.C:432
static ITstream & empty_stream()
Return reference to an empty ITstream, for functions needing to return an ITstream reference but whic...
Definition ITstream.C:63
void print(Ostream &os) const override
Print stream description to Ostream.
Definition ITstream.C:264
void add_tokens(const token &tok)
Copy append a token at the current tokenIndex, incrementing the index.
Definition ITstream.C:709
void seek(label pos) noexcept
Move tokenIndex to the specified position and adjust the stream status (open/good/eof ....
Definition ITstream.C:353
bool skip(label n=1) noexcept
Move tokenIndex relative to the current position.
Definition ITstream.C:385
const tokenList & tokens() const noexcept
The token contents (read-only access).
Definition ITstream.H:346
const token & peek() const noexcept
Failsafe peek at what the next read would return, including handling of any putback.
Definition ITstream.C:327
labelRange find(const token::punctuationToken delimOpen, const token::punctuationToken delimClose, label pos=0) const
Find range containing matching delimiter pair, starting at the specified position....
Definition ITstream.C:485
ITstream(const ITstream &is)
Copy construct.
Definition ITstream.C:148
ITstream extract(const labelRange &range)
Remove a (start,size) subset from the list and move remaining elements down.
Definition ITstream.C:538
virtual Istream & readRaw(char *data, std::streamsize count) override
Low-level raw binary read : triggers not implemented error.
Definition ITstream.C:695
const token & currentToken() const noexcept
Read access to the token at the current tokenIndex.
Definition ITstream.H:391
void operator=(const ITstream &is)
Copy assignment, with rewind().
Definition ITstream.C:750
IntType size() const noexcept
The size of the range.
Definition IntRange.H:208
bool contains(IntType value) const noexcept
True if the (global) value is within the range.
Definition IntRangeI.H:143
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
bool getBack(token &tok)
Retrieve the put-back token if there is one.
Definition Istream.C:115
const token & peekBack() const noexcept
Examine putback token without removing it.
Definition Istream.C:42
bool hasPutback() const noexcept
True if putback token is in use.
Definition Istream.H:81
Istream(const Istream &)=default
Copy construct.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
void operator=(const UList< token > &list)
void resize(const label len)
Adjust allocated size of list.
Definition ListI.H:153
void clear()
Clear the list, i.e. set size to zero.
Definition ListI.H:133
An OSstream with internal List storage.
auto view() const
A string_view of buffer contents.
virtual int precision() const override
Get precision of output field.
Definition OSstream.C:343
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition UList.H:89
T & first()
Access first element of the list, position [0].
Definition UList.H:957
iterator begin() noexcept
Return an iterator to begin traversing the UList.
Definition UListI.H:410
bool empty() const noexcept
True if List is empty (ie, size() is zero).
Definition UList.H:701
T & back()
Access last element of the list, position [size()-1].
Definition UListI.H:253
iterator end() noexcept
Return an iterator to end traversing the UList.
Definition UListI.H:454
const_iterator cend() const noexcept
Return const_iterator to end traversing the constant UList.
Definition UListI.H:468
std::string_view view() const
Return a string_view of the charList. Content is non-modifiable.
Definition UList.H:903
const T * cdata() const noexcept
Return pointer to the underlying array serving as data storage.
Definition UListI.H:267
const_iterator cbegin() const noexcept
Return const_iterator to begin traversing the constant UList.
Definition UListI.H:424
SubList< T > slice(const label pos, label len=-1)
Return SubList slice (non-const access) - no range checking.
Definition SubList.H:258
T & front()
Access first element of the list, position [0].
Definition UListI.H:239
label size() const noexcept
The number of elements in the container.
Definition UList.H:706
void size(const label n)
Older name for setAddressableSize.
Definition UList.H:118
std::streamsize size_bytes() const noexcept
Number of contiguous bytes for the List data.
Definition UListI.H:295
T & operator[](const label i)
Return element of UList.
Definition UListI.H:363
T & last()
Access last element of the list, position [size()-1].
Definition UList.H:971
A range or interval of labels defined by a start and a size.
Definition labelRange.H:66
A token holds an item read from Istream.
Definition token.H:70
label lineNumber() const noexcept
The line number for the token.
Definition tokenI.H:570
bool isPunctuation() const noexcept
Token is PUNCTUATION.
Definition tokenI.H:650
punctuationToken
Standard punctuation tokens (a character).
Definition token.H:140
@ SPACE
Space [isspace].
Definition token.H:144
bool good() const noexcept
True if token is not UNDEFINED or ERROR.
Definition tokenI.H:584
void reset()
Reset token to UNDEFINED and clear any allocated storage.
Definition tokenI.H:412
A class for handling words, derived from Foam::string.
Definition word.H:66
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition zero.H:58
limits reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL))
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition error.H:688
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition error.H:629
OBJstream os(runTime.globalPath()/outputName)
auto & name
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
unsigned scalarByteSize(const std::string &str)
Extract scalar size (in bytes) from "scalar=" tag in string.
unsigned labelByteSize(const std::string &str)
Extract label size (in bytes) from "label=" tag in string.
Namespace for OpenFOAM.
dimensionedScalar pos(const dimensionedScalar &ds)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition hashSets.C:40
static label parseStream(ISstream &is, tokenList &tokens)
Definition ITstream.C:35
errorManip< error > abort(error &err)
Definition errorManip.H:139
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
const direction noexcept
Definition scalarImpl.H:265
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
List< token > tokenList
List of token, used for dictionary primitive entry (for example).
Definition tokenList.H:32
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition errorManip.H:125
word format(conversionProperties.get< word >("format"))