ark::serialization::FieldValue

Defined in header “ark/serialization/field_value.hh”.


Our fields can be object of the specified values, depending on the field type. This is a clever wrapper around variant, so that we can support recursive field values (contained inside a container, for example).

Typedefs

  • using base = std::variant< bool, int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, float, double, std::string, ObjectPtr, core::Guid, std::chrono::nanoseconds, std::chrono::steady_clock::time_point, std::chrono::system_clock::time_point, std::vector< FieldValue >, std::map< FieldValue, FieldValue >, core::ByteBuffer >

Methods

  • bool operator<(const FieldValue & rhs)
    Define a less then operator the std::variant less than operator is a free function, so it doesn’t get picked up and we can’t easily do a “using” here. Just wrap it with some static casts.

  • const std::type_info & index_type()
    Returns a string-version of the currently set type in this field value.