Flutter Engine
The Flutter Engine
Classes | Functions
scripts.systemnative Namespace Reference

Classes

class  CPPLibraryEmitter
 
class  DartiumBackend
 

Functions

def array_type (data_type)
 
def TypeIdToBlinkName (interface_id, database)
 
def DeriveQualifiedName (library_name, name)
 
def DeriveBlinkClassName (name)
 
def EncodeType (t)
 

Function Documentation

◆ array_type()

def scripts.systemnative.array_type (   data_type)

Definition at line 28 of file systemnative.py.

28def array_type(data_type):
29 matched = re.match(r'([\w\d_\s]+)\[\]', data_type)
30 if not matched:
31 return None
32 return matched.group(1)
33
34
def array_type(data_type)
Definition: systemnative.py:28

◆ DeriveBlinkClassName()

def scripts.systemnative.DeriveBlinkClassName (   name)

Definition at line 60 of file systemnative.py.

60def DeriveBlinkClassName(name):
61 return "Blink" + name
62
63
def DeriveBlinkClassName(name)
Definition: systemnative.py:60

◆ DeriveQualifiedName()

def scripts.systemnative.DeriveQualifiedName (   library_name,
  name 
)

Definition at line 56 of file systemnative.py.

56def DeriveQualifiedName(library_name, name):
57 return library_name + "." + name
58
59
def DeriveQualifiedName(library_name, name)
Definition: systemnative.py:56

◆ EncodeType()

def scripts.systemnative.EncodeType (   t)

Definition at line 72 of file systemnative.py.

72def EncodeType(t):
73
74 seq_match = _sequence_matcher.match(t)
75 if seq_match is not None:
76 t2 = EncodeType(seq_match.group(1))
77 t = "SEQ_%s_SEQ" % t2
78 return t
79
80 arr_match = array_type(t)
81 if arr_match is not None:
82 t = EncodeType(arr_match)
83 return "A_%s_A" % t
84
85 return _type_encoding_map.get(t) or t
86
87

◆ TypeIdToBlinkName()

def scripts.systemnative.TypeIdToBlinkName (   interface_id,
  database 
)

Definition at line 38 of file systemnative.py.

38def TypeIdToBlinkName(interface_id, database):
39 # Maybe should use the type_registry here?
40 if database.HasEnum(interface_id):
41 return "DOMString" # All enums are strings.
42
43 seq_match = _sequence_matcher.match(interface_id)
44 if seq_match is not None:
45 t = TypeIdToBlinkName(seq_match.group(1), database)
46 return "sequence<%s>" % t
47
48 arr_match = array_type(interface_id)
49 if arr_match is not None:
50 t = TypeIdToBlinkName(arr_match, database)
51 return "%s[]" % t
52
53 return interface_id
54
55
def TypeIdToBlinkName(interface_id, database)
Definition: systemnative.py:38