1c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// Copyright (c) 2014 Google Inc.
2c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// All rights reserved.
3c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org//
4c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// Redistribution and use in source and binary forms, with or without
5c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// modification, are permitted provided that the following conditions are
6c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// met:
7c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org//
8c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org//     * Redistributions of source code must retain the above copyright
9c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// notice, this list of conditions and the following disclaimer.
10c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org//     * Redistributions in binary form must reproduce the above
11c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// copyright notice, this list of conditions and the following disclaimer
12c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// in the documentation and/or other materials provided with the
13c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// distribution.
14c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org//     * Neither the name of Google Inc. nor the names of its
15c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// contributors may be used to endorse or promote products derived from
16c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// this software without specific prior written permission.
17c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org//
18c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org
30c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// dump_object.h: A base class for all mini/micro dump object.
31c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org
32c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org#ifndef GOOGLE_BREAKPAD_PROCESSOR_DUMP_OBJECT_H__
33c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org#define GOOGLE_BREAKPAD_PROCESSOR_DUMP_OBJECT_H__
34c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org
35c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.orgnamespace google_breakpad {
36c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org
37c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org// DumpObject is the base of various mini/micro dump's objects.
38c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.orgclass DumpObject {
39c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org public:
40c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org  DumpObject();
41c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org
42c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org  bool valid() const { return valid_; }
43c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org
44c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org protected:
45c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org  // DumpObjects are not valid when created.  When a subclass populates its own
46c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org  // fields, it can set valid_ to true.  Accessors and mutators may wish to
47c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org  // consider or alter the valid_ state as they interact with objects.
48c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org  bool valid_;
49c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org};
50c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org
51c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org}  // namespace google_breakpad
52c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org
53c5e242b8cd4280db5162e5a3084f2dc9e16e8ffbmmandlis@chromium.org#endif  // GOOGLE_BREAKPAD_PROCESSOR_DUMP_OBJECT_H__
54