23 #ifndef DCCLFIELDCODECDATAH
24 #define DCCLFIELDCODECDATAH
26 #include "../dynamic_conditions.h"
28 #include "field_codec_message_stack.h"
48 MessagePart part_{dccl::UNKNOWN};
51 const google::protobuf::Descriptor* root_descriptor_{
nullptr};
55 template <
typename FieldCodecType>
56 void set_codec_specific_data(std::shared_ptr<dccl::any> data)
58 codec_specific_[std::type_index(
typeid(FieldCodecType))] = data;
61 template <
typename FieldCodecType> std::shared_ptr<dccl::any> codec_specific_data()
63 return codec_specific_.at(std::type_index(
typeid(FieldCodecType)));
66 template <
typename FieldCodecType>
bool has_codec_specific_data()
68 return codec_specific_.count(std::type_index(
typeid(FieldCodecType)));
72 std::map<std::type_index, std::shared_ptr<dccl::any>> codec_specific_;