• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// This file is generated by ErrorSupport_h.template.
2
3// Copyright 2016 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#ifndef {{"_".join(config.protocol.namespace)}}_ErrorSupport_h
8#define {{"_".join(config.protocol.namespace)}}_ErrorSupport_h
9
10#include {{format_include(config.protocol.package, "Forward")}}
11
12{% for namespace in config.protocol.namespace %}
13namespace {{namespace}} {
14{% endfor %}
15
16class {{config.lib.export_macro}} ErrorSupport {
17public:
18    ErrorSupport();
19    ~ErrorSupport();
20
21    void push();
22    void setName(const char*);
23    void setName(const String&);
24    void pop();
25    void addError(const char*);
26    void addError(const String&);
27    bool hasErrors();
28    String errors();
29
30private:
31    std::vector<String> m_path;
32    std::vector<String> m_errors;
33};
34
35{% for namespace in config.protocol.namespace %}
36} // namespace {{namespace}}
37{% endfor %}
38
39#endif // !defined({{"_".join(config.protocol.namespace)}}_ErrorSupport_h)
40