41 , converter_(&converter)
67 : value_(other.value_)
68 , converter_(other.converter_)
76 return (converter_ != &NullConverter::self());
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_;
Field()
Initializes the field with no value.
bool tryCast(Char &value) const
Tries to cast the stored value into a value of the Char type.
#define ONIXS_CMEMDH_NULLPTR
#define ONIXS_CMEMDHFIX_NAMESPACE_BEGIN
Represents time point without time-zone information.
bool tryCast(Timestamp &value) const
Tries to cast the stored value into a value of the Timestamp type.
Field(const Field &other)
Initializes as the copy of the other field.
void toStr(std::string &str) const
Outputs the text representation into the given string.
const ValueContainer & value() const
Exposes value storage for further value manipulations.
#define ONIXS_CMEMDH_LTWT
ValueConversion< Value >::Result cast() const
Casts the stored value to the requested type.
bool tryCast(MaturityMonthYear &value) const
Tries to cast the stored value into a value of the MaturityMonthYear type.
Implements value conversion operations through value conversion traits.
char Char
Character type alias.
bool value(Number &number, const MultiContainer &container, Tag tag)
Finds a tag-value entry in the given collection by the given tag and returns its value component tran...
void toStr(std::string &str, const Message &message)
Serializes FIX message into tag=value format.
#define ONIXS_CMEMDHFIX_NAMESPACE_END
bool tryCast(typename Enumeration::Enum &value) const
Tries to cast the stored value into a value of the given Enumeration type.
Field(const ValueConverter &converter)
Initializes the field.
Provides efficient way of accessing text-based values without copying content of the text being refer...
bool tryCast(Int32 &value) const
Tries to cast the stored value into a value of the Int32 type.
Traits::Result Result
Conversion output type.
bool tryCast(Int8 &value) const
Tries to cast the stored value into a value of the Int8 type.
virtual void toStr(std::string &, const ValueContainer &) const
Outputs the text presentation of the FIX value stored in the given container into the given string...
bool tryCast(UInt8 &value) const
Tries to cast the stored value into a value of the UInt8 type.
Field & operator=(const Field &other)
Re-initializes the field as a copy of the other one.
bool tryCast(StrRef &str) const
Tries to cast the stored value into a value of the StrRef type.
bool tryCast(UInt64 &value) const
Tries to cast the stored value into a value of the UInt64 type.
virtual bool convert(StrRef &, const ValueContainer &) const
Tries to convert the value stored in the given container into the string reference.
std::string toStr() const
Returns the text representation.
UInt16 UInt16
uInt16 optional.
ValueContainer & value()
Exposes value storage for further value manipulations.
bool tryCast(Int64 &value) const
Tries to cast the stored value into a value of the Int64 type.
bool tryCast(UInt16 &value) const
Tries to cast the stored value into a value of the UInt16 type.
bool tryCast(Int16 &value) const
Tries to cast the stored value into a value of the Int16 type.
bool tryCast(UInt32 &value) const
Tries to cast the stored value into a value of the UInt32 type.
Container for a value of any supported kinds.
bool tryCast(BitSet &value, typename BitSet::Bits *=nullptr) const
Tries to cast the stored value into a value of the type representing a BitSet.
Abstraction gathering operations over a value of a particular type stored as a field in a message...
Represents the field in the FIX message.