OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_JSON_STREAM_H_ | 5 #ifndef VM_JSON_STREAM_H_ |
6 #define VM_JSON_STREAM_H_ | 6 #define VM_JSON_STREAM_H_ |
7 | 7 |
8 #include "include/dart_api.h" // for Dart_Port | 8 #include "include/dart_api.h" // for Dart_Port |
9 #include "platform/json.h" | 9 #include "platform/json.h" |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 void PrintProperty(const char* name, intptr_t i); | 94 void PrintProperty(const char* name, intptr_t i); |
95 void PrintProperty64(const char* name, int64_t i); | 95 void PrintProperty64(const char* name, int64_t i); |
96 void PrintProperty(const char* name, double d); | 96 void PrintProperty(const char* name, double d); |
97 void PrintProperty(const char* name, const char* s); | 97 void PrintProperty(const char* name, const char* s); |
98 void PrintPropertyNoEscape(const char* name, const char* s); | 98 void PrintPropertyNoEscape(const char* name, const char* s); |
99 void PrintfProperty(const char* name, const char* format, ...) | 99 void PrintfProperty(const char* name, const char* format, ...) |
100 PRINTF_ATTRIBUTE(3, 4); | 100 PRINTF_ATTRIBUTE(3, 4); |
101 void PrintProperty(const char* name, const Object& o, bool ref = true); | 101 void PrintProperty(const char* name, const Object& o, bool ref = true); |
102 | 102 |
103 void PrintProperty(const char* name, const DebuggerEvent* event); | 103 void PrintProperty(const char* name, const DebuggerEvent* event); |
| 104 void PrintProperty(const char* name, SourceBreakpoint* bpt); |
104 void PrintProperty(const char* name, Isolate* isolate); | 105 void PrintProperty(const char* name, Isolate* isolate); |
105 void PrintPropertyName(const char* name); | 106 void PrintPropertyName(const char* name); |
106 void PrintCommaIfNeeded(); | 107 void PrintCommaIfNeeded(); |
107 bool NeedComma(); | 108 bool NeedComma(); |
108 | 109 |
109 void AddEscapedUTF8String(const char* s); | 110 void AddEscapedUTF8String(const char* s); |
110 | 111 |
111 intptr_t nesting_level() const { return open_objects_; } | 112 intptr_t nesting_level() const { return open_objects_; } |
112 | 113 |
113 intptr_t open_objects_; | 114 intptr_t open_objects_; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 158 } |
158 void AddPropertyNoEscape(const char* name, const char* s) const { | 159 void AddPropertyNoEscape(const char* name, const char* s) const { |
159 stream_->PrintPropertyNoEscape(name, s); | 160 stream_->PrintPropertyNoEscape(name, s); |
160 } | 161 } |
161 void AddProperty(const char* name, const Object& obj, bool ref = true) const { | 162 void AddProperty(const char* name, const Object& obj, bool ref = true) const { |
162 stream_->PrintProperty(name, obj, ref); | 163 stream_->PrintProperty(name, obj, ref); |
163 } | 164 } |
164 void AddProperty(const char* name, const DebuggerEvent* event) const { | 165 void AddProperty(const char* name, const DebuggerEvent* event) const { |
165 stream_->PrintProperty(name, event); | 166 stream_->PrintProperty(name, event); |
166 } | 167 } |
| 168 void AddProperty(const char* name, SourceBreakpoint* bpt) const { |
| 169 stream_->PrintProperty(name, bpt); |
| 170 } |
167 void AddProperty(const char* name, Isolate* isolate) const { | 171 void AddProperty(const char* name, Isolate* isolate) const { |
168 stream_->PrintProperty(name, isolate); | 172 stream_->PrintProperty(name, isolate); |
169 } | 173 } |
170 void AddPropertyF(const char* name, const char* format, ...) const | 174 void AddPropertyF(const char* name, const char* format, ...) const |
171 PRINTF_ATTRIBUTE(3, 4); | 175 PRINTF_ATTRIBUTE(3, 4); |
172 | 176 |
173 private: | 177 private: |
174 JSONStream* stream_; | 178 JSONStream* stream_; |
175 | 179 |
176 friend class JSONArray; | 180 friend class JSONArray; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 223 |
220 friend class JSONObject; | 224 friend class JSONObject; |
221 | 225 |
222 DISALLOW_ALLOCATION(); | 226 DISALLOW_ALLOCATION(); |
223 DISALLOW_COPY_AND_ASSIGN(JSONArray); | 227 DISALLOW_COPY_AND_ASSIGN(JSONArray); |
224 }; | 228 }; |
225 | 229 |
226 } // namespace dart | 230 } // namespace dart |
227 | 231 |
228 #endif // VM_JSON_STREAM_H_ | 232 #endif // VM_JSON_STREAM_H_ |
OLD | NEW |