OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_TRACING_TRACED_VALUE_H_ | 5 #ifndef V8_TRACING_TRACED_VALUE_H_ |
6 #define V8_TRACING_TRACED_VALUE_H_ | 6 #define V8_TRACING_TRACED_VALUE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 // These methods assume that |name| is a long lived "quoted" string. | 28 // These methods assume that |name| is a long lived "quoted" string. |
29 void SetInteger(const char* name, int value); | 29 void SetInteger(const char* name, int value); |
30 void SetDouble(const char* name, double value); | 30 void SetDouble(const char* name, double value); |
31 void SetBoolean(const char* name, bool value); | 31 void SetBoolean(const char* name, bool value); |
32 void SetString(const char* name, const std::string& value); | 32 void SetString(const char* name, const std::string& value); |
33 void BeginDictionary(const char* name); | 33 void BeginDictionary(const char* name); |
34 void BeginArray(const char* name); | 34 void BeginArray(const char* name); |
35 | 35 |
36 void AppendInteger(int); | 36 void AppendInteger(int); |
37 void AppendLongInteger(int64_t); | |
38 void AppendDouble(double); | 37 void AppendDouble(double); |
39 void AppendBoolean(bool); | 38 void AppendBoolean(bool); |
40 void AppendString(const std::string&); | 39 void AppendString(const std::string&); |
41 void BeginArray(); | 40 void BeginArray(); |
42 void BeginDictionary(); | 41 void BeginDictionary(); |
43 | 42 |
44 // ConvertableToTraceFormat implementation. | 43 // ConvertableToTraceFormat implementation. |
45 void AppendAsTraceFormat(std::string* out) const override; | 44 void AppendAsTraceFormat(std::string* out) const override; |
46 | 45 |
47 private: | 46 private: |
(...skipping 10 matching lines...) Expand all Loading... |
58 std::string data_; | 57 std::string data_; |
59 bool first_item_; | 58 bool first_item_; |
60 | 59 |
61 DISALLOW_COPY_AND_ASSIGN(TracedValue); | 60 DISALLOW_COPY_AND_ASSIGN(TracedValue); |
62 }; | 61 }; |
63 | 62 |
64 } // namespace tracing | 63 } // namespace tracing |
65 } // namespace v8 | 64 } // namespace v8 |
66 | 65 |
67 #endif // V8_TRACING_TRACED_VALUE_H_ | 66 #endif // V8_TRACING_TRACED_VALUE_H_ |
OLD | NEW |