webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
value.h
Go to the documentation of this file.
1 // Copyright 2007-2010 Baptiste Lepilleur
2 // Distributed under MIT license, or public domain if desired and
3 // recognized in your jurisdiction.
4 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5 
6 #ifndef CPPTL_JSON_H_INCLUDED
7 # define CPPTL_JSON_H_INCLUDED
8 
9 #if !defined(JSON_IS_AMALGAMATION)
10 # include "forwards.h"
11 #endif // if !defined(JSON_IS_AMALGAMATION)
12 # include <string>
13 # include <vector>
14 
15 # ifndef JSON_USE_CPPTL_SMALLMAP
16 # include <map>
17 # else
18 # include <cpptl/smallmap.h>
19 # endif
20 # ifdef JSON_USE_CPPTL
21 # include <cpptl/forwards.h>
22 # endif
23 
26 namespace Json {
27 
30  enum ValueType
31  {
32  nullValue = 0,
33  intValue,
34  uintValue,
35  realValue,
36  stringValue,
37  booleanValue,
38  arrayValue,
40  };
41 
43  {
44  commentBefore = 0,
46  commentAfter,
48  };
49 
50 //# ifdef JSON_USE_CPPTL
51 // typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
52 // typedef CppTL::AnyEnumerator<const Value &> EnumValues;
53 //# endif
54 
69  class JSON_API StaticString
70  {
71  public:
72  explicit StaticString( const char *czstring )
73  : str_( czstring )
74  {
75  }
76 
77  operator const char *() const
78  {
79  return str_;
80  }
81 
82  const char *c_str() const
83  {
84  return str_;
85  }
86 
87  private:
88  const char *str_;
89  };
90 
118  class JSON_API Value
119  {
120  friend class ValueIteratorBase;
121 # ifdef JSON_VALUE_USE_INTERNAL_MAP
122  friend class ValueInternalLink;
123  friend class ValueInternalMap;
124 # endif
125  public:
126  typedef std::vector<std::string> Members;
129  typedef Json::UInt UInt;
130  typedef Json::Int Int;
131 # if defined(JSON_HAS_INT64)
134 #endif // defined(JSON_HAS_INT64)
138 
139  static const Value null;
141  static const LargestInt minLargestInt;
143  static const LargestInt maxLargestInt;
145  static const LargestUInt maxLargestUInt;
146 
148  static const Int minInt;
150  static const Int maxInt;
152  static const UInt maxUInt;
153 
154 # if defined(JSON_HAS_INT64)
155  static const Int64 minInt64;
158  static const Int64 maxInt64;
160  static const UInt64 maxUInt64;
161 #endif // defined(JSON_HAS_INT64)
162 
163  private:
164 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
165 # ifndef JSON_VALUE_USE_INTERNAL_MAP
166  class CZString
167  {
168  public:
169  enum DuplicationPolicy
170  {
171  noDuplication = 0,
172  duplicate,
173  duplicateOnCopy
174  };
175  CZString( ArrayIndex index );
176  CZString( const char *cstr, DuplicationPolicy allocate );
177  CZString( const CZString &other );
178  ~CZString();
179  CZString &operator =( const CZString &other );
180  bool operator<( const CZString &other ) const;
181  bool operator==( const CZString &other ) const;
182  ArrayIndex index() const;
183  const char *c_str() const;
184  bool isStaticString() const;
185  private:
186  void swap( CZString &other );
187  const char *cstr_;
188  ArrayIndex index_;
189  };
190 
191  public:
192 # ifndef JSON_USE_CPPTL_SMALLMAP
193  typedef std::map<CZString, Value> ObjectValues;
194 # else
195  typedef CppTL::SmallMap<CZString, Value> ObjectValues;
196 # endif // ifndef JSON_USE_CPPTL_SMALLMAP
197 # endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
198 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
199 
200  public:
216  Value( ValueType type = nullValue );
217  Value( Int value );
218  Value( UInt value );
219 #if defined(JSON_HAS_INT64)
220  Value( Int64 value );
221  Value( UInt64 value );
222 #endif // if defined(JSON_HAS_INT64)
223  Value( double value );
224  Value( const char *value );
225  Value( const char *beginValue, const char *endValue );
236  Value( const StaticString &value );
237  Value( const std::string &value );
238 # ifdef JSON_USE_CPPTL
239  Value( const CppTL::ConstString &value );
240 # endif
241  Value( bool value );
242  Value( const Value &other );
243  ~Value();
244 
245  Value &operator=( const Value &other );
249  void swap( Value &other );
250 
251  ValueType type() const;
252 
253  bool operator <( const Value &other ) const;
254  bool operator <=( const Value &other ) const;
255  bool operator >=( const Value &other ) const;
256  bool operator >( const Value &other ) const;
257 
258  bool operator ==( const Value &other ) const;
259  bool operator !=( const Value &other ) const;
260 
261  int compare( const Value &other ) const;
262 
263  const char *asCString() const;
264  std::string asString() const;
265 # ifdef JSON_USE_CPPTL
266  CppTL::ConstString asConstString() const;
267 # endif
268  Int asInt() const;
269  UInt asUInt() const;
270 #if defined(JSON_HAS_INT64)
271  Int64 asInt64() const;
272  UInt64 asUInt64() const;
273 #endif // if defined(JSON_HAS_INT64)
274  LargestInt asLargestInt() const;
275  LargestUInt asLargestUInt() const;
276  float asFloat() const;
277  double asDouble() const;
278  bool asBool() const;
279 
280  bool isNull() const;
281  bool isBool() const;
282  bool isInt() const;
283  bool isInt64() const;
284  bool isUInt() const;
285  bool isUInt64() const;
286  bool isIntegral() const;
287  bool isDouble() const;
288  bool isNumeric() const;
289  bool isString() const;
290  bool isArray() const;
291  bool isObject() const;
292 
293  bool isConvertibleTo( ValueType other ) const;
294 
296  ArrayIndex size() const;
297 
300  bool empty() const;
301 
303  bool operator!() const;
304 
308  void clear();
309 
315  void resize( ArrayIndex size );
316 
322  Value &operator[]( ArrayIndex index );
323 
329  Value &operator[]( int index );
330 
334  const Value &operator[]( ArrayIndex index ) const;
335 
339  const Value &operator[]( int index ) const;
340 
343  Value get( ArrayIndex index,
344  const Value &defaultValue ) const;
346  bool isValidIndex( ArrayIndex index ) const;
350  Value &append( const Value &value );
351 
353  Value &operator[]( const char *key );
355  const Value &operator[]( const char *key ) const;
357  Value &operator[]( const std::string &key );
359  const Value &operator[]( const std::string &key ) const;
371  Value &operator[]( const StaticString &key );
372 # ifdef JSON_USE_CPPTL
373  Value &operator[]( const CppTL::ConstString &key );
376  const Value &operator[]( const CppTL::ConstString &key ) const;
377 # endif
378  Value get( const char *key,
380  const Value &defaultValue ) const;
382  Value get( const std::string &key,
383  const Value &defaultValue ) const;
384 # ifdef JSON_USE_CPPTL
385  Value get( const CppTL::ConstString &key,
387  const Value &defaultValue ) const;
388 # endif
389  Value removeMember( const char* key );
397  Value removeMember( const std::string &key );
398 
400  bool isMember( const char *key ) const;
402  bool isMember( const std::string &key ) const;
403 # ifdef JSON_USE_CPPTL
404  bool isMember( const CppTL::ConstString &key ) const;
406 # endif
407 
413  Members getMemberNames() const;
414 
415 //# ifdef JSON_USE_CPPTL
416 // EnumMemberNames enumMemberNames() const;
417 // EnumValues enumValues() const;
418 //# endif
419 
421  void setComment( const char *comment,
422  CommentPlacement placement );
424  void setComment( const std::string &comment,
425  CommentPlacement placement );
426  bool hasComment( CommentPlacement placement ) const;
428  std::string getComment( CommentPlacement placement ) const;
429 
430  std::string toStyledString() const;
431 
432  const_iterator begin() const;
433  const_iterator end() const;
434 
435  iterator begin();
436  iterator end();
437 
438  private:
439  Value &resolveReference( const char *key,
440  bool isStatic );
441 
442 # ifdef JSON_VALUE_USE_INTERNAL_MAP
443  inline bool isItemAvailable() const
444  {
445  return itemIsUsed_ == 0;
446  }
447 
448  inline void setItemUsed( bool isUsed = true )
449  {
450  itemIsUsed_ = isUsed ? 1 : 0;
451  }
452 
453  inline bool isMemberNameStatic() const
454  {
455  return memberNameIsStatic_ == 0;
456  }
457 
458  inline void setMemberNameIsStatic( bool isStatic )
459  {
460  memberNameIsStatic_ = isStatic ? 1 : 0;
461  }
462 # endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
463 
464  private:
465  struct CommentInfo
466  {
467  CommentInfo();
468  ~CommentInfo();
469 
470  void setComment( const char *text );
471 
472  char *comment_;
473  };
474 
475  //struct MemberNamesTransform
476  //{
477  // typedef const char *result_type;
478  // const char *operator()( const CZString &name ) const
479  // {
480  // return name.c_str();
481  // }
482  //};
483 
484  union ValueHolder
485  {
486  LargestInt int_;
487  LargestUInt uint_;
488  double real_;
489  bool bool_;
490  char *string_;
491 # ifdef JSON_VALUE_USE_INTERNAL_MAP
492  ValueInternalArray *array_;
493  ValueInternalMap *map_;
494 #else
495  ObjectValues *map_;
496 # endif
497  } value_;
498  ValueType type_ : 8;
499  int allocated_ : 1; // Notes: if declared as bool, bitfield is useless.
500 # ifdef JSON_VALUE_USE_INTERNAL_MAP
501  unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap container.
502  int memberNameIsStatic_ : 1; // used by the ValueInternalMap container.
503 # endif
504  CommentInfo *comments_;
505  };
506 
507 
510  class PathArgument
511  {
512  public:
513  friend class Path;
514 
515  PathArgument();
517  PathArgument( const char *key );
518  PathArgument( const std::string &key );
519 
520  private:
521  enum Kind
522  {
523  kindNone = 0,
524  kindIndex,
525  kindKey
526  };
527  std::string key_;
528  ArrayIndex index_;
529  Kind kind_;
530  };
531 
543  class Path
544  {
545  public:
546  Path( const std::string &path,
547  const PathArgument &a1 = PathArgument(),
548  const PathArgument &a2 = PathArgument(),
549  const PathArgument &a3 = PathArgument(),
550  const PathArgument &a4 = PathArgument(),
551  const PathArgument &a5 = PathArgument() );
552 
553  const Value &resolve( const Value &root ) const;
554  Value resolve( const Value &root,
555  const Value &defaultValue ) const;
557  Value &make( Value &root ) const;
558 
559  private:
560  typedef std::vector<const PathArgument *> InArgs;
561  typedef std::vector<PathArgument> Args;
562 
563  void makePath( const std::string &path,
564  const InArgs &in );
565  void addPathInArg( const std::string &path,
566  const InArgs &in,
567  InArgs::const_iterator &itInArg,
568  PathArgument::Kind kind );
569  void invalidPath( const std::string &path,
570  int location );
571 
572  Args args_;
573  };
574 
575 
576 
577 #ifdef JSON_VALUE_USE_INTERNAL_MAP
578 
622  class JSON_API ValueMapAllocator
623  {
624  public:
625  virtual ~ValueMapAllocator();
626  virtual ValueInternalMap *newMap() = 0;
627  virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0;
628  virtual void destructMap( ValueInternalMap *map ) = 0;
629  virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0;
630  virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
631  virtual ValueInternalLink *allocateMapLink() = 0;
632  virtual void releaseMapLink( ValueInternalLink *link ) = 0;
633  };
634 
638  class JSON_API ValueInternalLink
639  {
640  public:
641  enum { itemPerLink = 6 }; // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
642  enum InternalFlags {
643  flagAvailable = 0,
644  flagUsed = 1
645  };
646 
647  ValueInternalLink();
648 
649  ~ValueInternalLink();
650 
651  Value items_[itemPerLink];
652  char *keys_[itemPerLink];
653  ValueInternalLink *previous_;
654  ValueInternalLink *next_;
655  };
656 
657 
670  class JSON_API ValueInternalMap
671  {
672  friend class ValueIteratorBase;
673  friend class Value;
674  public:
675  typedef unsigned int HashKey;
676  typedef unsigned int BucketIndex;
677 
678 # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
679  struct IteratorState
680  {
681  IteratorState()
682  : map_(0)
683  , link_(0)
684  , itemIndex_(0)
685  , bucketIndex_(0)
686  {
687  }
688  ValueInternalMap *map_;
689  ValueInternalLink *link_;
690  BucketIndex itemIndex_;
691  BucketIndex bucketIndex_;
692  };
693 # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
694 
695  ValueInternalMap();
696  ValueInternalMap( const ValueInternalMap &other );
697  ValueInternalMap &operator =( const ValueInternalMap &other );
698  ~ValueInternalMap();
699 
700  void swap( ValueInternalMap &other );
701 
702  BucketIndex size() const;
703 
704  void clear();
705 
706  bool reserveDelta( BucketIndex growth );
707 
708  bool reserve( BucketIndex newItemCount );
709 
710  const Value *find( const char *key ) const;
711 
712  Value *find( const char *key );
713 
714  Value &resolveReference( const char *key,
715  bool isStatic );
716 
717  void remove( const char *key );
718 
719  void doActualRemove( ValueInternalLink *link,
720  BucketIndex index,
721  BucketIndex bucketIndex );
722 
723  ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
724 
725  Value &setNewItem( const char *key,
726  bool isStatic,
727  ValueInternalLink *link,
728  BucketIndex index );
729 
730  Value &unsafeAdd( const char *key,
731  bool isStatic,
732  HashKey hashedKey );
733 
734  HashKey hash( const char *key ) const;
735 
736  int compare( const ValueInternalMap &other ) const;
737 
738  private:
739  void makeBeginIterator( IteratorState &it ) const;
740  void makeEndIterator( IteratorState &it ) const;
741  static bool equals( const IteratorState &x, const IteratorState &other );
742  static void increment( IteratorState &iterator );
743  static void incrementBucket( IteratorState &iterator );
744  static void decrement( IteratorState &iterator );
745  static const char *key( const IteratorState &iterator );
746  static const char *key( const IteratorState &iterator, bool &isStatic );
747  static Value &value( const IteratorState &iterator );
748  static int distance( const IteratorState &x, const IteratorState &y );
749 
750  private:
751  ValueInternalLink *buckets_;
752  ValueInternalLink *tailLink_;
753  BucketIndex bucketsSize_;
754  BucketIndex itemCount_;
755  };
756 
768  class JSON_API ValueInternalArray
769  {
770  friend class Value;
771  friend class ValueIteratorBase;
772  public:
773  enum { itemsPerPage = 8 }; // should be a power of 2 for fast divide and modulo.
775  typedef unsigned int PageIndex;
776 
777 # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
778  struct IteratorState // Must be a POD
779  {
780  IteratorState()
781  : array_(0)
782  , currentPageIndex_(0)
783  , currentItemIndex_(0)
784  {
785  }
786  ValueInternalArray *array_;
787  Value **currentPageIndex_;
788  unsigned int currentItemIndex_;
789  };
790 # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
791 
792  ValueInternalArray();
793  ValueInternalArray( const ValueInternalArray &other );
794  ValueInternalArray &operator =( const ValueInternalArray &other );
795  ~ValueInternalArray();
796  void swap( ValueInternalArray &other );
797 
798  void clear();
799  void resize( ArrayIndex newSize );
800 
801  Value &resolveReference( ArrayIndex index );
802 
803  Value *find( ArrayIndex index ) const;
804 
805  ArrayIndex size() const;
806 
807  int compare( const ValueInternalArray &other ) const;
808 
809  private:
810  static bool equals( const IteratorState &x, const IteratorState &other );
811  static void increment( IteratorState &iterator );
812  static void decrement( IteratorState &iterator );
813  static Value &dereference( const IteratorState &iterator );
814  static Value &unsafeDereference( const IteratorState &iterator );
815  static int distance( const IteratorState &x, const IteratorState &y );
816  static ArrayIndex indexOf( const IteratorState &iterator );
817  void makeBeginIterator( IteratorState &it ) const;
818  void makeEndIterator( IteratorState &it ) const;
819  void makeIterator( IteratorState &it, ArrayIndex index ) const;
820 
821  void makeIndexValid( ArrayIndex index );
822 
823  Value **pages_;
824  ArrayIndex size_;
825  PageIndex pageCount_;
826  };
827 
887  class JSON_API ValueArrayAllocator
888  {
889  public:
890  virtual ~ValueArrayAllocator();
891  virtual ValueInternalArray *newArray() = 0;
892  virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0;
893  virtual void destructArray( ValueInternalArray *array ) = 0;
905  virtual void reallocateArrayPageIndex( Value **&indexes,
906  ValueInternalArray::PageIndex &indexCount,
907  ValueInternalArray::PageIndex minNewIndexCount ) = 0;
908  virtual void releaseArrayPageIndex( Value **indexes,
909  ValueInternalArray::PageIndex indexCount ) = 0;
910  virtual Value *allocateArrayPage() = 0;
911  virtual void releaseArrayPage( Value *value ) = 0;
912  };
913 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
914 
915 
919  class ValueIteratorBase
920  {
921  public:
922  typedef unsigned int size_t;
923  typedef int difference_type;
925 
927 #ifndef JSON_VALUE_USE_INTERNAL_MAP
928  explicit ValueIteratorBase( const Value::ObjectValues::iterator &current );
929 #else
930  ValueIteratorBase( const ValueInternalArray::IteratorState &state );
931  ValueIteratorBase( const ValueInternalMap::IteratorState &state );
932 #endif
933 
934  bool operator ==( const SelfType &other ) const
935  {
936  return isEqual( other );
937  }
938 
939  bool operator !=( const SelfType &other ) const
940  {
941  return !isEqual( other );
942  }
943 
944  difference_type operator -( const SelfType &other ) const
945  {
946  return computeDistance( other );
947  }
948 
950  Value key() const;
951 
953  UInt index() const;
954 
956  const char *memberName() const;
957 
958  protected:
959  Value &deref() const;
960 
961  void increment();
962 
963  void decrement();
964 
965  difference_type computeDistance( const SelfType &other ) const;
966 
967  bool isEqual( const SelfType &other ) const;
968 
969  void copy( const SelfType &other );
970 
971  private:
972 #ifndef JSON_VALUE_USE_INTERNAL_MAP
973  Value::ObjectValues::iterator current_;
974  // Indicates that iterator is for a null value.
975  bool isNull_;
976 #else
977  union
978  {
979  ValueInternalArray::IteratorState array_;
980  ValueInternalMap::IteratorState map_;
981  } iterator_;
982  bool isArray_;
983 #endif
984  };
985 
990  {
991  friend class Value;
992  public:
993  typedef unsigned int size_t;
994  typedef int difference_type;
995  typedef const Value &reference;
996  typedef const Value *pointer;
998 
1000  private:
1003 #ifndef JSON_VALUE_USE_INTERNAL_MAP
1004  explicit ValueConstIterator( const Value::ObjectValues::iterator &current );
1005 #else
1006  ValueConstIterator( const ValueInternalArray::IteratorState &state );
1007  ValueConstIterator( const ValueInternalMap::IteratorState &state );
1008 #endif
1009  public:
1010  SelfType &operator =( const ValueIteratorBase &other );
1011 
1012  SelfType operator++( int )
1013  {
1014  SelfType temp( *this );
1015  ++*this;
1016  return temp;
1017  }
1018 
1019  SelfType operator--( int )
1020  {
1021  SelfType temp( *this );
1022  --*this;
1023  return temp;
1024  }
1025 
1026  SelfType &operator--()
1027  {
1028  decrement();
1029  return *this;
1030  }
1031 
1032  SelfType &operator++()
1033  {
1034  increment();
1035  return *this;
1036  }
1037 
1038  reference operator *() const
1039  {
1040  return deref();
1041  }
1042  };
1043 
1044 
1047  class ValueIterator : public ValueIteratorBase
1048  {
1049  friend class Value;
1050  public:
1051  typedef unsigned int size_t;
1052  typedef int difference_type;
1053  typedef Value &reference;
1054  typedef Value *pointer;
1056 
1057  ValueIterator();
1058  ValueIterator( const ValueConstIterator &other );
1059  ValueIterator( const ValueIterator &other );
1060  private:
1063 #ifndef JSON_VALUE_USE_INTERNAL_MAP
1064  explicit ValueIterator( const Value::ObjectValues::iterator &current );
1065 #else
1066  ValueIterator( const ValueInternalArray::IteratorState &state );
1067  ValueIterator( const ValueInternalMap::IteratorState &state );
1068 #endif
1069  public:
1070 
1071  SelfType &operator =( const SelfType &other );
1072 
1073  SelfType operator++( int )
1074  {
1075  SelfType temp( *this );
1076  ++*this;
1077  return temp;
1078  }
1079 
1080  SelfType operator--( int )
1081  {
1082  SelfType temp( *this );
1083  --*this;
1084  return temp;
1085  }
1086 
1087  SelfType &operator--()
1088  {
1089  decrement();
1090  return *this;
1091  }
1092 
1093  SelfType &operator++()
1094  {
1095  increment();
1096  return *this;
1097  }
1098 
1099  reference operator *() const
1100  {
1101  return deref();
1102  }
1103  };
1104 
1105 
1106 } // namespace Json
1107 
1108 
1109 #endif // CPPTL_JSON_H_INCLUDED
UTF-8 string value.
Definition: value.h:36
bool isIntegral(float value)
Definition: MathExtras.h:417
Int64 LargestInt
Definition: config.h:91
&#39;null&#39; value
Definition: value.h:32
constexpr bool operator>(const UnexpectedType< E > &lhs, const UnexpectedType< E > &rhs)
Definition: Expected.h:60
unsigned int ArrayIndex
Definition: forwards.h:23
#define size
Definition: float-mm.c:27
EGLStreamKHR EGLint EGLint EGLint size
Definition: eglext.h:984
a comment just after a value on the same line
Definition: value.h:45
std::vector< std::string > Members
Definition: value.h:126
required HashAlgorithmIdentifier hash
Definition: WebCryptoAPI.idl:276
base class for Value iterators.
Definition: value.h:921
int difference_type
Definition: value.h:923
Definition: XMLHttpRequest.idl:39
def root
Definition: pyjsontestrunner.py:60
GLuint GLuint end
Definition: gl2ext.h:323
std::integral_constant< bool, B > bool_
Definition: Brigand.h:836
GenericValue * ValueIterator
Value iterator for iterating in array.
Definition: document.h:431
std::string kind
Definition: peerconnection_jni.cc:2054
Json::ArrayIndex ArrayIndex
Definition: value.h:137
array value (ordered list)
Definition: value.h:38
typename detail::make_map< Ts... >::type map
Definition: Brigand.h:223
TimeDelta operator*(T a, TimeDelta td)
Definition: timedelta.h:123
clear
Definition: complexityMeasures.m:1
path
Definition: generate.py:74
isnan(s.arrival find()
CFArrayRef array
Definition: AVFoundationCFSoftLinking.h:129
Json::LargestUInt LargestUInt
Definition: value.h:136
int difference_type
Definition: value.h:994
const iterator for object and array value.
Definition: value.h:991
detail::append_impl< Ts... > append
Definition: Brigand.h:133
unsigned int size_t
Definition: value.h:1051
object value (collection of name/value pairs).
Definition: value.h:39
bool operator!=(const Handle< T > &a, const Handle< U > &b)
Definition: Handle.h:159
Object allocate(size_t size)
Definition: stress.cpp:105
bool operator!(const String &str)
Definition: WTFString.h:517
Experimental and untested: represents an element of the "path" to access a node.
Definition: value.h:512
GLint location
Definition: gl2.h:455
static const UInt64 maxUInt64
Maximum unsigned 64 bits int value that can be stored in a Json::Value.
Definition: value.h:160
SelfType & operator--()
Definition: value.h:1026
std::unique_ptr< TrackMediaInfoMap > map_
Definition: trackmediainfomap_unittest.cc:171
CommentPlacement
Definition: value.h:42
SelfType & operator--()
Definition: value.h:1087
StaticString(const char *czstring)
Definition: value.h:72
ValueConstIterator SelfType
Definition: value.h:997
UInt64 LargestUInt
Definition: config.h:92
constexpr bool operator>=(const UnexpectedType< E > &lhs, const UnexpectedType< E > &rhs)
Definition: Expected.h:62
bool value
Definition: value.h:37
static const Value null
Definition: value.h:139
EGLSurface EGLint x
Definition: eglext.h:950
int difference_type
Definition: value.h:1052
ValueConstIterator const_iterator
Definition: value.h:128
GLuint index
Definition: gl2.h:383
EGLAttrib * value
Definition: eglext.h:120
a comment placed on the line before a value
Definition: value.h:44
JSON (JavaScript Object Notation).
Definition: value.h:26
ValueIteratorBase SelfType
Definition: value.h:924
Json::Int64 Int64
Definition: value.h:133
JSString * asString(JSValue)
Definition: JSString.h:491
ValueIterator SelfType
Definition: value.h:1055
Experimental and untested: represents a "path" to access a node.
Definition: value.h:545
unsigned integer value
Definition: value.h:34
double value
Definition: value.h:35
SelfType operator--(int)
Definition: value.h:1019
Json::LargestInt LargestInt
Definition: value.h:135
EGLSurface EGLint EGLint y
Definition: eglext.h:950
const char * c_str() const
Definition: value.h:82
SelfType operator--(int)
Definition: value.h:1080
Json::UInt UInt
Definition: value.h:129
SelfType & operator++()
Definition: value.h:1093
unsigned long long int UInt64
Definition: config.h:89
bool operator==(const Handle< T > &a, const Handle< U > &b)
Definition: Handle.h:144
EGLenum type
Definition: eglext.h:63
Json::UInt64 UInt64
Definition: value.h:132
Json::Int Int
Definition: value.h:130
GLsizei const GLchar *const * string
Definition: gl2.h:479
long long int Int64
Definition: config.h:88
Value * pointer
Definition: value.h:1054
signed integer value
Definition: value.h:33
ValueIterator iterator
Definition: value.h:127
const Value * pointer
Definition: value.h:996
const Value & reference
Definition: value.h:995
constexpr bool operator<=(const UnexpectedType< E > &lhs, const UnexpectedType< E > &rhs)
Definition: Expected.h:61
unsigned int UInt
Definition: config.h:77
GLsizei GLsizei GLfloat distance
Definition: gl2ext.h:2866
root value)
Definition: value.h:47
GenericValue & operator=(GenericValue &rhs) RAPIDJSON_NOEXCEPT
Assignment with move semantics.
Definition: document.h:595
Iterator for object and array value.
Definition: value.h:1049
SelfType & operator++()
Definition: value.h:1032
SelfType operator++(int)
Definition: value.h:1012
ValueType
Type of the value held by a Value object.
Definition: value.h:30
constexpr bool operator<(const UnexpectedType< E > &lhs, const UnexpectedType< E > &rhs)
Definition: Expected.h:59
a comment on the line after a value (only make sense for root value)
Definition: value.h:46
std::map< CZString, Value > ObjectValues
Definition: value.h:193
void swap(JSRetainPtr< T > &a, JSRetainPtr< T > &b)
Definition: JSRetainPtr.h:179
#define JSON_API
Definition: config.h:53
static const Int64 maxInt64
Maximum signed 64 bits int value that can be stored in a Json::Value.
Definition: value.h:158
SelfType operator++(int)
Definition: value.h:1073
CFArrayRef CFTypeRef key
Definition: AVFoundationCFSoftLinking.h:129
unsigned int size_t
Definition: value.h:922
int Int
Definition: config.h:76
bool isInt(TypedArrayType type)
Definition: TypedArrayType.h:149
bool isArray(ExecState *exec, JSValue argumentValue)
Definition: ArrayConstructor.h:71
unsigned int size_t
Definition: value.h:993
temp
Definition: parse_delay_file.m:64
string state
Definition: buildtests.py:34
link
print &#39;=> not included or rejected&#39;
Definition: antglob.py:136
Value & reference
Definition: value.h:1053