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 %} |
| 14 class {{decl}}; |
| 15 {% endfor %} |
| 16 |
13 {# FIXME: Add "final" if this class doesn\'t have subclasses #} | 17 {# FIXME: Add "final" if this class doesn\'t have subclasses #} |
14 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 %} { |
15 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 19 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
16 public: | 20 public: |
17 {{cpp_class}}(); | 21 {{cpp_class}}(); |
18 virtual ~{{cpp_class}}(); | 22 virtual ~{{cpp_class}}(); |
| 23 {{cpp_class}}(const {{cpp_class}}&); |
| 24 {{cpp_class}}& operator=(const {{cpp_class}}&); |
19 | 25 |
20 {% for member in members %} | 26 {% for member in members %} |
21 bool {{member.has_method_name}}() const; | 27 bool {{member.has_method_name}}() const; |
22 {{member.rvalue_cpp_type}} {{member.cpp_name}}() const; | 28 {{member.rvalue_cpp_type}} {{member.cpp_name}}() const; |
23 void {{member.setter_name}}({{member.rvalue_cpp_type}}); | 29 void {{member.setter_name}}({{member.rvalue_cpp_type}}); |
24 {% if member.null_setter_name %} | 30 {% if member.null_setter_name %} |
25 void {{member.null_setter_name}}(); | 31 void {{member.null_setter_name}}(); |
26 {% endif %} | 32 {% endif %} |
27 | 33 |
28 {% endfor %} | 34 {% endfor %} |
29 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; |
30 DECLARE_VIRTUAL_TRACE(); | 36 DECLARE_VIRTUAL_TRACE(); |
31 | 37 |
32 private: | 38 private: |
33 {% for member in members %} | 39 {% for member in members %} |
34 {% if member.nullable_indicator_name %} | 40 {% if member.nullable_indicator_name %} |
35 bool {{member.nullable_indicator_name}} = false; | 41 bool {{member.nullable_indicator_name}} = false; |
36 {% endif %} | 42 {% endif %} |
37 {{member.member_cpp_type}} m_{{member.cpp_name}}; | 43 {{member.member_cpp_type}} m_{{member.cpp_name}}; |
38 {% endfor %} | 44 {% endfor %} |
39 | 45 |
40 friend class V8{{cpp_class}}; | 46 friend class V8{{cpp_class}}; |
41 }; | 47 }; |
42 | 48 |
43 } // namespace blink | 49 } // namespace blink |
44 | 50 |
45 #endif // {{cpp_class}}_h | 51 #endif // {{cpp_class}}_h |
46 | 52 |
47 {% endfilter %}{# format_blink_cpp_source_code #} | 53 {% endfilter %}{# format_blink_cpp_source_code #} |
OLD | NEW |