39#ifndef Foam_primitives_int32_H
40#define Foam_primitives_int32_H
60 return word(std::to_string(val),
false);
70 return word(std::to_string(val),
false);
75inline int32_t
mag(
const int32_t val)
92inline int32_t
readInt32(
const std::string& str)
99bool readInt32(
const char* buf, int32_t& val);
103inline bool readInt32(
const std::string& str, int32_t& val)
110inline bool read(
const char* buf, int32_t& val)
117inline bool read(
const std::string& str, int32_t& val)
123Istream&
operator>>(Istream& is, int32_t& val);
130#if (__SIZEOF_LONG__ == 4)
171 static constexpr int32_t
min_ = INT32_MIN;
172 static constexpr int32_t
max_ = INT32_MAX;
179 static const int32_t
zero;
181 static const int32_t
min;
182 static const int32_t
max;
199 operator int32_t() const
noexcept {
return p_; }
202 operator int32_t&()
noexcept {
return p_; }
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static const char *const typeName
static const char *const componentNames[]
int32_t cmptType
Component type.
int32_t magType
Magnitude type.
static const int32_t rootMax
static constexpr int32_t max_
static constexpr direction nComponents
Number of components in int32_t is 1.
static constexpr direction rank
Rank of int32_t is 0.
static constexpr direction dim
Dimensionality of space.
static const int32_t rootMin
static constexpr int32_t min_
pTraits(int32_t val) noexcept
Copy construct from primitive.
static const int32_t zero
A traits class, which is primarily used for primitives and vector-space.
pTraits(const Base &obj)
Copy construct from base class.
A class for handling words, derived from Foam::string.
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
OBJstream os(runTime.globalPath()/outputName)
bool read(const char *buf, int32_t &val)
Same as readInt32.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Istream & operator>>(Istream &, directionInfo &)
int32_t readInt32(Istream &is)
Read int32_t from stream.
word operator()(const int32_t val) const
Extract name (as a word) from an object, typically using its name() method.