blob: bd5566b03e7e07f890e097ad5ebbcd1915659a65 [file] [log] [blame]
{% 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(attribute='name') %}
{{symbol_export}}extern const blink::{{namespace}}QualifiedName& {{tag|symbol}}Tag;
{% endfor %}
// Attributes
{% for attr in attrs|sort(attribute='name') %}
{{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}}