Go to the documentation of this file.
41 { fieldFormat::SHORT,
"short" },
42 { fieldFormat::LONG,
"long" },
43 { fieldFormat::FREE,
"free" },
53 { loadFormat::PLOAD2,
"PLOAD2" },
54 { loadFormat::PLOAD4,
"PLOAD4" },
62 const auto signPos = str.find_last_of(
"+-");
66 signPos == std::string::npos
68 || str[signPos-1] ==
'E' || str[signPos-1] ==
'e'
73 return readScalar(str);
85 readScalar(str.substr(0, signPos), value)
86 &&
readInt(str.substr(signPos), exponent)
91 value *=
::pow(10, exponent);
108 const std::string& str,
113 const auto beg =
pos;
114 const auto end = str.find(
',',
pos);
116 if (
end == std::string::npos)
126 return str.substr(beg, len);
139 os.
setf(ios_base::uppercase);
141 const label offset = 7;
143 label prec = 16 - offset;
146 case fieldFormat::SHORT :
152 case fieldFormat::LONG :
153 case fieldFormat::FREE :
171 os.
setf(ios_base::left);
175 case fieldFormat::SHORT :
177 os <<
setw(8) << keyword;
181 case fieldFormat::LONG :
183 os <<
setw(8) <<
word(keyword +
'*');
187 case fieldFormat::FREE :
194 os.
unsetf(ios_base::left);
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A class for handling words, derived from Foam::string.
virtual int precision() const =0
Get precision of output field.
word format(conversionProperties.get< word >("format"))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Istream and Ostream manipulators taking arguments.
graph_traits< Graph >::vertices_size_type size_type
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const Foam::Enum< errorType > errorNames
Strings corresponding to the errorType.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
Omanip< int > setw(const int i)
IOstream & scientific(IOstream &io)
errorManipArg< error, int > exit(error &err, const int errNo=1)
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
void unsetf(const ios_base::fmtflags f)
Unset flags of stream.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
int readInt(Istream &is)
Read int from stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool isspace(char c)
Test for horizontal whitespace.
dimensionedScalar pos(const dimensionedScalar &ds)