blob: cb05c6c431578e346a7ba15d09298c009db388cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{% from "templates/macros.tmpl" import license, source_files_for_generated_file %}
{{ license() }}
{{source_files_for_generated_file(template_file, input_files)}}
#ifndef {{header_guard}}
#define {{header_guard}}
#include <memory>
{% if export == 'CORE_EXPORT' %}
#include "third_party/blink/renderer/core/core_export.h"
{% endif %}
#include "third_party/blink/renderer/core/dom/qualified_name.h"
namespace blink {
class {{namespace}}QualifiedName : public QualifiedName { };
namespace {{cpp_namespace}} {
{% set symbol_export = '%s ' % export if export else '' %}
// Namespace
{{symbol_export}}extern const WTF::AtomicString& {{namespace_prefix}}NamespaceURI;
// Tags
{% for tag in tags|sort %}
{{symbol_export}}extern const blink::{{namespace}}QualifiedName& {{tag|symbol}}Tag;
{% endfor %}
// Attributes
{% for attr in attrs|sort %}
{{symbol_export}}extern const blink::QualifiedName& {{attr|symbol}}Attr;
{% endfor %}
{% if tags %}
constexpr unsigned kTagsCount = {{tags|count}};
{{symbol_export}}std::unique_ptr<const {{namespace}}QualifiedName*[]> GetTags();
{% endif %}
constexpr unsigned kAttrsCount = {{attrs|count}};
{% if namespace != 'HTML' %}
std::unique_ptr<const QualifiedName*[]> GetAttrs();
{% endif %}
void Init();
} // namespace {{cpp_namespace}}
} // namespace blink
#endif // {{header_guard}}
|