Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / build / scripts / templates / MakeQualifiedNames.h.tmpl
blob21de2b6206289acd02519debebfaf3cdf779b4df
1 {% from "macros.tmpl" import license %}
2 {{ license() }}
4 #ifndef {{namespace}}Names_h
5 #define {{namespace}}Names_h
7 {% if export == 'CORE_EXPORT' %}
8 #include "core/CoreExport.h"
9 {% endif %}
10 #include "core/dom/QualifiedName.h"
11 #include "wtf/PassOwnPtr.h"
13 namespace blink {
15 class {{namespace}}QualifiedName : public QualifiedName { };
17 namespace {{namespace}}Names {
19 {% set symbol_export = '%s ' % export if export else '' %}
20 // Namespace
21 {{symbol_export}}extern const WTF::AtomicString& {{namespace_prefix}}NamespaceURI;
23 // Tags
24 {% for tag in tags|sort %}
25 {{symbol_export}}extern const blink::{{namespace}}QualifiedName& {{tag|symbol}}Tag;
26 {% endfor %}
28 // Attributes
29 {% for attr in attrs|sort %}
30 {{symbol_export}}extern const blink::QualifiedName& {{attr|symbol}}Attr;
31 {% endfor %}
33 {% if tags %}
34 const unsigned {{namespace}}TagsCount = {{tags|count}};
35 {{symbol_export}}PassOwnPtr<const {{namespace}}QualifiedName*[]> get{{namespace}}Tags();
36 {% endif %}
38 const unsigned {{namespace}}AttrsCount = {{attrs|count}};
39 {% if namespace != 'HTML' %}
40 PassOwnPtr<const QualifiedName*[]> get{{namespace}}Attrs();
41 {% endif %}
43 void init();
45 } // {{namespace}}Names
46 } // namespace blink
48 #endif