| OLD | NEW |
| (Empty) |
| 1 // This file is generated from {{input_file}} | |
| 2 | |
| 3 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 4 // Use of this source code is governed by a BSD-style license that can be | |
| 5 // found in the LICENSE file. | |
| 6 | |
| 7 {% set sink_class = (name | to_singular) + "Sink" %} | |
| 8 | |
| 9 #ifndef {{sink_class}}_h | |
| 10 #define {{sink_class}}_h | |
| 11 | |
| 12 #include "platform/heap/HeapAllocator.h" | |
| 13 {% for define in defines %} | |
| 14 {{define}} | |
| 15 {% endfor %} | |
| 16 | |
| 17 namespace blink { | |
| 18 | |
| 19 {% for agent in agents %} | |
| 20 class {{ agent | agent_name_to_class }}; | |
| 21 {% endfor %} | |
| 22 | |
| 23 class PROBE_EXPORT {{sink_class}} : public GarbageCollected<{{sink_class}}> { | |
| 24 WTF_MAKE_NONCOPYABLE({{sink_class}}); | |
| 25 | |
| 26 public: | |
| 27 {{sink_class}}(); | |
| 28 DECLARE_TRACE(); | |
| 29 | |
| 30 {% for agent in agents %} | |
| 31 {% set class_name = agent | agent_name_to_class %} | |
| 32 {% set getter_name = class_name | to_lower_case %} | |
| 33 bool has{{class_name}}s() const { return m_has{{class_name}}s; } | |
| 34 const HeapHashSet<Member<{{class_name}}>>& {{getter_name}}s() const { return m
_{{getter_name}}s; } | |
| 35 void add{{class_name}}({{class_name}}* agent); | |
| 36 void remove{{class_name}}({{class_name}}* agent); | |
| 37 | |
| 38 {% endfor %} | |
| 39 private: | |
| 40 {% for agent in agents %} | |
| 41 {% set class_name = agent | agent_name_to_class %} | |
| 42 {% set getter_name = class_name | to_lower_case %} | |
| 43 HeapHashSet<Member<{{class_name}}>> m_{{getter_name}}s; | |
| 44 bool m_has{{class_name}}s = false; | |
| 45 {% endfor %} | |
| 46 }; | |
| 47 | |
| 48 } // namespace blink | |
| 49 | |
| 50 #endif // !defined({{sink_class}}_h) | |
| OLD | NEW |