Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / bindings / templates / dictionary_impl.h
blob8544f26126cacd1f9e93a89745afd6b666bc49a3
1 {% include 'copyright_block.txt' %}
2 #ifndef {{cpp_class}}_h
3 #define {{cpp_class}}_h
5 {% for filename in header_includes %}
6 #include "{{filename}}"
7 {% endfor %}
9 namespace blink {
11 {# FIXME: Add "final" if this class doesn't have subclasses #}
12 class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_class}}{% endif %} {
13 ALLOW_ONLY_INLINE_ALLOCATION();
14 public:
15 {{cpp_class}}();
17 {% for member in members %}
18 bool {{member.has_method_name}}() const { return {{member.has_method_expression}}; }
19 {{member.rvalue_cpp_type}} {{member.cpp_name}}() const { return {{member.getter_expression}}; }
20 void {{member.setter_name}}({{member.rvalue_cpp_type}} value) { m_{{member.cpp_name}} = value; }
21 {% if member.null_setter_name %}
22 void {{member.null_setter_name}}() { m_{{member.cpp_name}} = {{member.member_cpp_type}}(); }
23 {% endif %}
25 {% endfor %}
26 DECLARE_VIRTUAL_TRACE();
28 private:
29 {% for member in members %}
30 {{member.member_cpp_type}} m_{{member.cpp_name}};
31 {% endfor %}
33 friend class V8{{cpp_class}};
36 } // namespace blink
38 #endif // {{cpp_class}}_h