59 return this->
toString(buffer, bufSize) == r;
90 return convert(*converter_, value_);
100 return converter_->convert(str, value_);
111 return converter_->convert(
value, value_);
122 return converter_->convert(
value, value_);
133 return converter_->convert(
value, value_);
144 return converter_->convert(
value, value_);
155 return converter_->convert(
value, value_);
166 return converter_->convert(
value, value_);
177 return converter_->convert(
value, value_);
188 return converter_->convert(
value, value_);
199 return converter_->convert(
value, value_);
210 return converter_->convert(
value, value_);
221 return converter_->convert(
value, value_);
232 return converter_->convert(
value, value_);
239 template<
class Enumeration>
242 typename Enumeration::Base integral;
246 if (converter_->convert(integral,value_))
248 value =
static_cast<typename Enumeration::Enum
>(integral);
260 template <
class BitSet>
263 typename BitSet::Bits bits;
267 if (converter_->convert(bits, value_))
269 value = BitSet(bits);
292 converter_->toStr(str, value_);
301 return converter_->toStr(buf, size, value_);
308 , converter_(&converter)
329inline bool operator == (
const Field& ref,
const std::string& str)
331 return ref ==
StrRef(str);
334inline bool operator != (
const Field& ref,
const std::string& str)
336 return ref !=
StrRef(str);
339inline bool operator == (
const std::string& str,
const Field & ref)
341 return ref ==
StrRef(str);
344inline bool operator != (
const std::string& str,
const Field& ref)
346 return ref !=
StrRef(str);
349inline bool operator == (
const Field& ref,
const char* str)
351 return ref ==
StrRef(str);
354inline bool operator != (
const Field& ref,
const char* str)
356 return ref !=
StrRef(str);
359inline bool operator == (
const char* str,
const Field& ref)
361 return ref ==
StrRef(str);
364inline bool operator != (
const char* str,
const Field& ref)
366 return ref !=
StrRef(str);
#define ONIXS_ILINK3_LTWT_CLASS
#define ONIXS_ILINK3_MESSAGING_TAGBASED_NAMESPACE_END
#define ONIXS_ILINK3_MESSAGING_TAGBASED_NAMESPACE_BEGIN
#define ONIXS_ILINK3_EXPLICIT
#define ONIXS_ILINK3_NODISCARD
#define ONIXS_ILINK3_CONST_OR_CONSTEXPR
#define ONIXS_ILINK3_NOTHROW
A field in a tag-based message.
std::string toString() const
bool toNumber(Int8 &value) const
Tries to cast the stored value into a value of the Int8 type.
bool toStringRef(StrRef &str) const
Tries to cast the stored value into a value of the StrRef type.
bool operator==(const StrRef &r) const
Compares the presentation for equality with the given text reference.
bool toNumber(Decimal &value) const
Tries to cast the stored value into a value of the Decimal type.
Field()
Initializes a field with no value.
bool toNumber(UInt8 &value) const
Tries to cast the stored value into a value of the UInt8 type.
bool toNumber(Int64 &value) const
Tries to cast the stored value into a value of the Int64 type.
bool toNumber(UInt32 &value) const
Tries to cast the stored value into a value of the UInt32 type.
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
Tries to cast the stored value into a value of the Timestamp type.
bool toBitSet(BitSet &value) const
Tries to cast the stored value into a value of the type representing a BitSet.
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
Tries to cast the stored value into a value of the Int32 type.
bool toNumber(UInt64 &value) const
Tries to cast the stored value into a value of the UInt64 type.
bool toMaturityMonthYear(MaturityMonthYear &value) const
Tries to cast the stored value into a value of the MaturityMonthYear type.
bool toNumber(Int16 &value) const
Tries to cast the stored value into a value of the Int16 type.
bool toEnumeration(typename Enumeration::Enum &value) const
Tries to cast the stored value into a value of the given Enumeration type.
bool toNumber(UInt16 &value) const
Tries to cast the stored value into a value of the UInt16 type.
ValueConversion< Value >::Result cast() const
Casts the stored value to the requested type.
bool toChar(Char &value) const
Tries to cast the stored value into a value of the Char type.
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.
FloatingPointDecimal< Int64, Int32 > Decimal
Universal decimal type.
char Char
Character type alias.
std::basic_string_view< Char > StrRef
void convert(FixedPointDecimal< MantissaType, ExponentType > &res, const Decimal &number)
static const ValueConverter & self() noexcept
Implements value conversion operations through value conversion traits.
Traits::Result Result
Conversion output type.
Abstraction gathering operations over a value of a particular type stored as a field in a message.