Lines Matching refs:value_
284 value_.int_ = 0; in Value()
287 value_.real_ = 0.0; in Value()
290 value_.string_ = 0; in Value()
295 value_.map_ = new ObjectValues(); in Value()
299 value_.array_ = arrayAllocator()->newArray(); in Value()
302 value_.map_ = mapAllocator()->newMap(); in Value()
306 value_.bool_ = false; in Value()
322 value_.uint_ = value; in Value()
333 value_.int_ = value; in Value()
346 value_.int_ = value; in Value()
358 value_.uint_ = value; in Value()
370 value_.real_ = value; in Value()
381 value_.string_ = duplicateStringValue( value ); in Value()
394 value_.string_ = duplicateStringValue( beginValue, in Value()
407 value_.string_ = duplicateStringValue( value.c_str(), in Value()
420 value_.string_ = const_cast<char *>( value.c_str() ); in Value()
433 value_.string_ = duplicateStringValue( value, value.length() ); in Value()
445 value_.bool_ = value; in Value()
464 value_ = other.value_; in Value()
467 if ( other.value_.string_ ) in Value()
469 value_.string_ = duplicateStringValue( other.value_.string_ ); in Value()
473 value_.string_ = 0; in Value()
478 value_.map_ = new ObjectValues( *other.value_.map_ ); in Value()
482 value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ ); in Value()
485 value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ ); in Value()
516 releaseStringValue( value_.string_ ); in ~Value()
521 delete value_.map_; in ~Value()
525 arrayAllocator()->destructArray( value_.array_ ); in ~Value()
528 mapAllocator()->destructMap( value_.map_ ); in ~Value()
553 std::swap( value_, other.value_ ); in swap()
588 return value_.int_ < other.value_.int_; in operator <()
590 return value_.uint_ < other.value_.uint_; in operator <()
592 return value_.real_ < other.value_.real_; in operator <()
594 return value_.bool_ < other.value_.bool_; in operator <()
596 return ( value_.string_ == 0 && other.value_.string_ ) in operator <()
597 || ( other.value_.string_ in operator <()
598 && value_.string_ in operator <()
599 && strcmp( value_.string_, other.value_.string_ ) < 0 ); in operator <()
604 int delta = int( value_.map_->size() - other.value_.map_->size() ); in operator <()
607 return (*value_.map_) < (*other.value_.map_); in operator <()
611 return value_.array_->compare( *(other.value_.array_) ) < 0; in operator <()
613 return value_.map_->compare( *(other.value_.map_) ) < 0; in operator <()
654 return value_.int_ == other.value_.int_; in operator ==()
656 return value_.uint_ == other.value_.uint_; in operator ==()
658 return value_.real_ == other.value_.real_; in operator ==()
660 return value_.bool_ == other.value_.bool_; in operator ==()
662 return ( value_.string_ == other.value_.string_ ) in operator ==()
663 || ( other.value_.string_ in operator ==()
664 && value_.string_ in operator ==()
665 && strcmp( value_.string_, other.value_.string_ ) == 0 ); in operator ==()
669 return value_.map_->size() == other.value_.map_->size() in operator ==()
670 && (*value_.map_) == (*other.value_.map_); in operator ==()
673 return value_.array_->compare( *(other.value_.array_) ) == 0; in operator ==()
675 return value_.map_->compare( *(other.value_.map_) ) == 0; in operator ==()
693 return value_.string_; in asCString()
705 return value_.string_ ? value_.string_ : ""; in asString()
707 return value_.bool_ ? "true" : "false"; in asString()
709 return valueToString( value_.int_ ); in asString()
711 return valueToString( value_.uint_ ); in asString()
713 return valueToString( value_.real_ ); in asString()
735 return Int(value_.int_); in asInt()
738 return Int(value_.uint_); in asInt()
740 JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt, maxInt), "double out of Int range"); in asInt()
741 return Int(value_.real_); in asInt()
745 return value_.bool_ ? 1 : 0; in asInt()
760 return UInt(value_.int_); in asUInt()
763 return UInt(value_.uint_); in asUInt()
765 JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt), "double out of UInt range"); in asUInt()
766 return UInt( value_.real_ ); in asUInt()
770 return value_.bool_ ? 1 : 0; in asUInt()
786 return Int64(value_.int_); in asInt64()
789 return Int64(value_.uint_); in asInt64()
791 JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt64, maxInt64), "double out of Int64 range"); in asInt64()
792 return Int64(value_.real_); in asInt64()
796 return value_.bool_ ? 1 : 0; in asInt64()
811 return UInt64(value_.int_); in asUInt64()
813 return UInt64(value_.uint_); in asUInt64()
815 JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt64), "double out of UInt64 range"); in asUInt64()
816 return UInt64( value_.real_ ); in asUInt64()
820 return value_.bool_ ? 1 : 0; in asUInt64()
857 return static_cast<double>( value_.int_ ); in asDouble()
860 return static_cast<double>( value_.uint_ ); in asDouble()
862 return integerToDouble( value_.uint_ ); in asDouble()
865 return value_.real_; in asDouble()
869 return value_.bool_ ? 1.0 : 0.0; in asDouble()
882 return static_cast<float>( value_.int_ ); in asFloat()
885 return static_cast<float>( value_.uint_ ); in asFloat()
887 return integerToDouble( value_.uint_ ); in asFloat()
890 return static_cast<float>( value_.real_ ); in asFloat()
894 return value_.bool_ ? 1.0f : 0.0f; in asFloat()
907 return value_.bool_; in asBool()
911 return value_.int_ ? true : false; in asBool()
913 return value_.uint_ ? true : false; in asBool()
915 return value_.real_ ? true : false; in asBool()
930 || ( type_ == booleanValue && value_.bool_ == false ) in isConvertibleTo()
932 || ( type_ == arrayValue && value_.map_->size() == 0 ) in isConvertibleTo()
933 || ( type_ == objectValue && value_.map_->size() == 0 ) in isConvertibleTo()
937 || (type_ == realValue && InRange(value_.real_, minInt, maxInt)) in isConvertibleTo()
942 || (type_ == realValue && InRange(value_.real_, 0, maxUInt)) in isConvertibleTo()
985 if ( !value_.map_->empty() ) in size()
987 ObjectValues::const_iterator itLast = value_.map_->end(); in size()
993 return ArrayIndex( value_.map_->size() ); in size()
996 return Int( value_.array_->size() ); in size()
998 return Int( value_.map_->size() ); in size()
1033 value_.map_->clear(); in clear()
1037 value_.array_->clear(); in clear()
1040 value_.map_->clear(); in clear()
1064 value_.map_->erase( index ); in resize()
1069 value_.array_->resize( newSize ); in resize()
1082 ObjectValues::iterator it = value_.map_->lower_bound( key ); in operator []()
1083 if ( it != value_.map_->end() && (*it).first == key ) in operator []()
1087 it = value_.map_->insert( it, defaultValue ); in operator []()
1090 return value_.array_->resolveReference( index ); in operator []()
1111 ObjectValues::const_iterator it = value_.map_->find( key ); in operator []()
1112 if ( it == value_.map_->end() ) in operator []()
1116 Value *value = value_.array_->find( index ); in operator []()
1147 ObjectValues::iterator it = value_.map_->lower_bound( actualKey ); in resolveReference()
1148 if ( it != value_.map_->end() && (*it).first == actualKey ) in resolveReference()
1152 it = value_.map_->insert( it, defaultValue ); in resolveReference()
1156 return value_.map_->resolveReference( key, isStatic ); in resolveReference()
1186 ObjectValues::const_iterator it = value_.map_->find( actualKey ); in operator []()
1187 if ( it == value_.map_->end() ) in operator []()
1191 const Value *value = value_.map_->find( key ); in operator []()
1264 ObjectValues::iterator it = value_.map_->find( actualKey ); in removeMember()
1265 if ( it == value_.map_->end() ) in removeMember()
1268 value_.map_->erase(it); in removeMember()
1271 Value *value = value_.map_->find( key ); in removeMember()
1274 value_.map_.remove( key ); in removeMember()
1327 members.reserve( value_.map_->size() ); in getMemberNames()
1329 ObjectValues::const_iterator it = value_.map_->begin(); in getMemberNames()
1330 ObjectValues::const_iterator itEnd = value_.map_->end(); in getMemberNames()
1336 value_.map_->makeBeginIterator( it ); in getMemberNames()
1337 value_.map_->makeEndIterator( itEnd ); in getMemberNames()
1395 return value_.int_ >= minInt && value_.int_ <= maxInt; in isInt()
1397 return value_.uint_ <= UInt(maxInt); in isInt()
1399 return value_.real_ >= minInt && in isInt()
1400 value_.real_ <= maxInt && in isInt()
1401 IsIntegral(value_.real_); in isInt()
1415 return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt); in isUInt()
1417 return value_.uint_ <= maxUInt; in isUInt()
1419 return value_.real_ >= 0 && in isUInt()
1420 value_.real_ <= maxUInt && in isUInt()
1421 IsIntegral(value_.real_); in isUInt()
1437 return value_.uint_ <= UInt64(maxInt64); in isInt64()
1442 return value_.real_ >= double(minInt64) && in isInt64()
1443 value_.real_ < double(maxInt64) && in isInt64()
1444 IsIntegral(value_.real_); in isInt64()
1459 return value_.int_ >= 0; in isUInt64()
1466 return value_.real_ >= 0 && in isUInt64()
1467 value_.real_ < maxUInt64AsDouble && in isUInt64()
1468 IsIntegral(value_.real_); in isUInt64()
1571 if ( value_.array_ ) in begin()
1574 value_.array_->makeBeginIterator( it ); in begin()
1579 if ( value_.map_ ) in begin()
1582 value_.map_->makeBeginIterator( it ); in begin()
1589 if ( value_.map_ ) in begin()
1590 return const_iterator( value_.map_->begin() ); in begin()
1606 if ( value_.array_ ) in end()
1609 value_.array_->makeEndIterator( it ); in end()
1614 if ( value_.map_ ) in end()
1617 value_.map_->makeEndIterator( it ); in end()
1624 if ( value_.map_ ) in end()
1625 return const_iterator( value_.map_->end() ); in end()
1642 if ( value_.array_ ) in begin()
1645 value_.array_->makeBeginIterator( it ); in begin()
1650 if ( value_.map_ ) in begin()
1653 value_.map_->makeBeginIterator( it ); in begin()
1660 if ( value_.map_ ) in begin()
1661 return iterator( value_.map_->begin() ); in begin()
1677 if ( value_.array_ ) in end()
1680 value_.array_->makeEndIterator( it ); in end()
1685 if ( value_.map_ ) in end()
1688 value_.map_->makeEndIterator( it ); in end()
1695 if ( value_.map_ ) in end()
1696 return iterator( value_.map_->end() ); in end()