OLD | NEW |
1 {% from "macros.tmpl" import license -%} | 1 {% from "macros.tmpl" import license -%} |
2 {{ license() }} | 2 {{ license() }} |
3 | 3 |
4 #ifndef {{namespace}}Names_h | 4 #ifndef {{namespace}}Names_h |
5 #define {{namespace}}Names_h | 5 #define {{namespace}}Names_h |
6 | 6 |
7 #include "core/dom/QualifiedName.h" | 7 #include "core/dom/QualifiedName.h" |
| 8 #include "wtf/PassOwnPtr.h" |
8 | 9 |
9 namespace WebCore { | 10 namespace WebCore { |
10 namespace {{namespace}}Names { | 11 namespace {{namespace}}Names { |
11 | 12 |
12 #ifndef {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS | 13 #ifndef {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS |
13 // Namespace | 14 // Namespace |
14 extern const WTF::AtomicString {{namespace_prefix}}NamespaceURI; | 15 extern const WTF::AtomicString {{namespace_prefix}}NamespaceURI; |
15 | 16 |
16 // Tags | 17 // Tags |
17 {%- for tag in tags|sort %} | 18 {%- for tag in tags|sort %} |
18 extern const WebCore::QualifiedName {{tag|symbol}}Tag; | 19 extern const WebCore::QualifiedName {{tag|symbol}}Tag; |
19 {%- endfor %} | 20 {%- endfor %} |
20 | 21 |
21 // Attributes | 22 // Attributes |
22 {%- for attr in attrs|sort %} | 23 {%- for attr in attrs|sort %} |
23 extern const WebCore::QualifiedName {{attr|symbol}}Attr; | 24 extern const WebCore::QualifiedName {{attr|symbol}}Attr; |
24 {%- endfor %} | 25 {%- endfor %} |
25 | 26 |
26 #endif // {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS | 27 #endif // {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS |
27 | 28 |
28 {%- if tags %} | 29 {%- if tags %} |
29 const unsigned {{namespace}}TagsCount = {{tags|count}}; | 30 const unsigned {{namespace}}TagsCount = {{tags|count}}; |
30 const WebCore::QualifiedName* const* get{{namespace}}Tags(); | 31 PassOwnPtr<const QualifiedName*[]> get{{namespace}}Tags(); |
31 {%- endif %} | 32 {%- endif %} |
32 const unsigned {{namespace}}AttrsCount = {{attrs|count}}; | 33 const unsigned {{namespace}}AttrsCount = {{attrs|count}}; |
33 const WebCore::QualifiedName* const* get{{namespace}}Attrs(); | 34 PassOwnPtr<const QualifiedName*[]> get{{namespace}}Attrs(); |
34 | 35 |
35 void init(); | 36 void init(); |
36 | 37 |
37 } // {{namespace}}Names | 38 } // {{namespace}}Names |
38 } // WebCore | 39 } // WebCore |
39 | 40 |
40 #endif | 41 #endif |
OLD | NEW |