| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 """This module provides shared functionality for systems to generate | 6 """This module provides shared functionality for systems to generate |
| 7 Dart APIs from the IDL database.""" | 7 Dart APIs from the IDL database.""" |
| 8 | 8 |
| 9 import copy | 9 import copy |
| 10 import re | 10 import re |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 if self.list_item_type() and not self.has_generated_interface(): | 696 if self.list_item_type() and not self.has_generated_interface(): |
| 697 return self.dart_type() | 697 return self.dart_type() |
| 698 return self._dart_interface_name | 698 return self._dart_interface_name |
| 699 | 699 |
| 700 def implementation_name(self): | 700 def implementation_name(self): |
| 701 if self.list_item_type(): | 701 if self.list_item_type(): |
| 702 implementation_name = self.idl_type() | 702 implementation_name = self.idl_type() |
| 703 else: | 703 else: |
| 704 implementation_name = self.interface_name() | 704 implementation_name = self.interface_name() |
| 705 if self.merged_into(): | 705 if self.merged_into(): |
| 706 implementation_name = '%s_Merged' % implementation_name | 706 implementation_name = '_%s_Merged' % implementation_name |
| 707 | 707 |
| 708 if not self.has_generated_interface(): | 708 if not self.has_generated_interface(): |
| 709 implementation_name = '_%s' % implementation_name | 709 implementation_name = '_%s' % implementation_name |
| 710 | 710 |
| 711 return implementation_name | 711 return implementation_name |
| 712 | 712 |
| 713 def has_generated_interface(self): | 713 def has_generated_interface(self): |
| 714 return not self._data.suppress_interface | 714 return not self._data.suppress_interface |
| 715 | 715 |
| 716 def list_item_type(self): | 716 def list_item_type(self): |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 else: | 1092 else: |
| 1093 dart_interface_name = type_name | 1093 dart_interface_name = type_name |
| 1094 return InterfaceIDLTypeInfo(type_name, type_data, dart_interface_name, | 1094 return InterfaceIDLTypeInfo(type_name, type_data, dart_interface_name, |
| 1095 self) | 1095 self) |
| 1096 | 1096 |
| 1097 if type_data.clazz == 'SVGTearOff': | 1097 if type_data.clazz == 'SVGTearOff': |
| 1098 return SVGTearOffIDLTypeInfo(type_name, type_data, self) | 1098 return SVGTearOffIDLTypeInfo(type_name, type_data, self) |
| 1099 | 1099 |
| 1100 class_name = '%sIDLTypeInfo' % type_data.clazz | 1100 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1101 return globals()[class_name](type_name, type_data) | 1101 return globals()[class_name](type_name, type_data) |
| OLD | NEW |