Skip to content

ProtobufDeserializer

A namespace containing functions to deserialize protobuf messages into Unreal Engine types.

Functions

Function

Function

Function

Function

Function

Function

Function

Function

FromProto

template <typename UnrealV, typename ProtoV>
inline void ProtobufDeserializer::FromProto(const ProtoV &InProtobufValue,
UnrealV &OutUnrealValue)

Scalar / identity conversion when protobuf and Unreal types match.

Parameters:

  • UnrealV - Unreal type to convert to.
  • ProtoV - Protobuf type to convert from.
  • InProtobufValue - [in] Protobuf value to convert from.
  • OutUnrealValue - [out] Unreal value to convert to.

FromProto

template <typename ProtoV>
void ProtobufDeserializer::FromProto(
const google::protobuf::RepeatedField<ProtoV> &InProtobufRepeatedField,
TArray<ProtoV> &OutUnrealArray)

Copies a protobuf repeated field of primitives into a TArray.

Parameters:

  • InProtobufRepeatedField - [in] Protobuf repeated field to convert from.
  • OutUnrealArray - [out] Unreal array to convert to.

FromProto

template <typename UnrealV, typename ProtoV>
void ProtobufDeserializer::FromProto(
const google::protobuf::RepeatedPtrField<ProtoV> &InProtobufRepeatedField,
TArray<UnrealV> &OutUnrealArray)

Converts each element of a repeated message field via FromProto element-wise.

Parameters:

  • UnrealV - Unreal type to convert to.
  • ProtoV - Protobuf type to convert from.
  • InProtobufRepeatedField - [in] Protobuf repeated field to convert from.
  • OutUnrealArray - [out] Unreal array to convert to.

FromProto

template <typename UnrealV, typename ProtoV, typename KeyType>
void ProtobufDeserializer::FromProto(
const google::protobuf::Map<KeyType, ProtoV> &InProtobufMap,
TMap<KeyType, UnrealV> &OutUnrealMap)

Converts a protobuf map with arbitrary key type into TMap.

Parameters:

  • UnrealV - Unreal type to convert to.
  • ProtoV - Protobuf type to convert from.
  • KeyType - Type of the key in the protobuf map. Supported in both Unreal and Protobuf.
  • InProtobufMap - [in] Protobuf map to convert from.
  • OutUnrealMap - [out] Unreal map to convert to.

FromProto

template <typename UnrealV, typename ProtoV>
void ProtobufDeserializer::FromProto(
const google::protobuf::Map<std::string, ProtoV> &InProtobufMap,
TMap<FString, UnrealV> &OutUnrealMap)

Converts a string-keyed protobuf map into TMap<FString, ...>.

Parameters:

  • UnrealV - Unreal type to convert to.
  • ProtoV - Protobuf type to convert from.
  • InProtobufMap - [in] Protobuf map to convert from.
  • OutUnrealMap - [out] Unreal map to convert to.

Function

Function

Function

Function

Function

Function

Function

Function

Function

Function

Function

Function

Function

Function

Function

Function

Function

Function