Flutter Engine
The Flutter Engine
Instance Methods | List of all members
ExtendedReader Class Reference
Inheritance diagram for ExtendedReader:
FlutterStandardReader

Instance Methods

(id- readValueOfType:
 
- Instance Methods inherited from FlutterStandardReader
(instancetype) - initWithData:
 
(BOOL- hasMore
 
(UInt8) - readByte
 
(void) - readBytes:length:
 
(NSData *) - readData:
 
(UInt32) - readSize
 
(void) - readAlignment:
 
(NSString *) - readUTF8
 
(nullable id- readValue
 
(nullable id- readValueOfType:
 

Additional Inherited Members

- Class Methods inherited from FlutterStandardReader
(static CFTypeRef) + ReadValue [implementation]
 
(static CFTypeRef) + ReadTypedDataOfType [implementation]
 

Detailed Description

Definition at line 56 of file flutter_standard_codec_unittest.mm.

Method Documentation

◆ readValueOfType:

- (id) readValueOfType: (UInt8)  type

Decodes a value matching the type specified.

See also:

Reimplemented from FlutterStandardReader.

Definition at line 15 of file flutter_standard_codec_unittest.mm.

61 :(UInt8)type {
62 switch (type) {
63 case kDATE: {
64 SInt64 value;
65 [self readBytes:&value length:8];
66 NSTimeInterval time = [NSNumber numberWithLong:value].doubleValue / 1000.0;
67 return [NSDate dateWithTimeIntervalSince1970:time];
68 }
69 case kPAIR: {
70 return [[Pair alloc] initWithLeft:[self readValue] right:[self readValue]];
71 }
72 default:
73 return [super readValueOfType:type];
74 }
75}
GLenum type
uint8_t value
static const UInt8 kDATE
static const UInt8 kPAIR
static double time(int loops, Benchmark *bench, Target *target)
Definition: nanobench.cpp:394

The documentation for this class was generated from the following file: