| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 void AddProperty(const char* name, bool b) const { | 97 void AddProperty(const char* name, bool b) const { |
| 98 stream_->PrintPropertyBool(name, b); | 98 stream_->PrintPropertyBool(name, b); |
| 99 } | 99 } |
| 100 void AddProperty(const char* name, intptr_t i) const { | 100 void AddProperty(const char* name, intptr_t i) const { |
| 101 stream_->PrintProperty(name, i); | 101 stream_->PrintProperty(name, i); |
| 102 } | 102 } |
| 103 void AddProperty(const char* name, double d) const { | 103 void AddProperty(const char* name, double d) const { |
| 104 stream_->PrintProperty(name, d); | 104 stream_->PrintProperty(name, d); |
| 105 } | 105 } |
| 106 void AddProperty(const char* name, const char* s) const { |
| 107 stream_->PrintProperty(name, s); |
| 108 } |
| 106 void AddProperty(const char* name, const Object& obj, bool ref = true) const { | 109 void AddProperty(const char* name, const Object& obj, bool ref = true) const { |
| 107 stream_->PrintProperty(name, obj, ref); | 110 stream_->PrintProperty(name, obj, ref); |
| 108 } | 111 } |
| 109 void AddPropertyF(const char* name, const char* format, ...) const | 112 void AddPropertyF(const char* name, const char* format, ...) const |
| 110 PRINTF_ATTRIBUTE(3, 4); | 113 PRINTF_ATTRIBUTE(3, 4); |
| 111 | 114 |
| 112 private: | 115 private: |
| 113 JSONStream* stream_; | 116 JSONStream* stream_; |
| 114 | 117 |
| 115 friend class JSONArray; | 118 friend class JSONArray; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 151 |
| 149 friend class JSONObject; | 152 friend class JSONObject; |
| 150 | 153 |
| 151 DISALLOW_ALLOCATION(); | 154 DISALLOW_ALLOCATION(); |
| 152 DISALLOW_COPY_AND_ASSIGN(JSONArray); | 155 DISALLOW_COPY_AND_ASSIGN(JSONArray); |
| 153 }; | 156 }; |
| 154 | 157 |
| 155 } // namespace dart | 158 } // namespace dart |
| 156 | 159 |
| 157 #endif // VM_JSON_STREAM_H_ | 160 #endif // VM_JSON_STREAM_H_ |
| OLD | NEW |