41 , converter_(&converter)
67 : value_(other.value_)
68 , converter_(other.converter_)
87 template <
class Value>
92 return convert(*converter_, value_);
100 return converter_->convert(str, value_);
108 return converter_->convert(
value, value_);
116 return converter_->convert(
value, value_);
124 return converter_->convert(
value, value_);
132 return converter_->convert(
value, value_);
140 return converter_->convert(
value, value_);
148 return converter_->convert(
value, value_);
156 return converter_->convert(
value, value_);
164 return converter_->convert(
value, value_);
172 return converter_->convert(
value, value_);
180 return converter_->convert(
value, value_);
188 return converter_->convert(
value, value_);
194 template <
class Enumeration>
197 typename Enumeration::Base integral;
199 if (converter_->convert(integral, value_))
201 value =
static_cast<typename Enumeration::Enum
>(integral);
212 template <
class BitSet>
215 typename BitSet::Bits bits;
217 if (converter_->convert(bits, value_))
219 value = BitSet(bits);
240 converter_->toStr(str, value_);
246 value_ = other.value_;
247 converter_ = other.converter_;
#define ONIXS_CMEMDHFIX_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_LTWT
#define ONIXS_CMEMDHFIX_NAMESPACE_END
#define ONIXS_CMEMDH_NULLPTR
const ValueContainer & value() const
Exposes value storage for further value manipulations.
bool tryCast(Int16 &value) const
Tries to cast the stored value into a value of the Int16 type.
bool tryCast(Int8 &value) const
Tries to cast the stored value into a value of the Int8 type.
bool tryCast(MaturityMonthYear &value) const
Tries to cast the stored value into a value of the MaturityMonthYear type.
Field()
Initializes the field with no value.
Field(const Field &other)
Initializes as the copy of the other field.
bool tryCast(UInt64 &value) const
Tries to cast the stored value into a value of the UInt64 type.
Field & operator=(const Field &other)
Re-initializes the field as a copy of the other one.
bool tryCast(Char &value) const
Tries to cast the stored value into a value of the Char type.
std::string toStr() const
Returns the text representation.
bool tryCast(StrRef &str) const
Tries to cast the stored value into a value of the StrRef type.
bool tryCast(UInt8 &value) const
Tries to cast the stored value into a value of the UInt8 type.
bool tryCast(Timestamp &value) const
Tries to cast the stored value into a value of the Timestamp type.
ValueContainer & value()
Exposes value storage for further value manipulations.
bool tryCast(UInt16 &value) const
Tries to cast the stored value into a value of the UInt16 type.
bool tryCast(BitSet &value, typename BitSet::Bits *=nullptr) const
Tries to cast the stored value into a value of the type representing a BitSet.
bool tryCast(UInt32 &value) const
Tries to cast the stored value into a value of the UInt32 type.
bool tryCast(Int64 &value) const
Tries to cast the stored value into a value of the Int64 type.
bool tryCast(typename Enumeration::Enum &value) const
Tries to cast the stored value into a value of the given Enumeration type.
void toStr(std::string &str) const
Outputs the text representation into the given string.
ValueConversion< Value >::Result cast() const
Casts the stored value to the requested type.
bool tryCast(Int32 &value) const
Tries to cast the stored value into a value of the Int32 type.
Field(const ValueConverter &converter)
Initializes the field.
Container for a value of any supported kinds.
Provides efficient way of accessing text-based values without copying content of the text being refer...
Represents time point without time-zone information.
char Char
Character type alias.
static const ValueConverter & self()
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.