| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 intptr_t num_options() const { return num_options_; } | 49 intptr_t num_options() const { return num_options_; } |
| 50 const char* GetOptionKey(intptr_t i) const { | 50 const char* GetOptionKey(intptr_t i) const { |
| 51 return option_keys_[i]; | 51 return option_keys_[i]; |
| 52 } | 52 } |
| 53 const char* GetOptionValue(intptr_t i) const { | 53 const char* GetOptionValue(intptr_t i) const { |
| 54 return option_values_[i]; | 54 return option_values_[i]; |
| 55 } | 55 } |
| 56 | 56 |
| 57 const char* LookupOption(const char* key) const; | 57 const char* LookupOption(const char* key) const; |
| 58 | 58 |
| 59 bool HasOption(const char* key) const; |
| 60 |
| 61 // Returns true if there is an option with key and value, false |
| 62 // otherwise. |
| 63 bool OptionIs(const char* key, const char* value) const; |
| 64 |
| 59 const char* command() const { return command_; } | 65 const char* command() const { return command_; } |
| 60 const char** arguments() const { return arguments_; } | 66 const char** arguments() const { return arguments_; } |
| 61 const char** option_keys() const { return option_keys_; } | 67 const char** option_keys() const { return option_keys_; } |
| 62 const char** option_values() const { return option_values_; } | 68 const char** option_values() const { return option_values_; } |
| 63 | 69 |
| 64 private: | 70 private: |
| 65 void Clear(); | 71 void Clear(); |
| 66 | 72 |
| 67 void OpenObject(const char* property_name = NULL); | 73 void OpenObject(const char* property_name = NULL); |
| 68 void CloseObject(); | 74 void CloseObject(); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 200 |
| 195 friend class JSONObject; | 201 friend class JSONObject; |
| 196 | 202 |
| 197 DISALLOW_ALLOCATION(); | 203 DISALLOW_ALLOCATION(); |
| 198 DISALLOW_COPY_AND_ASSIGN(JSONArray); | 204 DISALLOW_COPY_AND_ASSIGN(JSONArray); |
| 199 }; | 205 }; |
| 200 | 206 |
| 201 } // namespace dart | 207 } // namespace dart |
| 202 | 208 |
| 203 #endif // VM_JSON_STREAM_H_ | 209 #endif // VM_JSON_STREAM_H_ |
| OLD | NEW |