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)
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,
40  };
41 
43  {
48  };
49 
50 //# ifdef JSON_USE_CPPTL
51 // typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
52 // typedef CppTL::AnyEnumerator<const Value &> EnumValues;
53 //# endif
54 
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 
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)
132  typedef Json::UInt64 UInt64;
133  typedef Json::Int64 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:
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  // One-bit bitfields must be unsigned to allow storing 1.
500  // They must be 32-bits to share storage with ValueHolder.
501  unsigned int allocated_ : 1;
502 # ifdef JSON_VALUE_USE_INTERNAL_MAP
503  unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap container.
504  unsigned int memberNameIsStatic_ : 1; // used by the ValueInternalMap container.
505 # endif
506  CommentInfo *comments_;
507  };
508 
509 
513  {
514  public:
515  friend class Path;
516 
517  PathArgument();
519  PathArgument( const char *key );
520  PathArgument( const std::string &key );
521 
522  private:
523  enum Kind
524  {
525  kindNone = 0,
526  kindIndex,
527  kindKey
528  };
529  std::string key_;
530  ArrayIndex index_;
531  Kind kind_;
532  };
533 
545  class Path
546  {
547  public:
548  Path( const std::string &path,
549  const PathArgument &a1 = PathArgument(),
550  const PathArgument &a2 = PathArgument(),
551  const PathArgument &a3 = PathArgument(),
552  const PathArgument &a4 = PathArgument(),
553  const PathArgument &a5 = PathArgument() );
554 
555  const Value &resolve( const Value &root ) const;
556  Value resolve( const Value &root,
557  const Value &defaultValue ) const;
559  Value &make( Value &root ) const;
560 
561  private:
562  typedef std::vector<const PathArgument *> InArgs;
563  typedef std::vector<PathArgument> Args;
564 
565  void makePath( const std::string &path,
566  const InArgs &in );
567  void addPathInArg( const std::string &path,
568  const InArgs &in,
569  InArgs::const_iterator &itInArg,
570  PathArgument::Kind kind );
571  void invalidPath( const std::string &path,
572  int location );
573 
574  Args args_;
575  };
576 
577 
578 
579 #ifdef JSON_VALUE_USE_INTERNAL_MAP
580 
624  class JSON_API ValueMapAllocator
625  {
626  public:
627  virtual ~ValueMapAllocator();
628  virtual ValueInternalMap *newMap() = 0;
629  virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0;
630  virtual void destructMap( ValueInternalMap *map ) = 0;
631  virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0;
632  virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
633  virtual ValueInternalLink *allocateMapLink() = 0;
634  virtual void releaseMapLink( ValueInternalLink *link ) = 0;
635  };
636 
640  class JSON_API ValueInternalLink
641  {
642  public:
643  enum { itemPerLink = 6 }; // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
644  enum InternalFlags {
645  flagAvailable = 0,
646  flagUsed = 1
647  };
648 
649  ValueInternalLink();
650 
651  ~ValueInternalLink();
652 
653  Value items_[itemPerLink];
654  char *keys_[itemPerLink];
655  ValueInternalLink *previous_;
656  ValueInternalLink *next_;
657  };
658 
659 
672  class JSON_API ValueInternalMap
673  {
674  friend class ValueIteratorBase;
675  friend class Value;
676  public:
677  typedef unsigned int HashKey;
678  typedef unsigned int BucketIndex;
679 
680 # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
681  struct IteratorState
682  {
683  IteratorState()
684  : map_(0)
685  , link_(0)
686  , itemIndex_(0)
687  , bucketIndex_(0)
688  {
689  }
690  ValueInternalMap *map_;
691  ValueInternalLink *link_;
692  BucketIndex itemIndex_;
693  BucketIndex bucketIndex_;
694  };
695 # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
696 
697  ValueInternalMap();
698  ValueInternalMap( const ValueInternalMap &other );
699  ValueInternalMap &operator =( const ValueInternalMap &other );
700  ~ValueInternalMap();
701 
702  void swap( ValueInternalMap &other );
703 
704  BucketIndex size() const;
705 
706  void clear();
707 
708  bool reserveDelta( BucketIndex growth );
709 
710  bool reserve( BucketIndex newItemCount );
711 
712  const Value *find( const char *key ) const;
713 
714  Value *find( const char *key );
715 
716  Value &resolveReference( const char *key,
717  bool isStatic );
718 
719  void remove( const char *key );
720 
721  void doActualRemove( ValueInternalLink *link,
722  BucketIndex index,
723  BucketIndex bucketIndex );
724 
725  ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
726 
727  Value &setNewItem( const char *key,
728  bool isStatic,
729  ValueInternalLink *link,
730  BucketIndex index );
731 
732  Value &unsafeAdd( const char *key,
733  bool isStatic,
734  HashKey hashedKey );
735 
736  HashKey hash( const char *key ) const;
737 
738  int compare( const ValueInternalMap &other ) const;
739 
740  private:
741  void makeBeginIterator( IteratorState &it ) const;
742  void makeEndIterator( IteratorState &it ) const;
743  static bool equals( const IteratorState &x, const IteratorState &other );
744  static void increment( IteratorState &iterator );
745  static void incrementBucket( IteratorState &iterator );
746  static void decrement( IteratorState &iterator );
747  static const char *key( const IteratorState &iterator );
748  static const char *key( const IteratorState &iterator, bool &isStatic );
749  static Value &value( const IteratorState &iterator );
750  static int distance( const IteratorState &x, const IteratorState &y );
751 
752  private:
753  ValueInternalLink *buckets_;
754  ValueInternalLink *tailLink_;
755  BucketIndex bucketsSize_;
756  BucketIndex itemCount_;
757  };
758 
770  class JSON_API ValueInternalArray
771  {
772  friend class Value;
773  friend class ValueIteratorBase;
774  public:
775  enum { itemsPerPage = 8 }; // should be a power of 2 for fast divide and modulo.
777  typedef unsigned int PageIndex;
778 
779 # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
780  struct IteratorState // Must be a POD
781  {
782  IteratorState()
783  : array_(0)
784  , currentPageIndex_(0)
785  , currentItemIndex_(0)
786  {
787  }
788  ValueInternalArray *array_;
789  Value **currentPageIndex_;
790  unsigned int currentItemIndex_;
791  };
792 # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
793 
794  ValueInternalArray();
795  ValueInternalArray( const ValueInternalArray &other );
796  ValueInternalArray &operator =( const ValueInternalArray &other );
797  ~ValueInternalArray();
798  void swap( ValueInternalArray &other );
799 
800  void clear();
801  void resize( ArrayIndex newSize );
802 
803  Value &resolveReference( ArrayIndex index );
804 
805  Value *find( ArrayIndex index ) const;
806 
807  ArrayIndex size() const;
808 
809  int compare( const ValueInternalArray &other ) const;
810 
811  private:
812  static bool equals( const IteratorState &x, const IteratorState &other );
813  static void increment( IteratorState &iterator );
814  static void decrement( IteratorState &iterator );
815  static Value &dereference( const IteratorState &iterator );
816  static Value &unsafeDereference( const IteratorState &iterator );
817  static int distance( const IteratorState &x, const IteratorState &y );
818  static ArrayIndex indexOf( const IteratorState &iterator );
819  void makeBeginIterator( IteratorState &it ) const;
820  void makeEndIterator( IteratorState &it ) const;
821  void makeIterator( IteratorState &it, ArrayIndex index ) const;
822 
823  void makeIndexValid( ArrayIndex index );
824 
825  Value **pages_;
826  ArrayIndex size_;
827  PageIndex pageCount_;
828  };
829 
889  class JSON_API ValueArrayAllocator
890  {
891  public:
892  virtual ~ValueArrayAllocator();
893  virtual ValueInternalArray *newArray() = 0;
894  virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0;
895  virtual void destructArray( ValueInternalArray *array ) = 0;
907  virtual void reallocateArrayPageIndex( Value **&indexes,
908  ValueInternalArray::PageIndex &indexCount,
909  ValueInternalArray::PageIndex minNewIndexCount ) = 0;
910  virtual void releaseArrayPageIndex( Value **indexes,
911  ValueInternalArray::PageIndex indexCount ) = 0;
912  virtual Value *allocateArrayPage() = 0;
913  virtual void releaseArrayPage( Value *value ) = 0;
914  };
915 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
916 
917 
922  {
923  public:
924  typedef unsigned int size_t;
925  typedef int difference_type;
927 
929 #ifndef JSON_VALUE_USE_INTERNAL_MAP
930  explicit ValueIteratorBase( const Value::ObjectValues::iterator &current );
931 #else
932  ValueIteratorBase( const ValueInternalArray::IteratorState &state );
933  ValueIteratorBase( const ValueInternalMap::IteratorState &state );
934 #endif
935 
936  bool operator ==( const SelfType &other ) const
937  {
938  return isEqual( other );
939  }
940 
941  bool operator !=( const SelfType &other ) const
942  {
943  return !isEqual( other );
944  }
945 
946  difference_type operator -( const SelfType &other ) const
947  {
948  return computeDistance( other );
949  }
950 
952  Value key() const;
953 
955  UInt index() const;
956 
958  const char *memberName() const;
959 
960  protected:
961  Value &deref() const;
962 
963  void increment();
964 
965  void decrement();
966 
967  difference_type computeDistance( const SelfType &other ) const;
968 
969  bool isEqual( const SelfType &other ) const;
970 
971  void copy( const SelfType &other );
972 
973  private:
974 #ifndef JSON_VALUE_USE_INTERNAL_MAP
975  Value::ObjectValues::iterator current_;
976  // Indicates that iterator is for a null value.
977  bool isNull_;
978 #else
979  union
980  {
981  ValueInternalArray::IteratorState array_;
982  ValueInternalMap::IteratorState map_;
983  } iterator_;
984  bool isArray_;
985 #endif
986  };
987 
992  {
993  friend class Value;
994  public:
995  typedef unsigned int size_t;
996  typedef int difference_type;
997  typedef const Value &reference;
998  typedef const Value *pointer;
1000 
1002  private:
1005 #ifndef JSON_VALUE_USE_INTERNAL_MAP
1006  explicit ValueConstIterator( const Value::ObjectValues::iterator &current );
1007 #else
1008  ValueConstIterator( const ValueInternalArray::IteratorState &state );
1009  ValueConstIterator( const ValueInternalMap::IteratorState &state );
1010 #endif
1011  public:
1012  SelfType &operator =( const ValueIteratorBase &other );
1013 
1014  SelfType operator++( int )
1015  {
1016  SelfType temp( *this );
1017  ++*this;
1018  return temp;
1019  }
1020 
1021  SelfType operator--( int )
1022  {
1023  SelfType temp( *this );
1024  --*this;
1025  return temp;
1026  }
1027 
1028  SelfType &operator--()
1029  {
1030  decrement();
1031  return *this;
1032  }
1033 
1034  SelfType &operator++()
1035  {
1036  increment();
1037  return *this;
1038  }
1039 
1040  reference operator *() const
1041  {
1042  return deref();
1043  }
1044  };
1045 
1046 
1050  {
1051  friend class Value;
1052  public:
1053  typedef unsigned int size_t;
1054  typedef int difference_type;
1055  typedef Value &reference;
1056  typedef Value *pointer;
1058 
1059  ValueIterator();
1060  ValueIterator( const ValueConstIterator &other );
1061  ValueIterator( const ValueIterator &other );
1062  private:
1065 #ifndef JSON_VALUE_USE_INTERNAL_MAP
1066  explicit ValueIterator( const Value::ObjectValues::iterator &current );
1067 #else
1068  ValueIterator( const ValueInternalArray::IteratorState &state );
1069  ValueIterator( const ValueInternalMap::IteratorState &state );
1070 #endif
1071  public:
1072 
1073  SelfType &operator =( const SelfType &other );
1074 
1075  SelfType operator++( int )
1076  {
1077  SelfType temp( *this );
1078  ++*this;
1079  return temp;
1080  }
1081 
1082  SelfType operator--( int )
1083  {
1084  SelfType temp( *this );
1085  --*this;
1086  return temp;
1087  }
1088 
1089  SelfType &operator--()
1090  {
1091  decrement();
1092  return *this;
1093  }
1094 
1095  SelfType &operator++()
1096  {
1097  increment();
1098  return *this;
1099  }
1100 
1101  reference operator *() const
1102  {
1103  return deref();
1104  }
1105  };
1106 
1107 
1108 } // namespace Json
1109 
1110 
1111 #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
static const Value & null
We regret this reference to a global instance; prefer the simpler Value().
Definition: value.h:139
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:925
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()
static const Int maxInt
Maximum signed int value that can be stored in a Json::Value.
Definition: value.h:150
Lightweight wrapper to tag static string.
Definition: value.h:69
CFArrayRef array
Definition: AVFoundationCFSoftLinking.h:129
static const UInt maxUInt
Maximum unsigned int value that can be stored in a Json::Value.
Definition: value.h:152
Json::LargestUInt LargestUInt
Definition: value.h:136
int difference_type
Definition: value.h:996
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:1053
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 LargestInt minLargestInt
Minimum signed integer value that can be stored in a Json::Value.
Definition: value.h:141
SelfType & operator--()
Definition: value.h:1028
std::unique_ptr< TrackMediaInfoMap > map_
Definition: trackmediainfomap_unittest.cc:171
CommentPlacement
Definition: value.h:42
SelfType & operator--()
Definition: value.h:1089
StaticString(const char *czstring)
Definition: value.h:72
ValueConstIterator SelfType
Definition: value.h:999
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
EGLSurface EGLint x
Definition: eglext.h:950
int difference_type
Definition: value.h:1054
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:926
JSString * asString(JSValue)
Definition: JSString.h:491
ValueIterator SelfType
Definition: value.h:1057
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:1021
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:1082
Json::UInt UInt
Definition: value.h:129
SelfType & operator++()
Definition: value.h:1095
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::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:1056
Represents a JSON value.
Definition: value.h:118
signed integer value
Definition: value.h:33
ValueIterator iterator
Definition: value.h:127
const Value * pointer
Definition: value.h:998
static const Int minInt
Minimum signed int value that can be stored in a Json::Value.
Definition: value.h:148
const Value & reference
Definition: value.h:997
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:1034
SelfType operator++(int)
Definition: value.h:1014
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
SelfType operator++(int)
Definition: value.h:1075
CFArrayRef CFTypeRef key
Definition: AVFoundationCFSoftLinking.h:129
unsigned int size_t
Definition: value.h:924
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:995
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:1055
static const LargestInt maxLargestInt
Maximum signed integer value that can be stored in a Json::Value.
Definition: value.h:143
static const LargestUInt maxLargestUInt
Maximum unsigned integer value that can be stored in a Json::Value.
Definition: value.h:145