Package pragma
Class PragmaOptions
- java.lang.Object
-
- pragma.PragmaOptions
-
public final class PragmaOptions extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPragmaOptions.PragmaBackendTypeProtobuf enumpragma.PragmaBackendTypestatic classPragmaOptions.PragmaMessageTypeProtobuf enumpragma.PragmaMessageTypestatic classPragmaOptions.PragmaSessionTypeProtobuf enumpragma.PragmaSessionTypestatic classPragmaOptions.SdkVisibilityProtobuf enumpragma.SdkVisibility
-
Field Summary
Fields Modifier and Type Field Description static intBACKEND_TYPE_FIELD_NUMBERstatic com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FileOptions,PragmaOptions.PragmaBackendType>backendTypeThis value determines what backend generated service code communicates with.static intEXPORT_AS_KEY_FIELD_NUMBERstatic com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FieldOptions,Boolean>exportAsKeyDefines whether a string should be treated as a key/symbol and allows the PragmaSDK code generators to determine a custom export type to use in the SDK code.static intPRAGMA_MESSAGE_TYPE_FIELD_NUMBERstatic intPRAGMA_SESSION_TYPE_FIELD_NUMBERstatic com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.MessageOptions,PragmaOptions.PragmaMessageType>pragmaMessageTypeUse with any type meant to be sent over the wire.static com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.MessageOptions,PragmaOptions.PragmaSessionType>pragmaSessionTypeDefines which Session a message belongs to.static intSDK_VISIBILITY_FIELD_NUMBERstatic com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.MessageOptions,PragmaOptions.SdkVisibility>sdkVisibilityextend .google.protobuf.MessageOptions { ...static intUNREAL_ENUM_NAME_FIELD_NUMBERstatic intUNREAL_NAMESPACE_FIELD_NUMBERstatic intUNREAL_TYPE_NAME_FIELD_NUMBERstatic com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.EnumOptions,String>unrealEnumNameDefines the name of the type as it should appear in the Unreal SDK.static com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FileOptions,String>unrealNamespaceSimilar to built-in csharp_namespace, this value is used to namespace Unreal types.static com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.MessageOptions,String>unrealTypeNameDefines the name of the type as it should appear in the Unreal SDK.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.protobuf.Descriptors.FileDescriptorgetDescriptor()static voidregisterAllExtensions(com.google.protobuf.ExtensionRegistry registry)static voidregisterAllExtensions(com.google.protobuf.ExtensionRegistryLite registry)
-
-
-
Field Detail
-
PRAGMA_MESSAGE_TYPE_FIELD_NUMBER
public static final int PRAGMA_MESSAGE_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
pragmaMessageType
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.MessageOptions,PragmaOptions.PragmaMessageType> pragmaMessageType
Use with any type meant to be sent over the wire. Example usage: option (pragma_message_type) = REQUEST;
extend .google.protobuf.MessageOptions { ... }
-
PRAGMA_SESSION_TYPE_FIELD_NUMBER
public static final int PRAGMA_SESSION_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
pragmaSessionType
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.MessageOptions,PragmaOptions.PragmaSessionType> pragmaSessionType
Defines which Session a message belongs to. Only valid for REQUEST, RESPONSE, or NOTIFICATION message types. Example usage: option (pragma_session_type) = PLAYER;
extend .google.protobuf.MessageOptions { ... }
-
UNREAL_TYPE_NAME_FIELD_NUMBER
public static final int UNREAL_TYPE_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
unrealTypeName
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.MessageOptions,String> unrealTypeName
Defines the name of the type as it should appear in the Unreal SDK. Note that this name will still be prepended with FPragma_. Example usage: option (unreal_type_name) = PlatformError; Result: FPragma_PlatformError
extend .google.protobuf.MessageOptions { ... }
-
SDK_VISIBILITY_FIELD_NUMBER
public static final int SDK_VISIBILITY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
sdkVisibility
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.MessageOptions,PragmaOptions.SdkVisibility> sdkVisibility
extend .google.protobuf.MessageOptions { ... }
-
UNREAL_ENUM_NAME_FIELD_NUMBER
public static final int UNREAL_ENUM_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
unrealEnumName
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.EnumOptions,String> unrealEnumName
Defines the name of the type as it should appear in the Unreal SDK. Note that this name will still be prepended with EPragma_. Example usage: option (unreal_enum_name) = "PlatformError"; Result: EPragma_PlatformError
extend .google.protobuf.EnumOptions { ... }
-
UNREAL_NAMESPACE_FIELD_NUMBER
public static final int UNREAL_NAMESPACE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
unrealNamespace
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FileOptions,String> unrealNamespace
Similar to built-in csharp_namespace, this value is used to namespace Unreal types. Unreal doesn't play nice with actual C++ namespaces, so we instead namespace in the type name. By default, types will use the leaf node of the package for this value, but can be overridden to make it nicer. Set to "null" to force no namespace to be used (e.g. FPragma_Fixed128). Example usage: package pragma.mygreetings; option (unreal_namespace) = "Greetings"; message Hello {} Result without option: FPragma_Mygreetings_Hello Result with option: FPragma_Greetings_Helloextend .google.protobuf.FileOptions { ... }
-
BACKEND_TYPE_FIELD_NUMBER
public static final int BACKEND_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
backendType
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FileOptions,PragmaOptions.PragmaBackendType> backendType
This value determines what backend generated service code communicates with. Defaults to PragmaBackendType.Game. Example usage: option (backend_type) = PragmaBackendType.Social;
extend .google.protobuf.FileOptions { ... }
-
EXPORT_AS_KEY_FIELD_NUMBER
public static final int EXPORT_AS_KEY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
exportAsKey
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<com.google.protobuf.DescriptorProtos.FieldOptions,Boolean> exportAsKey
Defines whether a string should be treated as a key/symbol and allows the PragmaSDK code generators to determine a custom export type to use in the SDK code. Using a custom key type instead of a string has two primary benefits: 1. Memory allocation: Strings can hurt a program’s performance if string objects are repeatedly created and destroyed when the same object could have been reused in their place. For this reason, a program that uses keys/symbols over strings (when possible) will run more efficiently. 2. Performance: In languages that support a custom key/symbol type, the == operator can be used to compare two keys, and return true or false if the names match the same internal index. This provides significant CPU savings since it is a O(1) constant time operation rather than O(n) linear time of a string comparison. TL;DR: If the textual content of the object is important, use a string. If the identity of the object is important, use a key/symbol. Example usage: string hero = 1 [(export_as_key) = true]; Result: FName (Unreal's key type) will be used as the Unreal SDK type instead of FString.extend .google.protobuf.FieldOptions { ... }
-
-
Method Detail
-
registerAllExtensions
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry)
-
registerAllExtensions
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry)
-
getDescriptor
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor()
-
-