56 constexpr size_t bufSize = 512;
59 return this->
toString(buffer, bufSize) == r;
78 template <
class Value>
85 return convert(*converter_, value_);
95 return converter_->convert(str, value_);
106 return converter_->convert(
value, value_);
117 return converter_->convert(
value, value_);
128 return converter_->convert(
value, value_);
139 return converter_->convert(
value, value_);
150 return converter_->convert(
value, value_);
161 return converter_->convert(
value, value_);
172 return converter_->convert(
value, value_);
183 return converter_->convert(
value, value_);
194 return converter_->convert(
value, value_);
205 return converter_->convert(
value, value_);
216 return converter_->convert(
value, value_);
227 return converter_->convert(
value, value_);
234 template <
class Enumeration>
237 typename Enumeration::Base integral;
241 if (converter_->convert(integral, value_))
243 value =
static_cast<typename Enumeration::Enum
>(integral);
255 template <
class BitSet>
258 typename BitSet::Bits bits;
262 if (converter_->convert(bits, value_))
264 value = BitSet(bits);
287 converter_->toStr(str, value_);
296 return converter_->toStr(buf, size, value_);
303 , converter_(&converter)
326 return ref ==
StrRef(str);
331 return ref !=
StrRef(str);
336 return ref ==
StrRef(str);
341 return ref !=
StrRef(str);
346 return ref ==
StrRef(str);
351 return ref !=
StrRef(str);
356 return ref ==
StrRef(str);
361 return ref !=
StrRef(str);
#define ONIXS_CMEMDH_MESSAGING_TAGBASED_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_MESSAGING_TAGBASED_NAMESPACE_END
#define ONIXS_CMEMDH_NODISCARD
A field in a tag-based message.
std::string toString() const
bool toNumber(Int8 &value) const
bool toStringRef(StrRef &str) const
bool operator==(const StrRef &r) const
bool toNumber(Decimal &value) const
Field()
Initializes a field with no value.
bool toNumber(UInt8 &value) const
bool toNumber(Int64 &value) const
bool toNumber(UInt32 &value) const
void toString(std::string &str) const
Outputs the text representation into the given string.
Field(const ValueConverter &converter) noexcept
Initializes the field.
bool toTimestamp(Timestamp &value) const
bool toBitSet(BitSet &value) const
const ValueContainer & value() const noexcept
Exposes the value storage for further value manipulations.
ValueContainer & value() noexcept
Exposes the value storage for further value manipulations.
bool toNumber(Int32 &value) const
bool toNumber(UInt64 &value) const
bool toMaturityMonthYear(MaturityMonthYear &value) const
bool toNumber(Int16 &value) const
bool operator!=(const StrRef &r) const
Compares the presentation for not equality with given text reference.
bool toEnumeration(typename Enumeration::Enum &value) const
bool toNumber(UInt16 &value) const
ValueConversion< Value >::Result cast() const
bool toChar(Char &value) const
StrRef toString(Char *buf, size_t size) const
The time point without the time-zone information.
std::ostream & operator<<(std::ostream &stream, const Field &field)
Serializes into the given stream.
bool operator==(const Field &ref, const std::string &str)
bool operator!=(const Field &ref, const std::string &str)
std::uint32_t UInt32
uInt32.
char Char
Character type alias.
std::uint16_t UInt16
uInt16.
std::basic_string_view< Char > StrRef
FloatingPointDecimal< DecimalMantissa, DecimalExponent > Decimal
Universal decimal type.
void convert(FixedPointDecimal< MantissaType, ExponentType > &res, const Decimal &number)
std::uint64_t UInt64
uInt64.
static const ValueConverter & self() noexcept
Traits::Result Result
Conversion output type.