blob: 6a0f6cfcd42f1b57ccf0824224731608f78f2d10 (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
{%- set header_guard = "%s_H_"|
format(module.path|upper|replace("/","_")|replace(".","_")) %}
#ifndef {{header_guard}}
#define {{header_guard}}
#include "mojo/public/cpp/bindings/array.h"
#include "mojo/public/cpp/bindings/callback.h"
#include "mojo/public/cpp/bindings/interface_impl.h"
#include "mojo/public/cpp/bindings/interface_ptr.h"
#include "mojo/public/cpp/bindings/no_interface.h"
#include "{{module.path}}-internal.h"
{%- for import in imports %}
#include "{{import.module.path}}.h"
{%- endfor %}
{%- for namespace in namespaces_as_array %}
namespace {{namespace}} {
{%- endfor %}
{#--- Enums #}
{% for enum in enums %}
{% include "enum_declaration.tmpl" %}
{%- endfor %}
{#--- Interface Forward Declarations -#}
{% for interface in interfaces %}
class {{interface.name}};
typedef mojo::InterfacePtr<{{interface.name}}> {{interface.name}}Ptr;
{% endfor %}
{#--- Structs #}
{% for struct in structs %}
{% include "wrapper_class_declaration.tmpl" %}
{%- endfor %}
{#--- Interfaces -#}
{% for interface in interfaces %}
{% include "interface_declaration.tmpl" %}
{%- endfor %}
{#--- Interface Proxies -#}
{% for interface in interfaces %}
{% include "interface_proxy_declaration.tmpl" %}
{%- endfor %}
{#--- Interface Stubs -#}
{% for interface in interfaces %}
{% include "interface_stub_declaration.tmpl" %}
{%- endfor %}
{%- for namespace in namespaces_as_array|reverse %}
} // namespace {{namespace}}
{%- endfor %}
{#--- Enum TypeTraits Specializations #}
{% if enums %}
namespace mojo {
namespace internal {
{% for enum in enums %}
{% include "enum_traits.tmpl" %}
{%- endfor %}
} // namespace internal
} // namespace mojo
{%- endif %}
#endif // {{header_guard}}
|