C++ Server-Side SDK
LaunchDarkly SDK
|
Represents the kind of a serialized item. The purpose of this interface is to allow for determining a serialized item's version without leaking the details of the serialization format to the calling code. More...
#include <iserialized_item_kind.hpp>
Public Member Functions | |
virtual std::string const & | Namespace () const =0 |
virtual std::uint64_t | Version (std::string const &data) const =0 |
ISerializedItemKind (ISerializedItemKind const &item)=delete | |
ISerializedItemKind (ISerializedItemKind &&item)=delete | |
ISerializedItemKind & | operator= (ISerializedItemKind const &)=delete |
ISerializedItemKind & | operator= (ISerializedItemKind &&)=delete |
Represents the kind of a serialized item. The purpose of this interface is to allow for determining a serialized item's version without leaking the details of the serialization format to the calling code.
|
pure virtual |
The namespace for the data.
Implemented in launchdarkly::server_side::integrations::SegmentKind, and launchdarkly::server_side::integrations::FlagKind.
|
pure virtual |
Deserialize data and return the version of the data.
This is for cases where the persistent store cannot avoid deserializing data to determine its version. For instance a Redis store where the only columns are the prefixed key and the serialized data.
If the data cannot be deserialized, then 0 will be returned.
data | The data to deserialize. |
Implemented in launchdarkly::server_side::integrations::SegmentKind, and launchdarkly::server_side::integrations::FlagKind.