Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
dart::ApiObjectConverter Class Reference

#include <dart_api_message.h>

Inheritance diagram for dart::ApiObjectConverter:
dart::AllStatic

Static Public Member Functions

static bool CanConvert (const ObjectPtr raw_obj)
 
static bool Convert (const ObjectPtr raw_obj, Dart_CObject *c_obj)
 

Detailed Description

Definition at line 23 of file dart_api_message.h.

Member Function Documentation

◆ CanConvert()

static bool dart::ApiObjectConverter::CanConvert ( const ObjectPtr  raw_obj)
inlinestatic

Definition at line 25 of file dart_api_message.h.

25 {
26 return !raw_obj->IsHeapObject() || (raw_obj == Object::null());
27 }
static ObjectPtr null()
Definition: object.h:433

◆ Convert()

static bool dart::ApiObjectConverter::Convert ( const ObjectPtr  raw_obj,
Dart_CObject c_obj 
)
inlinestatic

Definition at line 29 of file dart_api_message.h.

29 {
30 if (!raw_obj->IsHeapObject()) {
31 ConvertSmi(static_cast<const SmiPtr>(raw_obj), c_obj);
32 } else if (raw_obj == Object::null()) {
33 ConvertNull(c_obj);
34 } else {
35 return false;
36 }
37 return true;
38 }

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