| 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 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 void OpenObject(const char* property_name = NULL); | 21 void OpenObject(const char* property_name = NULL); |
| 22 void CloseObject(); | 22 void CloseObject(); |
| 23 | 23 |
| 24 void OpenArray(const char* property_name = NULL); | 24 void OpenArray(const char* property_name = NULL); |
| 25 void CloseArray(); | 25 void CloseArray(); |
| 26 | 26 |
| 27 void PrintValueBool(bool b); | 27 void PrintValueBool(bool b); |
| 28 void PrintValue(intptr_t i); | 28 void PrintValue(intptr_t i); |
| 29 void PrintValue(double d); | 29 void PrintValue(double d); |
| 30 void PrintValue(const char* s); | 30 void PrintValue(const char* s); |
| 31 void PrintfValue(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); |
| 31 void PrintValue(const Object& o, bool ref = true); | 32 void PrintValue(const Object& o, bool ref = true); |
| 32 | 33 |
| 33 void PrintPropertyBool(const char* name, bool b); | 34 void PrintPropertyBool(const char* name, bool b); |
| 34 void PrintProperty(const char* name, intptr_t i); | 35 void PrintProperty(const char* name, intptr_t i); |
| 35 void PrintProperty(const char* name, double d); | 36 void PrintProperty(const char* name, double d); |
| 36 void PrintProperty(const char* name, const char* s); | 37 void PrintProperty(const char* name, const char* s); |
| 38 void PrintfProperty(const char* name, const char* format, ...) |
| 39 PRINTF_ATTRIBUTE(3, 4); |
| 37 void PrintProperty(const char* name, const Object& o, bool ref = true); | 40 void PrintProperty(const char* name, const Object& o, bool ref = true); |
| 38 | 41 |
| 39 private: | 42 private: |
| 40 void PrintPropertyName(const char* name); | 43 void PrintPropertyName(const char* name); |
| 41 void PrintCommaIfNeeded(); | 44 void PrintCommaIfNeeded(); |
| 42 bool NeedComma(); | 45 bool NeedComma(); |
| 43 intptr_t open_objects_; | 46 intptr_t open_objects_; |
| 44 TextBuffer* buffer_; | 47 TextBuffer* buffer_; |
| 45 }; | 48 }; |
| 46 | 49 |
| 47 } // namespace dart | 50 } // namespace dart |
| 48 | 51 |
| 49 #endif // VM_JSON_STREAM_H_ | 52 #endif // VM_JSON_STREAM_H_ |
| OLD | NEW |