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

Instance Methods

(void) - writeValue:
 
- Instance Methods inherited from FlutterStandardWriter
(instancetype) - initWithData:
 
(void) - writeByte:
 
(void) - writeBytes:length:
 
(void) - writeData:
 
(void) - writeSize:
 
(void) - writeAlignment:
 
(void) - writeUTF8:
 
(void) - writeValue:
 

Additional Inherited Members

- Class Methods inherited from FlutterStandardWriter
(static FlutterStandardCodecObjcType+ GetWriteType [implementation]
 
(static void) + WriteKeyValues [implementation]
 
(static void) + FastWriteValueOfType [implementation]
 
(static void) + WriteValueOfType [implementation]
 

Detailed Description

Definition at line 33 of file flutter_standard_codec_unittest.mm.

Method Documentation

◆ writeValue:

- (void) writeValue: (id value

Introspects into an object and writes its representation.

Supported Data Types:

  • NSNull
  • NSNumber
  • NSString (as UTF-8)
  • FlutterStandardTypedData
  • NSArray of supported types
  • NSDictionary of supporte types

NSAsserts on failure.

Reimplemented from FlutterStandardWriter.

Definition at line 15 of file flutter_standard_codec_unittest.mm.

38 :(id)value {
39 if ([value isKindOfClass:[NSDate class]]) {
40 [self writeByte:kDATE];
41 NSDate* date = value;
42 NSTimeInterval time = date.timeIntervalSince1970;
43 SInt64 ms = (SInt64)(time * 1000.0);
44 [self writeBytes:&ms length:8];
45 } else if ([value isKindOfClass:[Pair class]]) {
46 Pair* pair = value;
47 [self writeByte:kPAIR];
48 [self writeValue:pair.left];
49 [self writeValue:pair.right];
50 } else {
51 [super writeValue:value];
52 }
53}
uint8_t value
static double time(int loops, Benchmark *bench, Target *target)
Definition: nanobench.cpp:394
const uintptr_t id

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