46 std::shared_ptr<FromProtoTypeBase> find(google::protobuf::FieldDescriptor::Type type)
const;
47 std::shared_ptr<FromProtoCppTypeBase> find(
const google::protobuf::FieldDescriptor* field)
const
49 if (field->cpp_type() == google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE)
50 return find(field->message_type());
52 return find(field->cpp_type());
55 std::shared_ptr<FromProtoCppTypeBase> find(
const google::protobuf::Descriptor* desc)
const
57 return find(google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE,
58 std::string(desc->full_name()));
61 std::shared_ptr<FromProtoCppTypeBase> find(google::protobuf::FieldDescriptor::CppType cpptype,
62 const std::string& type_name =
"")
const;
65 friend class ::dccl::FieldCodecManagerLocal;
66 template <
typename ProtobufMessage>
void add()
68 custom_message_map_.emplace(
69 ProtobufMessage::descriptor()->full_name(),
72 template <
typename ProtobufMessage>
void remove()
74 custom_message_map_.erase(std::string(ProtobufMessage::descriptor()->full_name()));
80 custom_message_map_.clear();
87 std::map<google::protobuf::FieldDescriptor::Type, std::shared_ptr<FromProtoTypeBase>>;
91 std::map<google::protobuf::FieldDescriptor::CppType, std::shared_ptr<FromProtoCppTypeBase>>;
92 CppTypeMap cpptype_map_;
94 using CustomMessageMap = std::map<std::string, std::shared_ptr<FromProtoCppTypeBase>>;
95 CustomMessageMap custom_message_map_;