| 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 "platform/json.h" | 8 #include "platform/json.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 void OpenArray(const char* property_name = NULL); | 52 void OpenArray(const char* property_name = NULL); |
| 53 void CloseArray(); | 53 void CloseArray(); |
| 54 | 54 |
| 55 void PrintValueBool(bool b); | 55 void PrintValueBool(bool b); |
| 56 void PrintValue(intptr_t i); | 56 void PrintValue(intptr_t i); |
| 57 void PrintValue(double d); | 57 void PrintValue(double d); |
| 58 void PrintValue(const char* s); | 58 void PrintValue(const char* s); |
| 59 void PrintfValue(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); | 59 void PrintfValue(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); |
| 60 void PrintValue(const Object& o, bool ref = true); | 60 void PrintValue(const Object& o, bool ref = true); |
| 61 void PrintValue(const Field& f, const Instance& instance, bool ref = true); | 61 void PrintValue(const Field& f, const Instance& instance, bool ref = true); |
| 62 void PrintValue(const SourceBreakpoint* bpt); | 62 void PrintValue(SourceBreakpoint* bpt); |
| 63 | 63 |
| 64 void PrintPropertyBool(const char* name, bool b); | 64 void PrintPropertyBool(const char* name, bool b); |
| 65 void PrintProperty(const char* name, intptr_t i); | 65 void PrintProperty(const char* name, intptr_t i); |
| 66 void PrintProperty(const char* name, double d); | 66 void PrintProperty(const char* name, double d); |
| 67 void PrintProperty(const char* name, const char* s); | 67 void PrintProperty(const char* name, const char* s); |
| 68 void PrintfProperty(const char* name, const char* format, ...) | 68 void PrintfProperty(const char* name, const char* format, ...) |
| 69 PRINTF_ATTRIBUTE(3, 4); | 69 PRINTF_ATTRIBUTE(3, 4); |
| 70 void PrintProperty(const char* name, const Object& o, bool ref = true); | 70 void PrintProperty(const char* name, const Object& o, bool ref = true); |
| 71 | 71 |
| 72 void PrintPropertyName(const char* name); | 72 void PrintPropertyName(const char* name); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 void AddValue(const char* s) const { stream_->PrintValue(s); } | 151 void AddValue(const char* s) const { stream_->PrintValue(s); } |
| 152 void AddValue(const Object& obj, bool ref = true) const { | 152 void AddValue(const Object& obj, bool ref = true) const { |
| 153 stream_->PrintValue(obj, ref); | 153 stream_->PrintValue(obj, ref); |
| 154 } | 154 } |
| 155 // Print a field bound to a value. Value is looked up from 'instance'. | 155 // Print a field bound to a value. Value is looked up from 'instance'. |
| 156 void AddValue(const Field& field, | 156 void AddValue(const Field& field, |
| 157 const Instance& instance, | 157 const Instance& instance, |
| 158 bool ref = true) const { | 158 bool ref = true) const { |
| 159 stream_->PrintValue(field, instance, ref); | 159 stream_->PrintValue(field, instance, ref); |
| 160 } | 160 } |
| 161 void AddValue(const SourceBreakpoint* bpt) const { | 161 void AddValue(SourceBreakpoint* bpt) const { |
| 162 stream_->PrintValue(bpt); | 162 stream_->PrintValue(bpt); |
| 163 } | 163 } |
| 164 void AddValueF(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3); | 164 void AddValueF(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3); |
| 165 | 165 |
| 166 private: | 166 private: |
| 167 JSONStream* stream_; | 167 JSONStream* stream_; |
| 168 | 168 |
| 169 friend class JSONObject; | 169 friend class JSONObject; |
| 170 | 170 |
| 171 DISALLOW_ALLOCATION(); | 171 DISALLOW_ALLOCATION(); |
| 172 DISALLOW_COPY_AND_ASSIGN(JSONArray); | 172 DISALLOW_COPY_AND_ASSIGN(JSONArray); |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace dart | 175 } // namespace dart |
| 176 | 176 |
| 177 #endif // VM_JSON_STREAM_H_ | 177 #endif // VM_JSON_STREAM_H_ |
| OLD | NEW |