OLD | NEW |
1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
2 | 2 |
3 {% include 'copyright_block.txt' %} | 3 {% include 'copyright_block.txt' %} |
4 #ifndef {{cpp_class}}_h | 4 #ifndef {{cpp_class}}_h |
5 #define {{cpp_class}}_h | 5 #define {{cpp_class}}_h |
6 | 6 |
7 {% for filename in header_includes %} | 7 {% for filename in header_includes %} |
8 #include "{{filename}}" | 8 #include "{{filename}}" |
9 {% endfor %} | 9 {% endfor %} |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 {% for decl in header_forward_decls %} | 13 {% for decl in header_forward_decls %} |
14 class {{decl}}; | 14 class {{decl}}; |
15 {% endfor %} | 15 {% endfor %} |
16 | 16 |
17 {# FIXME: Add "final" if this class doesn\'t have subclasses #} | 17 {# FIXME: Add "final" if this class doesn\'t have subclasses #} |
18 class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_c
lass}}{% endif %} { | 18 class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_c
lass}}{% endif %} { |
19 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 19 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
20 public: | 20 public: |
21 {{cpp_class}}(); | 21 {{cpp_class}}(); |
22 virtual ~{{cpp_class}}(); | 22 virtual ~{{cpp_class}}(); |
23 {{cpp_class}}(const {{cpp_class}}&); | 23 {{cpp_class}}(const {{cpp_class}}&); |
24 {{cpp_class}}& operator=(const {{cpp_class}}&); | 24 {{cpp_class}}& operator=(const {{cpp_class}}&); |
25 | 25 |
26 {% for member in members %} | 26 {% for member in members %} |
27 bool {{member.has_method_name}}() const; | 27 bool {{member.has_method_name}}() const; |
28 {{member.rvalue_cpp_type}} {{member.cpp_name}}() const; | 28 {{member.rvalue_cpp_type}} {{member.getter_name}}() const; |
29 void {{member.setter_name}}({{member.rvalue_cpp_type}}); | 29 void {{member.setter_name}}({{member.rvalue_cpp_type}}); |
30 {% if member.null_setter_name %} | 30 {% if member.null_setter_name %} |
31 void {{member.null_setter_name}}(); | 31 void {{member.null_setter_name}}(); |
32 {% endif %} | 32 {% endif %} |
33 | 33 |
34 {% endfor %} | 34 {% endfor %} |
35 v8::Local<v8::Value> toV8Impl(v8::Local<v8::Object>, v8::Isolate*) const overr
ide; | 35 v8::Local<v8::Value> toV8Impl(v8::Local<v8::Object>, v8::Isolate*) const overr
ide; |
36 DECLARE_VIRTUAL_TRACE(); | 36 DECLARE_VIRTUAL_TRACE(); |
37 | 37 |
38 private: | 38 private: |
39 {% for member in members %} | 39 {% for member in members %} |
40 {% if member.nullable_indicator_name %} | 40 {% if member.nullable_indicator_name %} |
41 bool {{member.nullable_indicator_name}} = false; | 41 bool {{member.nullable_indicator_name}} = false; |
42 {% endif %} | 42 {% endif %} |
43 {{member.member_cpp_type}} m_{{member.cpp_name}}; | 43 {{member.member_cpp_type}} m_{{member.cpp_name}}; |
44 {% endfor %} | 44 {% endfor %} |
45 | 45 |
46 friend class V8{{cpp_class}}; | 46 friend class V8{{cpp_class}}; |
47 }; | 47 }; |
48 | 48 |
49 } // namespace blink | 49 } // namespace blink |
50 | 50 |
51 #endif // {{cpp_class}}_h | 51 #endif // {{cpp_class}}_h |
52 | 52 |
53 {% endfilter %}{# format_blink_cpp_source_code #} | 53 {% endfilter %}{# format_blink_cpp_source_code #} |
OLD | NEW |