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. |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include <string> | 24 #include <string> |
25 #include <utility> | 25 #include <utility> |
26 #include <vector> | 26 #include <vector> |
27 | 27 |
28 #include "base/base_export.h" | 28 #include "base/base_export.h" |
29 #include "base/basictypes.h" | 29 #include "base/basictypes.h" |
30 #include "base/compiler_specific.h" | 30 #include "base/compiler_specific.h" |
31 #include "base/memory/scoped_ptr.h" | 31 #include "base/memory/scoped_ptr.h" |
32 #include "base/strings/string16.h" | 32 #include "base/strings/string16.h" |
33 | 33 |
34 // This file declares "using base::Value", etc. at the bottom, so that | |
35 // current code can use these classes without the base namespace. In | |
36 // new code, please always use base::Value, etc. or add your own | |
37 // "using" declaration. | |
38 // http://crbug.com/88666 | |
39 namespace base { | 34 namespace base { |
40 | 35 |
41 class DictionaryValue; | 36 class DictionaryValue; |
42 class FundamentalValue; | 37 class FundamentalValue; |
43 class ListValue; | 38 class ListValue; |
44 class StringValue; | 39 class StringValue; |
45 class Value; | 40 class Value; |
46 | 41 |
47 typedef std::vector<Value*> ValueVector; | 42 typedef std::vector<Value*> ValueVector; |
48 typedef std::map<std::string, Value*> ValueMap; | 43 typedef std::map<std::string, Value*> ValueMap; |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 return out << static_cast<const Value&>(value); | 516 return out << static_cast<const Value&>(value); |
522 } | 517 } |
523 | 518 |
524 BASE_EXPORT inline std::ostream& operator<<(std::ostream& out, | 519 BASE_EXPORT inline std::ostream& operator<<(std::ostream& out, |
525 const ListValue& value) { | 520 const ListValue& value) { |
526 return out << static_cast<const Value&>(value); | 521 return out << static_cast<const Value&>(value); |
527 } | 522 } |
528 | 523 |
529 } // namespace base | 524 } // namespace base |
530 | 525 |
531 // http://crbug.com/88666 | |
532 using base::DictionaryValue; | |
533 using base::ListValue; | |
534 using base::StringValue; | |
535 using base::Value; | |
536 | |
537 #endif // BASE_VALUES_H_ | 526 #endif // BASE_VALUES_H_ |
OLD | NEW |