Lines Matching refs:value_
288 value_.int_ = 0;
291 value_.real_ = 0.0;
294 value_.string_ = 0;
299 value_.map_ = new ObjectValues();
303 value_.array_ = arrayAllocator()->newArray();
306 value_.map_ = mapAllocator()->newMap();
310 value_.bool_ = false;
326 value_.uint_ = value;
337 value_.int_ = value;
350 value_.int_ = value;
362 value_.uint_ = value;
374 value_.real_ = value;
385 value_.string_ = duplicateStringValue( value );
398 value_.string_ = duplicateStringValue( beginValue,
411 value_.string_ = duplicateStringValue( value.c_str(),
424 value_.string_ = const_cast<char *>( value.c_str() );
437 value_.string_ = duplicateStringValue( value, value.length() );
449 value_.bool_ = value;
468 value_ = other.value_;
471 if ( other.value_.string_ )
473 value_.string_ = duplicateStringValue( other.value_.string_ );
477 value_.string_ = 0;
482 value_.map_ = new ObjectValues( *other.value_.map_ );
486 value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ );
489 value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ );
520 releaseStringValue( value_.string_ );
525 delete value_.map_;
529 arrayAllocator()->destructArray( value_.array_ );
532 mapAllocator()->destructMap( value_.map_ );
557 std::swap( value_, other.value_ );
592 return value_.int_ < other.value_.int_;
594 return value_.uint_ < other.value_.uint_;
596 return value_.real_ < other.value_.real_;
598 return value_.bool_ < other.value_.bool_;
600 return ( value_.string_ == 0 && other.value_.string_ )
601 || ( other.value_.string_
602 && value_.string_
603 && strcmp( value_.string_, other.value_.string_ ) < 0 );
608 int delta = int( value_.map_->size() - other.value_.map_->size() );
611 return (*value_.map_) < (*other.value_.map_);
615 return value_.array_->compare( *(other.value_.array_) ) < 0;
617 return value_.map_->compare( *(other.value_.map_) ) < 0;
658 return value_.int_ == other.value_.int_;
660 return value_.uint_ == other.value_.uint_;
662 return value_.real_ == other.value_.real_;
664 return value_value_.bool_;
666 return ( value_.string_ == other.value_.string_ )
667 || ( other.value_.string_
668 && value_.string_
669 && strcmp( value_.string_, other.value_.string_ ) == 0 );
673 return value_.map_->size() == other.value_.map_->size()
674 && (*value_.map_) == (*other.value_.map_);
677 return value_.array_->compare( *(other.value_.array_) ) == 0;
679 return value_.map_->compare( *(other.value_.map_) ) == 0;
697 return value_.string_;
709 return value_.string_ ? value_.string_ : "";
711 return value_.bool_ ? "true" : "false";
713 return valueToString( value_.int_ );
715 return valueToString( value_.uint_ );
717 return valueToString( value_.real_ );
739 return Int(value_.int_);
742 return Int(value_.uint_);
744 JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt, maxInt), "double out of Int range");
745 return Int(value_.real_);
749 return value_.bool_ ? 1 : 0;
764 return UInt(value_.int_);
767 return UInt(value_.uint_);
769 JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt), "double out of UInt range");
770 return UInt( value_.real_ );
774 return value_.bool_ ? 1 : 0;
790 return Int64(value_.int_);
793 return Int64(value_.uint_);
795 JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt64, maxInt64), "double out of Int64 range");
796 return Int64(value_.real_);
800 return value_.bool_ ? 1 : 0;
815 return UInt64(value_.int_);
817 return UInt64(value_.uint_);
819 JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt64), "double out of UInt64 range");
820 return UInt64( value_.real_ );
824 return value_.bool_ ? 1 : 0;
861 return static_cast<double>( value_.int_ );
864 return static_cast<double>( value_.uint_ );
866 return integerToDouble( value_.uint_ );
869 return value_.real_;
873 return value_.bool_ ? 1.0 : 0.0;
886 return static_cast<float>( value_.int_ );
889 return static_cast<float>( value_.uint_ );
891 return integerToDouble( value_.uint_ );
894 return static_cast<float>( value_.real_ );
898 return value_.bool_ ? 1.0f : 0.0f;
911 return value_.bool_;
915 return value_.int_ ? true : false;
917 return value_.uint_ ? true : false;
919 return value_.real_ ? true : false;
934 || ( type_ == booleanValue && value_.bool_ == false )
936 || ( type_ == arrayValue && value_.map_->size() == 0 )
937 || ( type_ == objectValue && value_.map_->size() == 0 )
941 || (type_ == realValue && InRange(value_.real_, minInt, maxInt))
946 || (type_ == realValue && InRange(value_.real_, 0, maxUInt))
989 if ( !value_.map_->empty() )
991 ObjectValues::const_iterator itLast = value_.map_->end();
997 return ArrayIndex( value_.map_->size() );
1000 return Int( value_.array_->size() );
1002 return Int( value_.map_->size() );
1037 value_.map_->clear();
1041 value_.array_->clear();
1044 value_.map_->clear();
1068 value_.map_->erase( index );
1073 value_.array_->resize( newSize );
1086 ObjectValues::iterator it = value_.map_->lower_bound( key );
1087 if ( it != value_.map_->end() && (*it).first == key )
1091 it = value_.map_->insert( it, defaultValue );
1094 return value_.array_->resolveReference( index );
1115 ObjectValues::const_iterator it = value_.map_->find( key );
1116 if ( it == value_.map_->end() )
1120 Value *value = value_.array_->find( index );
1151 ObjectValues::iterator it = value_.map_->lower_bound( actualKey );
1152 if ( it != value_.map_->end() && (*it).first == actualKey )
1156 it = value_.map_->insert( it, defaultValue );
1160 return value_.map_->resolveReference( key, isStatic );
1190 ObjectValues::const_iterator it = value_.map_->find( actualKey );
1191 if ( it == value_.map_->end() )
1195 const Value *value = value_.map_->find( key );
1268 ObjectValues::iterator it = value_.map_->find( actualKey );
1269 if ( it == value_.map_->end() )
1272 value_.map_->erase(it);
1275 Value *value = value_.map_->find( key );
1278 value_.map_.remove( key );
1331 members.reserve( value_.map_->size() );
1333 ObjectValues::const_iterator it = value_.map_->begin();
1334 ObjectValues::const_iterator itEnd = value_.map_->end();
1340 value_.map_->makeBeginIterator( it );
1341 value_.map_->makeEndIterator( itEnd );
1355 // CppTL::Enum::keys( *(value_.map_), CppTL::Type<const CZString &>() ),
1366 // return CppTL::Enum::anyValues( *(value_.map_),
1399 value_.int_ >= minInt && value_.int_ <= maxInt;
1401 return value_.uint_ <= UInt(maxInt);
1403 return value_.real_ >= minInt &&
1404 value_.real_ <= maxInt &&
1405 IsIntegral(value_.real_);
1419 return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt);
1421 return value_.uint_ <= maxUInt;
1423 return value_.real_ >= 0 &&
1424 value_.real_ <= maxUInt &&
1425 IsIntegral(value_.real_);
1441 return value_.uint_ <= UInt64(maxInt64);
1446 return value_.real_ >= double(minInt64) &&
1447 value_.real_ < double(maxInt64) &&
1448 IsIntegral(value_.real_);
1463 return value_.int_ >= 0;
1470 return value_.real_ >= 0 &&
1471 value_.real_ < maxUInt64AsDouble &&
1472 IsIntegral(value_.real_);
1575 if ( value_.array_ )
1578 value_.array_->makeBeginIterator( it );
1583 if ( value_.map_ )
1586 value_.map_->makeBeginIterator( it );
1593 if ( value_.map_ )
1594 return const_iterator( value_.map_->begin() );
1610 if ( value_.array_ )
1613 value_.array_->makeEndIterator( it );
1618 if ( value_.map_ )
1621 value_.map_->makeEndIterator( it );
1628 if ( value_.map_ )
1629 return const_iterator( value_.map_->end() );
1646 if ( value_.array_ )
1649 value_.array_->makeBeginIterator( it );
1654 if ( value_.map_ )
1657 value_.map_->makeBeginIterator( it );
1664 if ( value_.map_ )
1665 return iterator( value_.map_->begin() );
1681 if ( value_.array_ )
1684 value_.array_->makeEndIterator( it );
1689 if ( value_.map_ )
1692 value_.map_->makeEndIterator( it );
1699 if ( value_.map_ )
1700 return iterator( value_.map_->end() );