Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: runtime/vm/json_stream.h

Issue 22238002: Expose arguments and options to handlers through JSONStream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/json_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
32 void PrintValue(const Object& o, bool ref = true); 32 void PrintValue(const Object& o, bool ref = true);
33 33
34 void PrintPropertyBool(const char* name, bool b); 34 void PrintPropertyBool(const char* name, bool b);
35 void PrintProperty(const char* name, intptr_t i); 35 void PrintProperty(const char* name, intptr_t i);
36 void PrintProperty(const char* name, double d); 36 void PrintProperty(const char* name, double d);
37 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, ...) 38 void PrintfProperty(const char* name, const char* format, ...)
39 PRINTF_ATTRIBUTE(3, 4); 39 PRINTF_ATTRIBUTE(3, 4);
40 void PrintProperty(const char* name, const Object& o, bool ref = true); 40 void PrintProperty(const char* name, const Object& o, bool ref = true);
41 41
42 void SetArguments(const char** arguments, intptr_t num_arguments);
43 void SetOptions(const char** option_keys, const char** option_values,
44 intptr_t num_options);
45
46 intptr_t num_arguments() const { return num_arguments_; }
47 const char* GetArgument(intptr_t i) {
siva 2013/08/06 00:02:52 const
Cutch 2013/08/06 14:46:11 Done.
48 return arguments_[i];
49 }
50 intptr_t num_options() const { return num_options_; }
51 const char* GetOptionKey(intptr_t i) {
siva 2013/08/06 00:02:52 const
Cutch 2013/08/06 14:46:11 Done.
52 return option_keys_[i];
53 }
54 const char* GetOptionValue(intptr_t i) {
siva 2013/08/06 00:02:52 const
Cutch 2013/08/06 14:46:11 Done.
55 return option_values_[i];
56 }
57
42 private: 58 private:
43 void PrintPropertyName(const char* name); 59 void PrintPropertyName(const char* name);
44 void PrintCommaIfNeeded(); 60 void PrintCommaIfNeeded();
45 bool NeedComma(); 61 bool NeedComma();
46 intptr_t open_objects_; 62 intptr_t open_objects_;
47 TextBuffer* buffer_; 63 TextBuffer* buffer_;
64 const char** arguments_;
65 intptr_t num_arguments_;
66 const char** option_keys_;
67 const char** option_values_;
68 intptr_t num_options_;
48 }; 69 };
49 70
50 } // namespace dart 71 } // namespace dart
51 72
52 #endif // VM_JSON_STREAM_H_ 73 #endif // VM_JSON_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/json_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698