Lines Matching refs:value_
294 value_.int_ = 0;
297 value_.real_ = 0.0;
300 value_.string_ = 0;
305 value_.map_ = new ObjectValues();
309 value_.array_ = arrayAllocator()->newArray();
312 value_.map_ = mapAllocator()->newMap();
316 value_.bool_ = false;
332 value_.uint_ = value;
343 value_.int_ = value;
356 value_.int_ = value;
368 value_.uint_ = value;
380 value_.real_ = value;
391 value_.string_ = duplicateStringValue( value );
404 value_.string_ = duplicateStringValue( beginValue,
417 value_.string_ = duplicateStringValue( value.c_str(),
430 value_.string_ = const_cast<char *>( value.c_str() );
443 value_.string_ = duplicateStringValue( value, value.length() );
455 value_.bool_ = value;
474 value_ = other.value_;
477 if ( other.value_.string_ )
479 value_.string_ = duplicateStringValue( other.value_.string_ );
483 value_.string_ = 0;
488 value_.map_ = new ObjectValues( *other.value_.map_ );
492 value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ );
495 value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ );
526 releaseStringValue( value_.string_ );
531 delete value_.map_;
535 arrayAllocator()->destructArray( value_.array_ );
538 mapAllocator()->destructMap( value_.map_ );
563 std::swap( value_, other.value_ );
598 return value_.int_ < other.value_.int_;
600 return value_.uint_ < other.value_.uint_;
602 return value_.real_ < other.value_.real_;
604 return value_.bool_ < other.value_.bool_;
606 return ( value_.string_ == 0 && other.value_.string_ )
607 || ( other.value_.string_
608 && value_.string_
609 && strcmp( value_.string_, other.value_.string_ ) < 0 );
614 int delta = int( value_.map_->size() - other.value_.map_->size() );
617 return (*value_.map_) < (*other.value_.map_);
621 return value_.array_->compare( *(other.value_.array_) ) < 0;
623 return value_.map_->compare( *(other.value_.map_) ) < 0;
664 return value_.int_ == other.value_.int_;
666 return value_.uint_ == other.value_.uint_;
668 return value_.real_ == other.value_.real_;
670 return value_.bool_ == other.value_.bool_;
672 return ( value_.string_ == other.value_.string_ )
673 || ( other.value_.string_
674 && value_.string_
675 && strcmp( value_.string_, other.value_.string_ ) == 0 );
679 return value_.map_->size() == other.value_.map_->size()
680 && (*value_.map_) == (*other.value_.map_);
683 return value_.array_->compare( *(other.value_.array_) ) == 0;
685 return value_.map_->compare( *(other.value_.map_) ) == 0;
703 return value_.string_;
715 return value_.string_ ? value_.string_ : "";
717 return value_.bool_ ? "true" : "false";
719 return valueToString( value_.int_ );
721 return valueToString( value_.uint_ );
723 return valueToString( value_.real_ );
745 return Int(value_.int_);
748 return Int(value_.uint_);
750 JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt, maxInt), "double out of Int range");
751 return Int(value_.real_);
755 return value_.bool_ ? 1 : 0;
770 return UInt(value_.int_);
773 return UInt(value_.uint_);
775 JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt), "double out of UInt range");
776 return UInt( value_.real_ );
780 return value_.bool_ ? 1 : 0;
796 return Int64(value_.int_);
799 return Int64(value_.uint_);
801 JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt64, maxInt64), "double out of Int64 range");
802 return Int64(value_.real_);
806 return value_.bool_ ? 1 : 0;
821 return UInt64(value_.int_);
823 return UInt64(value_.uint_);
825 JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt64), "double out of UInt64 range");
826 return UInt64( value_.real_ );
830 return value_.bool_ ? 1 : 0;
867 return static_cast<double>( value_.int_ );
870 return static_cast<double>( value_.uint_ );
872 return integerToDouble( value_.uint_ );
875 return value_.real_;
879 return value_.bool_ ? 1.0 : 0.0;
892 return static_cast<float>( value_.int_ );
895 return static_cast<float>( value_.uint_ );
897 return integerToDouble( value_.uint_ );
900 return static_cast<float>( value_.real_ );
904 return value_.bool_ ? 1.0f : 0.0f;
917 return value_.bool_;
921 return value_.int_ ? true : false;
923 return value_.uint_ ? true : false;
925 return value_.real_ ? true : false;
940 || ( type_ == booleanValue && value_.bool_ == false )
942 || ( type_ == arrayValue && value_.map_->size() == 0 )
943 || ( type_ == objectValue && value_.map_->size() == 0 )
947 || (type_ == realValue && InRange(value_.real_, minInt, maxInt))
952 || (type_ == realValue && InRange(value_.real_, 0, maxUInt))
995 if ( !value_.map_->empty() )
997 ObjectValues::const_iterator itLast = value_.map_->end();
1003 return ArrayIndex( value_.map_->size() );
1006 return Int( value_.array_->size() );
1008 return Int( value_.map_->size() );
1043 value_.map_->clear();
1047 value_.array_->clear();
1050 value_.map_->clear();
1074 value_.map_->erase( index );
1079 value_.array_->resize( newSize );
1092 ObjectValues::iterator it = value_.map_->lower_bound( key );
1093 if ( it != value_.map_->end() && (*it).first == key )
1097 it = value_.map_->insert( it, defaultValue );
1100 return value_.array_->resolveReference( index );
1121 ObjectValues::const_iterator it = value_.map_->find( key );
1122 if ( it == value_.map_->end() )
1126 Value *value = value_.array_->find( index );
1157 ObjectValues::iterator it = value_.map_->lower_bound( actualKey );
1158 if ( it != value_.map_->end() && (*it).first == actualKey )
1162 it = value_.map_->insert( it, defaultValue );
1166 return value_.map_->resolveReference( key, isStatic );
1196 ObjectValues::const_iterator it = value_.map_->find( actualKey );
1197 if ( it == value_.map_->end() )
1201 const Value *value = value_.map_->find( key );
1274 ObjectValues::iterator it = value_.map_->find( actualKey );
1275 if ( it == value_.map_->end() )
1278 value_.map_->erase(it);
1281 Value *value = value_.map_->find( key );
1284 value_.map_.remove( key );
1337 members.reserve( value_.map_->size() );
1339 ObjectValues::const_iterator it = value_.map_->begin();
1340 ObjectValues::const_iterator itEnd = value_.map_->end();
1346 value_.map_->makeBeginIterator( it );
1347 value_.map_->makeEndIterator( itEnd );
1361 // CppTL::Enum::keys( *(value_.map_), CppTL::Type<const CZString &>() ),
1372 // return CppTL::Enum::anyValues( *(value_.map_),
1405 return value_.int_ >= minInt && value_.int_ <= maxInt;
1407 return value_.uint_ <= UInt(maxInt);
1409 return value_.real_ >= minInt &&
1410 value_.real_ <= maxInt &&
1411 IsIntegral(value_.real_);
1425 return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt);
1427 return value_.uint_ <= maxUInt;
1429 return value_.real_ >= 0 &&
1430 value_.real_ <= maxUInt &&
1431 IsIntegral(value_.real_);
1447 return value_.uint_ <= UInt64(maxInt64);
1452 return value_.real_ >= double(minInt64) &&
1453 value_.real_ < double(maxInt64) &&
1454 IsIntegral(value_.real_);
1469 return value_.int_ >= 0;
1476 return value_.real_ >= 0 &&
1477 value_.real_ < maxUInt64AsDouble &&
1478 IsIntegral(value_.real_);
1581 if ( value_.array_ )
1584 value_.array_->makeBeginIterator( it );
1589 if ( value_.map_ )
1592 value_.map_->makeBeginIterator( it );
1599 if ( value_.map_ )
1600 return const_iterator( value_.map_->begin() );
1616 if ( value_.array_ )
1619 value_.array_->makeEndIterator( it );
1624 if ( value_.map_ )
1627 value_.map_->makeEndIterator( it );
1634 if ( value_.map_ )
1635 return const_iterator( value_.map_->end() );
1652 if ( value_.array_ )
1655 value_.array_->makeBeginIterator( it );
1660 if ( value_.map_ )
1663 value_.map_->makeBeginIterator( it );
1670 if ( value_.map_ )
1671 return iterator( value_.map_->begin() );
1687 if ( value_.array_ )
1690 value_.array_->makeEndIterator( it );
1695 if ( value_.map_ )
1698 value_.map_->makeEndIterator( it );
1705 if ( value_.map_ )
1706 return iterator( value_.map_->end() );