• Home
  • Raw
  • Download

Lines Matching refs:Value

31                   static_cast<size_t>(Value::Type::LIST) + 1,
34 std::unique_ptr<Value> CopyWithoutEmptyChildren(const Value& node);
39 std::unique_ptr<Value> CopyListWithoutEmptyChildren(const Value& list) { in CopyListWithoutEmptyChildren()
40 Value copy(Value::Type::LIST); in CopyListWithoutEmptyChildren()
42 std::unique_ptr<Value> child_copy = CopyWithoutEmptyChildren(entry); in CopyListWithoutEmptyChildren()
47 : std::make_unique<Value>(std::move(copy)); in CopyListWithoutEmptyChildren()
54 std::unique_ptr<Value> child_copy = CopyWithoutEmptyChildren(it.value()); in CopyDictionaryWithoutEmptyChildren()
64 std::unique_ptr<Value> CopyWithoutEmptyChildren(const Value& node) { in CopyWithoutEmptyChildren()
66 case Value::Type::LIST: in CopyWithoutEmptyChildren()
69 case Value::Type::DICTIONARY: in CopyWithoutEmptyChildren()
74 return std::make_unique<Value>(node.Clone()); in CopyWithoutEmptyChildren()
81 std::unique_ptr<Value> Value::CreateWithCopiedBuffer(const char* buffer, in CreateWithCopiedBuffer()
83 return std::make_unique<Value>(BlobStorage(buffer, buffer + size)); in CreateWithCopiedBuffer()
87 Value Value::FromUniquePtrValue(std::unique_ptr<Value> val) { in FromUniquePtrValue()
92 std::unique_ptr<Value> Value::ToUniquePtrValue(Value val) { in ToUniquePtrValue()
93 return std::make_unique<Value>(std::move(val)); in ToUniquePtrValue()
96 Value::Value(Value&& that) noexcept { in Value() function in base::Value
100 Value::Value() noexcept : type_(Type::NONE) {} in Value() function in base::Value
102 Value::Value(Type type) : type_(type) { in Value() function in base::Value
132 Value::Value(bool in_bool) : type_(Type::BOOLEAN), bool_value_(in_bool) {} in Value() function in base::Value
134 Value::Value(int in_int) : type_(Type::INTEGER), int_value_(in_int) {} in Value() function in base::Value
136 Value::Value(double in_double) : type_(Type::DOUBLE), double_value_(in_double) { in Value() function in base::Value
144 Value::Value(const char* in_string) : Value(std::string(in_string)) {} in Value() function in base::Value
146 Value::Value(StringPiece in_string) : Value(std::string(in_string)) {} in Value() function in base::Value
148 Value::Value(std::string&& in_string) noexcept in Value() function in base::Value
153 Value::Value(const char16* in_string16) : Value(StringPiece16(in_string16)) {} in Value() function in base::Value
155 Value::Value(StringPiece16 in_string16) : Value(UTF16ToUTF8(in_string16)) {} in Value() function in base::Value
157 Value::Value(const BlobStorage& in_blob) in Value() function in base::Value
160 Value::Value(BlobStorage&& in_blob) noexcept in Value() function in base::Value
163 Value::Value(const DictStorage& in_dict) : type_(Type::DICTIONARY), dict_() { in Value() function in base::Value
167 std::make_unique<Value>(it.second->Clone())); in Value()
171 Value::Value(DictStorage&& in_dict) noexcept in Value() function in base::Value
174 Value::Value(const ListStorage& in_list) : type_(Type::LIST), list_() { in Value() function in base::Value
180 Value::Value(ListStorage&& in_list) noexcept in Value() function in base::Value
183 Value& Value::operator=(Value&& that) noexcept { in operator =()
190 Value Value::Clone() const { in Clone()
193 return Value(); in Clone()
195 return Value(bool_value_); in Clone()
197 return Value(int_value_); in Clone()
199 return Value(double_value_); in Clone()
201 return Value(string_value_); in Clone()
203 return Value(binary_value_); in Clone()
205 return Value(dict_); in Clone()
207 return Value(list_); in Clone()
211 return Value(); in Clone()
214 Value::~Value() { in ~Value()
219 const char* Value::GetTypeName(Value::Type type) { in GetTypeName()
225 bool Value::GetBool() const { in GetBool()
230 int Value::GetInt() const { in GetInt()
235 double Value::GetDouble() const { in GetDouble()
244 const std::string& Value::GetString() const { in GetString()
249 const Value::BlobStorage& Value::GetBlob() const { in GetBlob()
254 Value::ListStorage& Value::GetList() { in GetList()
259 const Value::ListStorage& Value::GetList() const { in GetList()
264 Value* Value::FindKey(StringPiece key) { in FindKey()
265 return const_cast<Value*>(static_cast<const Value*>(this)->FindKey(key)); in FindKey()
268 const Value* Value::FindKey(StringPiece key) const { in FindKey()
276 Value* Value::FindKeyOfType(StringPiece key, Type type) { in FindKeyOfType()
277 return const_cast<Value*>( in FindKeyOfType()
278 static_cast<const Value*>(this)->FindKeyOfType(key, type)); in FindKeyOfType()
281 const Value* Value::FindKeyOfType(StringPiece key, Type type) const { in FindKeyOfType()
282 const Value* result = FindKey(key); in FindKeyOfType()
288 bool Value::RemoveKey(StringPiece key) { in RemoveKey()
294 Value* Value::SetKey(StringPiece key, Value value) { in SetKey()
298 auto val_ptr = std::make_unique<Value>(std::move(value)); in SetKey()
307 Value* Value::SetKey(std::string&& key, Value value) { in SetKey()
311 std::make_unique<Value>(std::move(value))) in SetKey()
315 Value* Value::SetKey(const char* key, Value value) { in SetKey()
319 Value* Value::FindPath(std::initializer_list<StringPiece> path) { in FindPath()
320 return const_cast<Value*>(const_cast<const Value*>(this)->FindPath(path)); in FindPath()
323 Value* Value::FindPath(span<const StringPiece> path) { in FindPath()
324 return const_cast<Value*>(const_cast<const Value*>(this)->FindPath(path)); in FindPath()
327 const Value* Value::FindPath(std::initializer_list<StringPiece> path) const { in FindPath()
332 const Value* Value::FindPath(span<const StringPiece> path) const { in FindPath()
333 const Value* cur = this; in FindPath()
341 Value* Value::FindPathOfType(std::initializer_list<StringPiece> path, in FindPathOfType()
343 return const_cast<Value*>( in FindPathOfType()
344 const_cast<const Value*>(this)->FindPathOfType(path, type)); in FindPathOfType()
347 Value* Value::FindPathOfType(span<const StringPiece> path, Type type) { in FindPathOfType()
348 return const_cast<Value*>( in FindPathOfType()
349 const_cast<const Value*>(this)->FindPathOfType(path, type)); in FindPathOfType()
352 const Value* Value::FindPathOfType(std::initializer_list<StringPiece> path, in FindPathOfType()
358 const Value* Value::FindPathOfType(span<const StringPiece> path, in FindPathOfType()
360 const Value* result = FindPath(path); in FindPathOfType()
366 Value* Value::SetPath(std::initializer_list<StringPiece> path, Value value) { in SetPath()
371 Value* Value::SetPath(span<const StringPiece> path, Value value) { in SetPath()
376 Value* cur = this; in SetPath()
388 found, path_component, std::make_unique<Value>(Type::DICTIONARY)); in SetPath()
401 bool Value::RemovePath(std::initializer_list<StringPiece> path) { in RemovePath()
406 bool Value::RemovePath(span<const StringPiece> path) { in RemovePath()
424 Value::dict_iterator_proxy Value::DictItems() { in DictItems()
429 Value::const_dict_iterator_proxy Value::DictItems() const { in DictItems()
434 size_t Value::DictSize() const { in DictSize()
439 bool Value::DictEmpty() const { in DictEmpty()
444 bool Value::GetAsBoolean(bool* out_value) const { in GetAsBoolean()
452 bool Value::GetAsInteger(int* out_value) const { in GetAsInteger()
460 bool Value::GetAsDouble(double* out_value) const { in GetAsDouble()
472 bool Value::GetAsString(std::string* out_value) const { in GetAsString()
480 bool Value::GetAsString(string16* out_value) const { in GetAsString()
488 bool Value::GetAsString(const Value** out_value) const { in GetAsString()
490 *out_value = static_cast<const Value*>(this); in GetAsString()
496 bool Value::GetAsString(StringPiece* out_value) const { in GetAsString()
504 bool Value::GetAsList(ListValue** out_value) { in GetAsList()
512 bool Value::GetAsList(const ListValue** out_value) const { in GetAsList()
520 bool Value::GetAsDictionary(DictionaryValue** out_value) { in GetAsDictionary()
528 bool Value::GetAsDictionary(const DictionaryValue** out_value) const { in GetAsDictionary()
536 Value* Value::DeepCopy() const { in DeepCopy()
537 return new Value(Clone()); in DeepCopy()
540 std::unique_ptr<Value> Value::CreateDeepCopy() const { in CreateDeepCopy()
541 return std::make_unique<Value>(Clone()); in CreateDeepCopy()
544 bool operator==(const Value& lhs, const Value& rhs) { in operator ==()
549 case Value::Type::NONE: in operator ==()
551 case Value::Type::BOOLEAN: in operator ==()
553 case Value::Type::INTEGER: in operator ==()
555 case Value::Type::DOUBLE: in operator ==()
557 case Value::Type::STRING: in operator ==()
559 case Value::Type::BINARY: in operator ==()
563 case Value::Type::DICTIONARY: in operator ==()
572 case Value::Type::LIST: in operator ==()
580 bool operator!=(const Value& lhs, const Value& rhs) { in operator !=()
584 bool operator<(const Value& lhs, const Value& rhs) { in operator <()
589 case Value::Type::NONE: in operator <()
591 case Value::Type::BOOLEAN: in operator <()
593 case Value::Type::INTEGER: in operator <()
595 case Value::Type::DOUBLE: in operator <()
597 case Value::Type::STRING: in operator <()
599 case Value::Type::BINARY: in operator <()
603 case Value::Type::DICTIONARY: in operator <()
607 [](const Value::DictStorage::value_type& u, in operator <()
608 const Value::DictStorage::value_type& v) { in operator <()
611 case Value::Type::LIST: in operator <()
619 bool operator>(const Value& lhs, const Value& rhs) { in operator >()
623 bool operator<=(const Value& lhs, const Value& rhs) { in operator <=()
627 bool operator>=(const Value& lhs, const Value& rhs) { in operator >=()
631 bool Value::Equals(const Value* other) const { in Equals()
652 void Value::InternalMoveConstructFrom(Value&& that) { in InternalMoveConstructFrom()
682 void Value::InternalCleanup() { in InternalCleanup()
710 std::unique_ptr<Value> value) { in From()
719 DictionaryValue::DictionaryValue() : Value(Type::DICTIONARY) {} in DictionaryValue()
720 DictionaryValue::DictionaryValue(const DictStorage& in_dict) : Value(in_dict) {} in DictionaryValue()
722 : Value(std::move(in_dict)) {} in DictionaryValue()
735 Value* DictionaryValue::Set(StringPiece path, std::unique_ptr<Value> in_value) { in Set()
740 Value* current_dictionary = this; in Set()
746 Value* child_dictionary = in Set()
750 current_dictionary->SetKey(key, Value(Type::DICTIONARY)); in Set()
761 Value* DictionaryValue::SetBoolean(StringPiece path, bool in_value) { in SetBoolean()
762 return Set(path, std::make_unique<Value>(in_value)); in SetBoolean()
765 Value* DictionaryValue::SetInteger(StringPiece path, int in_value) { in SetInteger()
766 return Set(path, std::make_unique<Value>(in_value)); in SetInteger()
769 Value* DictionaryValue::SetDouble(StringPiece path, double in_value) { in SetDouble()
770 return Set(path, std::make_unique<Value>(in_value)); in SetDouble()
773 Value* DictionaryValue::SetString(StringPiece path, StringPiece in_value) { in SetString()
774 return Set(path, std::make_unique<Value>(in_value)); in SetString()
777 Value* DictionaryValue::SetString(StringPiece path, const string16& in_value) { in SetString()
778 return Set(path, std::make_unique<Value>(in_value)); in SetString()
792 Value* DictionaryValue::SetWithoutPathExpansion( in SetWithoutPathExpansion()
794 std::unique_ptr<Value> in_value) { in SetWithoutPathExpansion()
806 const Value** out_value) const { in Get()
826 bool DictionaryValue::Get(StringPiece path, Value** out_value) { in Get()
829 const_cast<const Value**>(out_value)); in Get()
833 const Value* value; in GetBoolean()
841 const Value* value; in GetInteger()
849 const Value* value; in GetDouble()
858 const Value* value; in GetString()
866 const Value* value; in GetString()
889 const Value** out_value) const { in GetBinary()
890 const Value* value; in GetBinary()
901 bool DictionaryValue::GetBinary(StringPiece path, Value** out_value) { in GetBinary()
903 path, const_cast<const Value**>(out_value)); in GetBinary()
908 const Value* value; in GetDictionary()
928 const Value* value; in GetList()
946 const Value** out_value) const { in GetWithoutPathExpansion()
958 Value** out_value) { in GetWithoutPathExpansion()
961 const_cast<const Value**>(out_value)); in GetWithoutPathExpansion()
966 const Value* value; in GetBooleanWithoutPathExpansion()
975 const Value* value; in GetIntegerWithoutPathExpansion()
984 const Value* value; in GetDoubleWithoutPathExpansion()
994 const Value* value; in GetStringWithoutPathExpansion()
1003 const Value* value; in GetStringWithoutPathExpansion()
1013 const Value* value; in GetDictionaryWithoutPathExpansion()
1037 const Value* value; in GetListWithoutPathExpansion()
1057 std::unique_ptr<Value>* out_value) { in Remove()
1075 std::unique_ptr<Value>* out_value) { in RemoveWithoutPathExpansion()
1088 std::unique_ptr<Value>* out_value) { in RemovePath()
1119 const Value* merge_value = &it.value(); in MergeDictionary()
1157 std::unique_ptr<ListValue> ListValue::From(std::unique_ptr<Value> value) { in From()
1166 ListValue::ListValue() : Value(Type::LIST) {} in ListValue()
1167 ListValue::ListValue(const ListStorage& in_list) : Value(in_list) {} in ListValue()
1169 : Value(std::move(in_list)) {} in ListValue()
1179 bool ListValue::Set(size_t index, std::unique_ptr<Value> in_value) { in Set()
1190 bool ListValue::Get(size_t index, const Value** out_value) const { in Get()
1200 bool ListValue::Get(size_t index, Value** out_value) { in Get()
1203 const_cast<const Value**>(out_value)); in Get()
1207 const Value* value; in GetBoolean()
1215 const Value* value; in GetInteger()
1223 const Value* value; in GetDouble()
1231 const Value* value; in GetString()
1239 const Value* value; in GetString()
1248 const Value* value; in GetDictionary()
1266 const Value* value; in GetList()
1283 bool ListValue::Remove(size_t index, std::unique_ptr<Value>* out_value) { in Remove()
1288 *out_value = std::make_unique<Value>(std::move(list_[index])); in Remove()
1294 bool ListValue::Remove(const Value& value, size_t* index) { in Remove()
1308 std::unique_ptr<Value>* out_value) { in Erase()
1310 *out_value = std::make_unique<Value>(std::move(*iter)); in Erase()
1315 void ListValue::Append(std::unique_ptr<Value> in_value) { in Append()
1351 bool ListValue::AppendIfNotPresent(std::unique_ptr<Value> in_value) { in AppendIfNotPresent()
1360 bool ListValue::Insert(size_t index, std::unique_ptr<Value> in_value) { in Insert()
1369 ListValue::const_iterator ListValue::Find(const Value& value) const { in Find()
1390 std::ostream& operator<<(std::ostream& out, const Value& value) { in operator <<()
1396 std::ostream& operator<<(std::ostream& out, const Value::Type& type) { in operator <<()
1400 return out << Value::GetTypeName(type); in operator <<()