| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file specifies a recursive data storage class called Value intended for | 5 // This file specifies a recursive data storage class called Value intended for |
| 6 // storing settings and other persistable data. | 6 // storing settings and other persistable data. |
| 7 // | 7 // |
| 8 // A Value represents something that can be stored in JSON or passed to/from | 8 // A Value represents something that can be stored in JSON or passed to/from |
| 9 // JavaScript. As such, it is NOT a generalized variant type, since only the | 9 // JavaScript. As such, it is NOT a generalized variant type, since only the |
| 10 // types supported by JavaScript/JSON are supported. | 10 // types supported by JavaScript/JSON are supported. |
| 11 // | 11 // |
| 12 // IN PARTICULAR this means that there is no support for int64 or unsigned | 12 // IN PARTICULAR this means that there is no support for int64_t or unsigned |
| 13 // numbers. Writing JSON with such types would violate the spec. If you need | 13 // numbers. Writing JSON with such types would violate the spec. If you need |
| 14 // something like this, either use a double or make a string value containing | 14 // something like this, either use a double or make a string value containing |
| 15 // the number you want. | 15 // the number you want. |
| 16 | 16 |
| 17 #ifndef BASE_VALUES_H_ | 17 #ifndef BASE_VALUES_H_ |
| 18 #define BASE_VALUES_H_ | 18 #define BASE_VALUES_H_ |
| 19 | 19 |
| 20 #include <stddef.h> | 20 #include <stddef.h> |
| 21 #include <stdint.h> |
| 21 | 22 |
| 22 #include <iosfwd> | 23 #include <iosfwd> |
| 23 #include <map> | 24 #include <map> |
| 24 #include <string> | 25 #include <string> |
| 25 #include <utility> | 26 #include <utility> |
| 26 #include <vector> | 27 #include <vector> |
| 27 | 28 |
| 28 #include "base/base_export.h" | 29 #include "base/base_export.h" |
| 29 #include "base/basictypes.h" | |
| 30 #include "base/compiler_specific.h" | 30 #include "base/compiler_specific.h" |
| 31 #include "base/macros.h" |
| 31 #include "base/memory/scoped_ptr.h" | 32 #include "base/memory/scoped_ptr.h" |
| 32 #include "base/strings/string16.h" | 33 #include "base/strings/string16.h" |
| 33 #include "base/strings/string_piece.h" | 34 #include "base/strings/string_piece.h" |
| 34 | 35 |
| 35 namespace base { | 36 namespace base { |
| 36 | 37 |
| 37 class BinaryValue; | 38 class BinaryValue; |
| 38 class DictionaryValue; | 39 class DictionaryValue; |
| 39 class FundamentalValue; | 40 class FundamentalValue; |
| 40 class ListValue; | 41 class ListValue; |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 } | 558 } |
| 558 | 559 |
| 559 BASE_EXPORT inline std::ostream& operator<<(std::ostream& out, | 560 BASE_EXPORT inline std::ostream& operator<<(std::ostream& out, |
| 560 const ListValue& value) { | 561 const ListValue& value) { |
| 561 return out << static_cast<const Value&>(value); | 562 return out << static_cast<const Value&>(value); |
| 562 } | 563 } |
| 563 | 564 |
| 564 } // namespace base | 565 } // namespace base |
| 565 | 566 |
| 566 #endif // BASE_VALUES_H_ | 567 #endif // BASE_VALUES_H_ |
| OLD | NEW |