Flutter macOS Embedder
FlutterStandardCodec_Internal.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODEC_INTERNAL_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODEC_INTERNAL_H_
7 
10 
11 namespace flutter {
13  FlutterStandardDataType type) {
14  switch (type) {
15  case FlutterStandardDataTypeUInt8:
17  case FlutterStandardDataTypeInt32:
19  case FlutterStandardDataTypeInt64:
21  case FlutterStandardDataTypeFloat32:
23  case FlutterStandardDataTypeFloat64:
25  }
26 }
27 FlutterStandardDataType FlutterStandardDataTypeForField(
28  FlutterStandardField field) {
29  switch (field) {
31  return FlutterStandardDataTypeUInt8;
33  return FlutterStandardDataTypeInt32;
35  return FlutterStandardDataTypeInt64;
37  return FlutterStandardDataTypeFloat32;
39  return FlutterStandardDataTypeFloat64;
40  default:
41  return FlutterStandardDataTypeUInt8;
42  }
43 }
44 
45 UInt8 elementSizeForFlutterStandardDataType(FlutterStandardDataType type) {
46  switch (type) {
47  case FlutterStandardDataTypeUInt8:
48  return 1;
49  case FlutterStandardDataTypeInt32:
50  return 4;
51  case FlutterStandardDataTypeInt64:
52  return 8;
53  case FlutterStandardDataTypeFloat32:
54  return 4;
55  case FlutterStandardDataTypeFloat64:
56  return 8;
57  }
58 }
59 } // namespace flutter
60 
61 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODEC_INTERNAL_H_
flutter::FlutterStandardFieldForDataType
FlutterStandardField FlutterStandardFieldForDataType(FlutterStandardDataType type)
Definition: FlutterStandardCodec_Internal.h:12
FlutterStandardFieldFloat32Data
@ FlutterStandardFieldFloat32Data
Definition: FlutterStandardCodecHelper.h:35
flutter::FlutterStandardDataTypeForField
FlutterStandardDataType FlutterStandardDataTypeForField(FlutterStandardField field)
Definition: FlutterStandardCodec_Internal.h:27
FlutterStandardFieldInt32Data
@ FlutterStandardFieldInt32Data
Definition: FlutterStandardCodecHelper.h:30
FlutterStandardFieldUInt8Data
@ FlutterStandardFieldUInt8Data
Definition: FlutterStandardCodecHelper.h:29
FlutterStandardCodecHelper.h
flutter::elementSizeForFlutterStandardDataType
UInt8 elementSizeForFlutterStandardDataType(FlutterStandardDataType type)
Definition: FlutterStandardCodec_Internal.h:45
flutter
Definition: AccessibilityBridgeMac.h:16
FlutterCodecs.h
FlutterStandardField
FlutterStandardField
Definition: FlutterStandardCodecHelper.h:19
FlutterStandardFieldFloat64Data
@ FlutterStandardFieldFloat64Data
Definition: FlutterStandardCodecHelper.h:32
FlutterStandardFieldInt64Data
@ FlutterStandardFieldInt64Data
Definition: FlutterStandardCodecHelper.h:31