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 RUNTIME_VM_JSON_STREAM_H_ | 5 #ifndef RUNTIME_VM_JSON_STREAM_H_ |
6 #define RUNTIME_VM_JSON_STREAM_H_ | 6 #define RUNTIME_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/text_buffer.h" | 9 #include "platform/text_buffer.h" |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 void PrintfValue(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); | 177 void PrintfValue(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); |
178 void PrintValue(const Object& o, bool ref = true); | 178 void PrintValue(const Object& o, bool ref = true); |
179 void PrintValue(Breakpoint* bpt); | 179 void PrintValue(Breakpoint* bpt); |
180 void PrintValue(TokenPosition tp); | 180 void PrintValue(TokenPosition tp); |
181 void PrintValue(const ServiceEvent* event); | 181 void PrintValue(const ServiceEvent* event); |
182 void PrintValue(Metric* metric); | 182 void PrintValue(Metric* metric); |
183 void PrintValue(MessageQueue* queue); | 183 void PrintValue(MessageQueue* queue); |
184 void PrintValue(Isolate* isolate, bool ref = true); | 184 void PrintValue(Isolate* isolate, bool ref = true); |
185 void PrintValue(ThreadRegistry* reg); | 185 void PrintValue(ThreadRegistry* reg); |
186 void PrintValue(Thread* thread); | 186 void PrintValue(Thread* thread); |
187 void PrintValue(Zone* zone); | |
188 bool PrintValueStr(const String& s, intptr_t offset, intptr_t count); | 187 bool PrintValueStr(const String& s, intptr_t offset, intptr_t count); |
189 void PrintValue(const TimelineEvent* timeline_event); | 188 void PrintValue(const TimelineEvent* timeline_event); |
190 void PrintValue(const TimelineEventBlock* timeline_event_block); | 189 void PrintValue(const TimelineEventBlock* timeline_event_block); |
191 void PrintValueVM(bool ref = true); | 190 void PrintValueVM(bool ref = true); |
192 | 191 |
193 void PrintServiceId(const Object& o); | 192 void PrintServiceId(const Object& o); |
194 void PrintPropertyBool(const char* name, bool b); | 193 void PrintPropertyBool(const char* name, bool b); |
195 void PrintProperty(const char* name, intptr_t i); | 194 void PrintProperty(const char* name, intptr_t i); |
196 void PrintProperty64(const char* name, int64_t i); | 195 void PrintProperty64(const char* name, int64_t i); |
197 void PrintPropertyTimeMillis(const char* name, int64_t millis); | 196 void PrintPropertyTimeMillis(const char* name, int64_t millis); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 void AddValue(double d) const { stream_->PrintValue(d); } | 396 void AddValue(double d) const { stream_->PrintValue(d); } |
398 void AddValue(const char* s) const { stream_->PrintValue(s); } | 397 void AddValue(const char* s) const { stream_->PrintValue(s); } |
399 void AddValue(const Object& obj, bool ref = true) const { | 398 void AddValue(const Object& obj, bool ref = true) const { |
400 stream_->PrintValue(obj, ref); | 399 stream_->PrintValue(obj, ref); |
401 } | 400 } |
402 void AddValue(Isolate* isolate, bool ref = true) const { | 401 void AddValue(Isolate* isolate, bool ref = true) const { |
403 stream_->PrintValue(isolate, ref); | 402 stream_->PrintValue(isolate, ref); |
404 } | 403 } |
405 void AddValue(ThreadRegistry* reg) const { stream_->PrintValue(reg); } | 404 void AddValue(ThreadRegistry* reg) const { stream_->PrintValue(reg); } |
406 void AddValue(Thread* thread) const { stream_->PrintValue(thread); } | 405 void AddValue(Thread* thread) const { stream_->PrintValue(thread); } |
407 void AddValue(Zone* zone) const { stream_->PrintValue(zone); } | |
408 void AddValue(Breakpoint* bpt) const { stream_->PrintValue(bpt); } | 406 void AddValue(Breakpoint* bpt) const { stream_->PrintValue(bpt); } |
409 void AddValue(TokenPosition tp) const { stream_->PrintValue(tp); } | 407 void AddValue(TokenPosition tp) const { stream_->PrintValue(tp); } |
410 void AddValue(const ServiceEvent* event) const { stream_->PrintValue(event); } | 408 void AddValue(const ServiceEvent* event) const { stream_->PrintValue(event); } |
411 void AddValue(Metric* metric) const { stream_->PrintValue(metric); } | 409 void AddValue(Metric* metric) const { stream_->PrintValue(metric); } |
412 void AddValue(MessageQueue* queue) const { stream_->PrintValue(queue); } | 410 void AddValue(MessageQueue* queue) const { stream_->PrintValue(queue); } |
413 void AddValue(const TimelineEvent* timeline_event) const { | 411 void AddValue(const TimelineEvent* timeline_event) const { |
414 stream_->PrintValue(timeline_event); | 412 stream_->PrintValue(timeline_event); |
415 } | 413 } |
416 void AddValue(const TimelineEventBlock* timeline_event_block) const { | 414 void AddValue(const TimelineEventBlock* timeline_event_block) const { |
417 stream_->PrintValue(timeline_event_block); | 415 stream_->PrintValue(timeline_event_block); |
418 } | 416 } |
419 void AddValueVM(bool ref = true) const { stream_->PrintValueVM(ref); } | 417 void AddValueVM(bool ref = true) const { stream_->PrintValueVM(ref); } |
420 void AddValueF(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3); | 418 void AddValueF(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3); |
421 | 419 |
422 private: | 420 private: |
423 JSONStream* stream_; | 421 JSONStream* stream_; |
424 | 422 |
425 friend class JSONObject; | 423 friend class JSONObject; |
426 | 424 |
427 DISALLOW_ALLOCATION(); | 425 DISALLOW_ALLOCATION(); |
428 DISALLOW_COPY_AND_ASSIGN(JSONArray); | 426 DISALLOW_COPY_AND_ASSIGN(JSONArray); |
429 }; | 427 }; |
430 | 428 |
431 } // namespace dart | 429 } // namespace dart |
432 | 430 |
433 #endif // RUNTIME_VM_JSON_STREAM_H_ | 431 #endif // RUNTIME_VM_JSON_STREAM_H_ |
OLD | NEW |