39#ifndef Foam_primitives_uint32_H
40#define Foam_primitives_uint32_H
60 return word(std::to_string(val),
false);
69 return word(std::to_string(val),
false);
85inline uint32_t
readUint32(
const std::string& str)
92bool readUint32(
const char* buf, uint32_t& val);
96inline bool readUint32(
const std::string& str, uint32_t& val)
103inline bool read(
const char* buf, uint32_t& val)
110inline bool read(
const std::string& str, uint32_t& val)
116Istream&
operator>>(Istream& is, uint32_t& val);
147 static constexpr direction nComponents = 1;
152 static constexpr uint32_t
min_ = 0;
153 static constexpr uint32_t
max_ = UINT32_MAX;
160 static const uint32_t
zero;
161 static const uint32_t
one;
162 static const uint32_t
min;
163 static const uint32_t
max;
180 operator uint32_t() const
noexcept {
return p_; }
183 operator uint32_t&()
noexcept {
return p_; }
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static const char *const typeName
uint32_t cmptType
Component type.
static const char *const componentNames[]
pTraits(uint32_t val) noexcept
Copy construct from primitive.
static const uint32_t one
static const uint32_t max
static const uint32_t zero
static constexpr direction nComponents
Number of components in uint32_t is 1.
static constexpr direction rank
Rank of uint32_t is 0.
static constexpr direction dim
Dimensionality of space.
static constexpr uint32_t max_
static const uint32_t rootMin
static constexpr uint32_t min_
static const uint32_t rootMax
static const uint32_t min
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.
uint32_t readUint32(Istream &is)
Read uint32_t from stream.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
word operator()(const uint32_t val) const
Extract name (as a word) from an object, typically using its name() method.