Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
dart_compiler.IdlCompiler Class Reference
Inheritance diagram for dart_compiler.IdlCompiler:
compiler.IdlCompilerDart

Public Member Functions

def __init__ (self, output_directory, code_generator=None, interfaces_info=None, interfaces_info_filename='', only_if_changed=False)
 
def compile_and_write (self, idl_filename, output_filenames)
 
def generate_global_and_write (self, output_filenames)
 
def compile_file (self, idl_filename)
 

Public Attributes

 code_generator
 
 interfaces_info
 
 only_if_changed
 
 output_directory
 
 reader
 

Detailed Description

Abstract Base Class for IDL compilers.

In concrete classes:
* self.code_generator must be set, implementing generate_code()
  (returning a list of output code), and
* compile_file() must be implemented (handling output filenames).

Definition at line 77 of file dart_compiler.py.

Constructor & Destructor Documentation

◆ __init__()

def dart_compiler.IdlCompiler.__init__ (   self,
  output_directory,
  code_generator = None,
  interfaces_info = None,
  interfaces_info_filename = '',
  only_if_changed = False 
)
Args:
    interfaces_info:
        interfaces_info dict
        (avoids auxiliary file in run-bindings-tests)
    interfaces_info_file: filename of pickled interfaces_info

Reimplemented in compiler.IdlCompilerDart.

Definition at line 87 of file dart_compiler.py.

92 only_if_changed=False):
93 """
94 Args:
95 interfaces_info:
96 interfaces_info dict
97 (avoids auxiliary file in run-bindings-tests)
98 interfaces_info_file: filename of pickled interfaces_info
99 """
100 self.code_generator = code_generator
101 if interfaces_info_filename:
102 with open(interfaces_info_filename) as interfaces_info_file:
103 interfaces_info = pickle.load(interfaces_info_file)
104 self.interfaces_info = interfaces_info
105
106 self.only_if_changed = only_if_changed
107 self.output_directory = output_directory
108 self.reader = IdlReader(interfaces_info, output_directory, True)
109

Member Function Documentation

◆ compile_and_write()

def dart_compiler.IdlCompiler.compile_and_write (   self,
  idl_filename,
  output_filenames 
)

Definition at line 110 of file dart_compiler.py.

110 def compile_and_write(self, idl_filename, output_filenames):
111 # Only compile the IDL file and return the AST.
112 definitions = self.reader.read_idl_definitions(idl_filename)
113 return definitions
114

◆ compile_file()

def dart_compiler.IdlCompiler.compile_file (   self,
  idl_filename 
)

Reimplemented in compiler.IdlCompilerDart.

Definition at line 119 of file dart_compiler.py.

119 def compile_file(self, idl_filename):
120 pass

◆ generate_global_and_write()

def dart_compiler.IdlCompiler.generate_global_and_write (   self,
  output_filenames 
)

Definition at line 115 of file dart_compiler.py.

115 def generate_global_and_write(self, output_filenames):
116 pass
117

Member Data Documentation

◆ code_generator

dart_compiler.IdlCompiler.code_generator

Definition at line 100 of file dart_compiler.py.

◆ interfaces_info

dart_compiler.IdlCompiler.interfaces_info

Definition at line 104 of file dart_compiler.py.

◆ only_if_changed

dart_compiler.IdlCompiler.only_if_changed

Definition at line 106 of file dart_compiler.py.

◆ output_directory

dart_compiler.IdlCompiler.output_directory

Definition at line 107 of file dart_compiler.py.

◆ reader

dart_compiler.IdlCompiler.reader

Definition at line 108 of file dart_compiler.py.


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