OLD | NEW |
---|---|
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 for enum_value in idl_type.enum_values]) | 106 for enum_value in idl_type.enum_values]) |
107 IdlType.enum_validation_expression = property(enum_validation_expression) | 107 IdlType.enum_validation_expression = property(enum_validation_expression) |
108 | 108 |
109 | 109 |
110 def scoped_name(interface, definition, base_name): | 110 def scoped_name(interface, definition, base_name): |
111 # partial interfaces are implemented as separate classes, with their members | 111 # partial interfaces are implemented as separate classes, with their members |
112 # implemented as static member functions | 112 # implemented as static member functions |
113 partial_interface_implemented_as = definition.extended_attributes.get('Parti alInterfaceImplementedAs') | 113 partial_interface_implemented_as = definition.extended_attributes.get('Parti alInterfaceImplementedAs') |
114 if partial_interface_implemented_as: | 114 if partial_interface_implemented_as: |
115 return '%s::%s' % (partial_interface_implemented_as, base_name) | 115 return '%s::%s' % (partial_interface_implemented_as, base_name) |
116 if definition.is_static: | 116 if definition.is_static or definition.name in ('Constructor', 'NamedConstruc tor'): |
Nils Barth (inactive)
2014/04/10 01:53:26
Could you add a linebreak here?
It's a bit more le
sof
2014/04/10 06:16:40
Done (but it was clear as could be before.)
Nils Barth (inactive)
2014/04/10 07:34:06
Thanks for accommodating my picky requests;
(Rietv
| |
117 return '%s::%s' % (cpp_name(interface), base_name) | 117 return '%s::%s' % (cpp_name(interface), base_name) |
118 return 'impl->%s' % base_name | 118 return 'impl->%s' % base_name |
119 | 119 |
120 | 120 |
121 def v8_class_name(interface): | 121 def v8_class_name(interface): |
122 return v8_types.v8_type(interface.name) | 122 return v8_types.v8_type(interface.name) |
123 | 123 |
124 | 124 |
125 ################################################################################ | 125 ################################################################################ |
126 # Specific extended attributes | 126 # Specific extended attributes |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 | 233 |
234 The returned function checks if a method/attribute is enabled. | 234 The returned function checks if a method/attribute is enabled. |
235 Given extended attribute RuntimeEnabled=FeatureName, return: | 235 Given extended attribute RuntimeEnabled=FeatureName, return: |
236 RuntimeEnabledFeatures::{featureName}Enabled | 236 RuntimeEnabledFeatures::{featureName}Enabled |
237 """ | 237 """ |
238 extended_attributes = definition_or_member.extended_attributes | 238 extended_attributes = definition_or_member.extended_attributes |
239 if 'RuntimeEnabled' not in extended_attributes: | 239 if 'RuntimeEnabled' not in extended_attributes: |
240 return None | 240 return None |
241 feature_name = extended_attributes['RuntimeEnabled'] | 241 feature_name = extended_attributes['RuntimeEnabled'] |
242 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name) | 242 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name) |
OLD | NEW |