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