Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
scripts.idlnode.IDLModule Class Reference
Inheritance diagram for scripts.idlnode.IDLModule:
scripts.idlnode.IDLNode

Public Member Functions

 __init__ (self, ast)
 
- Public Member Functions inherited from scripts.idlnode.IDLNode
 __repr__ (self)
 
 __eq__ (self, other)
 
 __hash__ (self)
 
 reset_id (self, newId)
 
 all (self, type_filter=None)
 
 to_dict (self)
 
 to_hash (self)
 

Public Attributes

 interfaces
 
 typeDefs
 
 enums
 
 implementsStatements
 
- Public Attributes inherited from scripts.idlnode.IDLNode
 id
 
 ext_attrs
 
 annotations
 
 members
 

Additional Inherited Members

- Protected Member Functions inherited from scripts.idlnode.IDLNode
 _extra_repr (self)
 
 _all_subnodes (self)
 
 _to_hashable (self, obj)
 
 _find_all (self, ast, label, max_results=sys.maxsize)
 
 _find_first (self, ast, label)
 
 _has (self, ast, label)
 
 _convert_label_to_field (self, label)
 
 _convert_all (self, ast, label, idlnode_ctor)
 
 _convert_first (self, ast, label, idlnode_ctor)
 
 _convert_ext_attrs (self, ast)
 
 _convert_annotations (self, ast)
 
 _convert_constants (self, ast, js_name)
 

Detailed Description

IDLModule has an id, and may contain interfaces, type defs and
implements statements.

Definition at line 535 of file idlnode.py.

Constructor & Destructor Documentation

◆ __init__()

scripts.idlnode.IDLModule.__init__ (   self,
  ast 
)
Initializes an IDLNode from a PegParser AST output.

Reimplemented from scripts.idlnode.IDLNode.

Definition at line 539 of file idlnode.py.

539 def __init__(self, ast):
540 IDLNode.__init__(self, ast)
541 self._convert_ext_attrs(ast)
542 self._convert_annotations(ast)
543 self.interfaces = self._convert_all(ast, 'Interface', IDLInterface)
544
545 is_blink = ast.__module__ == 'idl_definitions'
546
547 # No reason to handle typedef they're already aliased in Blink's AST.
548 self.typeDefs = [] if is_blink else self._convert_all(
549 ast, 'TypeDef', IDLTypeDef)
550
551 self.enums = self._convert_all(ast, 'Enum', IDLNode)
552
553 if is_blink:
554 # implements is handled by the interface merging step (see the function
555 # merge_interface_dependencies).
556 for interface in self.interfaces:
557 interface_info = get_interfaces_info()[interface.id]
558 # TODO(terry): Same handling for implementsStatements as in IDLFile?
559 self.implementsStatements = interface_info[
560 'implements_interfaces']
561 else:
562 self.implementsStatements = self._convert_all(
563 ast, 'ImplStmt', IDLImplementsStatement)
564
565

Member Data Documentation

◆ enums

scripts.idlnode.IDLModule.enums

Definition at line 551 of file idlnode.py.

◆ implementsStatements

scripts.idlnode.IDLModule.implementsStatements

Definition at line 559 of file idlnode.py.

◆ interfaces

scripts.idlnode.IDLModule.interfaces

Definition at line 543 of file idlnode.py.

◆ typeDefs

scripts.idlnode.IDLModule.typeDefs

Definition at line 548 of file idlnode.py.


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