JsonCpp project page JsonCpp home page

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 
24 // Disable warning C4251: <data member>: <type> needs to have dll-interface to
25 // be used by...
26 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
27 #pragma warning(push)
28 #pragma warning(disable : 4251)
29 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
30 
33 namespace Json {
34 
37 enum ValueType {
38  nullValue = 0,
46 };
47 
54 };
55 
56 //# ifdef JSON_USE_CPPTL
57 // typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
58 // typedef CppTL::AnyEnumerator<const Value &> EnumValues;
59 //# endif
60 
76 public:
77  explicit StaticString(const char *czstring) : str_(czstring) {}
78 
79  operator const char *() const { return str_; }
80 
81  const char *c_str() const { return str_; }
82 
83 private:
84  const char *str_;
85 };
86 
117  friend class ValueIteratorBase;
118 #ifdef JSON_VALUE_USE_INTERNAL_MAP
119  friend class ValueInternalLink;
120  friend class ValueInternalMap;
121 #endif
122 public:
123  typedef std::vector<std::string> Members;
126  typedef Json::UInt UInt;
127  typedef Json::Int Int;
128 #if defined(JSON_HAS_INT64)
131 #endif // defined(JSON_HAS_INT64)
135 
136  static const Value& null;
138  static const LargestInt minLargestInt;
140  static const LargestInt maxLargestInt;
143 
145  static const Int minInt;
147  static const Int maxInt;
149  static const UInt maxUInt;
150 
151 #if defined(JSON_HAS_INT64)
152  static const Int64 minInt64;
155  static const Int64 maxInt64;
157  static const UInt64 maxUInt64;
158 #endif // defined(JSON_HAS_INT64)
159 
160 private:
161 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
162 #ifndef JSON_VALUE_USE_INTERNAL_MAP
163  class CZString {
164  public:
165  enum DuplicationPolicy {
166  noDuplication = 0,
167  duplicate,
168  duplicateOnCopy
169  };
170  CZString(ArrayIndex index);
171  CZString(const char *cstr, DuplicationPolicy allocate);
172  CZString(const CZString &other);
173  ~CZString();
174  CZString &operator=(const CZString &other);
175  bool operator<(const CZString &other) const;
176  bool operator==(const CZString &other) const;
177  ArrayIndex index() const;
178  const char *c_str() const;
179  bool isStaticString() const;
180 
181  private:
182  void swap(CZString &other);
183  const char *cstr_;
184  ArrayIndex index_;
185  };
186 
187 public:
188 #ifndef JSON_USE_CPPTL_SMALLMAP
189  typedef std::map<CZString, Value> ObjectValues;
190 #else
191  typedef CppTL::SmallMap<CZString, Value> ObjectValues;
192 #endif // ifndef JSON_USE_CPPTL_SMALLMAP
193 #endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
194 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
195 
196 public:
212  Value(ValueType type = nullValue);
213  Value(Int value);
214  Value(UInt value);
215 #if defined(JSON_HAS_INT64)
216  Value(Int64 value);
217  Value(UInt64 value);
218 #endif // if defined(JSON_HAS_INT64)
219  Value(double value);
220  Value(const char *value);
221  Value(const char *beginValue, const char *endValue);
232  Value(const StaticString &value);
233  Value(const std::string &value);
234 #ifdef JSON_USE_CPPTL
235  Value(const CppTL::ConstString &value);
236 #endif
237  Value(bool value);
238  Value(const Value &other);
239  ~Value();
240 
241  Value &operator=(const Value &other);
245  void swap(Value &other);
246 
247  ValueType type() const;
248 
249  bool operator<(const Value &other) const;
250  bool operator<=(const Value &other) const;
251  bool operator>=(const Value &other) const;
252  bool operator>(const Value &other) const;
253 
254  bool operator==(const Value &other) const;
255  bool operator!=(const Value &other) const;
256 
257  int compare(const Value &other) const;
258 
259  const char *asCString() const;
260  std::string asString() const;
261 #ifdef JSON_USE_CPPTL
262  CppTL::ConstString asConstString() const;
263 #endif
264  Int asInt() const;
265  UInt asUInt() const;
266 #if defined(JSON_HAS_INT64)
267  Int64 asInt64() const;
268  UInt64 asUInt64() const;
269 #endif // if defined(JSON_HAS_INT64)
270  LargestInt asLargestInt() const;
271  LargestUInt asLargestUInt() const;
272  float asFloat() const;
273  double asDouble() const;
274  bool asBool() const;
275 
276  bool isNull() const;
277  bool isBool() const;
278  bool isInt() const;
279  bool isInt64() const;
280  bool isUInt() const;
281  bool isUInt64() const;
282  bool isIntegral() const;
283  bool isDouble() const;
284  bool isNumeric() const;
285  bool isString() const;
286  bool isArray() const;
287  bool isObject() const;
288 
289  bool isConvertibleTo(ValueType other) const;
290 
292  ArrayIndex size() const;
293 
296  bool empty() const;
297 
299  bool operator!() const;
300 
304  void clear();
305 
311  void resize(ArrayIndex size);
312 
319  Value &operator[](ArrayIndex index);
320 
327  Value &operator[](int index);
328 
332  const Value &operator[](ArrayIndex index) const;
333 
337  const Value &operator[](int index) const;
338 
342  Value get(ArrayIndex index, const Value &defaultValue) const;
344  bool isValidIndex(ArrayIndex index) const;
348  Value &append(const Value &value);
349 
351  Value &operator[](const char *key);
354  const Value &operator[](const char *key) const;
356  Value &operator[](const std::string &key);
359  const Value &operator[](const std::string &key) const;
372  Value &operator[](const StaticString &key);
373 #ifdef JSON_USE_CPPTL
374  Value &operator[](const CppTL::ConstString &key);
378  const Value &operator[](const CppTL::ConstString &key) const;
379 #endif
380  Value get(const char *key, const Value &defaultValue) const;
383  Value get(const std::string &key, const Value &defaultValue) const;
384 #ifdef JSON_USE_CPPTL
385  Value get(const CppTL::ConstString &key, const Value &defaultValue) const;
387 #endif
388  Value removeMember(const char *key);
396  Value removeMember(const std::string &key);
397 
399  bool isMember(const char *key) const;
401  bool isMember(const std::string &key) const;
402 #ifdef JSON_USE_CPPTL
403  bool isMember(const CppTL::ConstString &key) const;
405 #endif
406 
412  Members getMemberNames() const;
413 
414  //# ifdef JSON_USE_CPPTL
415  // EnumMemberNames enumMemberNames() const;
416  // EnumValues enumValues() const;
417  //# endif
418 
420  void setComment(const char *comment, CommentPlacement placement);
422  void setComment(const std::string &comment, CommentPlacement placement);
423  bool hasComment(CommentPlacement placement) const;
425  std::string getComment(CommentPlacement placement) const;
426 
427  std::string toStyledString() const;
428 
429  const_iterator begin() const;
430  const_iterator end() const;
431 
432  iterator begin();
433  iterator end();
434 
435  // Accessors for the [start, limit) range of bytes within the JSON text from
436  // which this value was parsed, if any.
437  void setOffsetStart(size_t start);
438  void setOffsetLimit(size_t limit);
439  size_t getOffsetStart() const;
440  size_t getOffsetLimit() const;
441 
442 private:
443  Value &resolveReference(const char *key, bool isStatic);
444 
445 #ifdef JSON_VALUE_USE_INTERNAL_MAP
446  inline bool isItemAvailable() const { return itemIsUsed_ == 0; }
447 
448  inline void setItemUsed(bool isUsed = true) { itemIsUsed_ = isUsed ? 1 : 0; }
449 
450  inline bool isMemberNameStatic() const { return memberNameIsStatic_ == 0; }
451 
452  inline void setMemberNameIsStatic(bool isStatic) {
453  memberNameIsStatic_ = isStatic ? 1 : 0;
454  }
455 #endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
456 
457 private:
458  struct CommentInfo {
459  CommentInfo();
460  ~CommentInfo();
461 
462  void setComment(const char *text);
463 
464  char *comment_;
465  };
466 
467  // struct MemberNamesTransform
468  //{
469  // typedef const char *result_type;
470  // const char *operator()( const CZString &name ) const
471  // {
472  // return name.c_str();
473  // }
474  //};
475 
476  union ValueHolder {
477  LargestInt int_;
478  LargestUInt uint_;
479  double real_;
480  bool bool_;
481  char *string_;
482 #ifdef JSON_VALUE_USE_INTERNAL_MAP
483  ValueInternalArray *array_;
484  ValueInternalMap *map_;
485 #else
486  ObjectValues *map_;
487 #endif
488  } value_;
489  ValueType type_ : 8;
490  int allocated_ : 1; // Notes: if declared as bool, bitfield is useless.
491 #ifdef JSON_VALUE_USE_INTERNAL_MAP
492  unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap container.
493  int memberNameIsStatic_ : 1; // used by the ValueInternalMap container.
494 #endif
495  CommentInfo *comments_;
496 
497  // [start, limit) byte offsets in the source JSON text from which this Value
498  // was extracted.
499  size_t start_;
500  size_t limit_;
501 };
502 
507 public:
508  friend class Path;
509 
510  PathArgument();
511  PathArgument(ArrayIndex index);
512  PathArgument(const char *key);
513  PathArgument(const std::string &key);
514 
515 private:
516  enum Kind {
517  kindNone = 0,
518  kindIndex,
519  kindKey
520  };
521  std::string key_;
522  ArrayIndex index_;
523  Kind kind_;
524 };
525 
537 class JSON_API Path {
538 public:
539  Path(const std::string &path,
540  const PathArgument &a1 = PathArgument(),
541  const PathArgument &a2 = PathArgument(),
542  const PathArgument &a3 = PathArgument(),
543  const PathArgument &a4 = PathArgument(),
544  const PathArgument &a5 = PathArgument());
545 
546  const Value &resolve(const Value &root) const;
547  Value resolve(const Value &root, const Value &defaultValue) const;
550  Value &make(Value &root) const;
551 
552 private:
553  typedef std::vector<const PathArgument *> InArgs;
554  typedef std::vector<PathArgument> Args;
555 
556  void makePath(const std::string &path, const InArgs &in);
557  void addPathInArg(const std::string &path,
558  const InArgs &in,
559  InArgs::const_iterator &itInArg,
560  PathArgument::Kind kind);
561  void invalidPath(const std::string &path, int location);
562 
563  Args args_;
564 };
565 
566 #ifdef JSON_VALUE_USE_INTERNAL_MAP
567 
613 public:
614  virtual ~ValueMapAllocator();
615  virtual ValueInternalMap *newMap() = 0;
616  virtual ValueInternalMap *newMapCopy(const ValueInternalMap &other) = 0;
617  virtual void destructMap(ValueInternalMap *map) = 0;
618  virtual ValueInternalLink *allocateMapBuckets(unsigned int size) = 0;
619  virtual void releaseMapBuckets(ValueInternalLink *links) = 0;
620  virtual ValueInternalLink *allocateMapLink() = 0;
621  virtual void releaseMapLink(ValueInternalLink *link) = 0;
622 };
623 
628 public:
629  enum {
630  itemPerLink = 6
631  }; // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
633  flagAvailable = 0,
634  flagUsed = 1
635  };
636 
638 
640 
641  Value items_[itemPerLink];
642  char *keys_[itemPerLink];
645 };
646 
665  friend class ValueIteratorBase;
666  friend class Value;
667 
668 public:
669  typedef unsigned int HashKey;
670  typedef unsigned int BucketIndex;
671 
672 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
673  struct IteratorState {
674  IteratorState() : map_(0), link_(0), itemIndex_(0), bucketIndex_(0) {}
675  ValueInternalMap *map_;
676  ValueInternalLink *link_;
677  BucketIndex itemIndex_;
678  BucketIndex bucketIndex_;
679  };
680 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
681 
683  ValueInternalMap(const ValueInternalMap &other);
684  ValueInternalMap &operator=(const ValueInternalMap &other);
685  ~ValueInternalMap();
686 
687  void swap(ValueInternalMap &other);
688 
689  BucketIndex size() const;
690 
691  void clear();
692 
693  bool reserveDelta(BucketIndex growth);
694 
695  bool reserve(BucketIndex newItemCount);
696 
697  const Value *find(const char *key) const;
698 
699  Value *find(const char *key);
700 
701  Value &resolveReference(const char *key, bool isStatic);
702 
703  void remove(const char *key);
704 
705  void doActualRemove(ValueInternalLink *link,
706  BucketIndex index,
707  BucketIndex bucketIndex);
708 
709  ValueInternalLink *&getLastLinkInBucket(BucketIndex bucketIndex);
710 
711  Value &setNewItem(const char *key,
712  bool isStatic,
713  ValueInternalLink *link,
714  BucketIndex index);
715 
716  Value &unsafeAdd(const char *key, bool isStatic, HashKey hashedKey);
717 
718  HashKey hash(const char *key) const;
719 
720  int compare(const ValueInternalMap &other) const;
721 
722 private:
723  void makeBeginIterator(IteratorState &it) const;
724  void makeEndIterator(IteratorState &it) const;
725  static bool equals(const IteratorState &x, const IteratorState &other);
726  static void increment(IteratorState &iterator);
727  static void incrementBucket(IteratorState &iterator);
728  static void decrement(IteratorState &iterator);
729  static const char *key(const IteratorState &iterator);
730  static const char *key(const IteratorState &iterator, bool &isStatic);
731  static Value &value(const IteratorState &iterator);
732  static int distance(const IteratorState &x, const IteratorState &y);
733 
734 private:
735  ValueInternalLink *buckets_;
736  ValueInternalLink *tailLink_;
737  BucketIndex bucketsSize_;
738  BucketIndex itemCount_;
739 };
740 
756  friend class Value;
757  friend class ValueIteratorBase;
758 
759 public:
760  enum {
761  itemsPerPage = 8
762  }; // should be a power of 2 for fast divide and modulo.
764  typedef unsigned int PageIndex;
765 
766 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
767  struct IteratorState // Must be a POD
768  {
769  IteratorState() : array_(0), currentPageIndex_(0), currentItemIndex_(0) {}
770  ValueInternalArray *array_;
771  Value **currentPageIndex_;
772  unsigned int currentItemIndex_;
773  };
774 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
775 
778  ValueInternalArray &operator=(const ValueInternalArray &other);
780  void swap(ValueInternalArray &other);
781 
782  void clear();
783  void resize(ArrayIndex newSize);
784 
785  Value &resolveReference(ArrayIndex index);
786 
787  Value *find(ArrayIndex index) const;
788 
789  ArrayIndex size() const;
790 
791  int compare(const ValueInternalArray &other) const;
792 
793 private:
794  static bool equals(const IteratorState &x, const IteratorState &other);
795  static void increment(IteratorState &iterator);
796  static void decrement(IteratorState &iterator);
797  static Value &dereference(const IteratorState &iterator);
798  static Value &unsafeDereference(const IteratorState &iterator);
799  static int distance(const IteratorState &x, const IteratorState &y);
800  static ArrayIndex indexOf(const IteratorState &iterator);
801  void makeBeginIterator(IteratorState &it) const;
802  void makeEndIterator(IteratorState &it) const;
803  void makeIterator(IteratorState &it, ArrayIndex index) const;
804 
805  void makeIndexValid(ArrayIndex index);
806 
807  Value **pages_;
808  ArrayIndex size_;
809  PageIndex pageCount_;
810 };
811 
876 public:
877  virtual ~ValueArrayAllocator();
878  virtual ValueInternalArray *newArray() = 0;
879  virtual ValueInternalArray *newArrayCopy(const ValueInternalArray &other) = 0;
880  virtual void destructArray(ValueInternalArray *array) = 0;
893  virtual void
894  reallocateArrayPageIndex(Value **&indexes,
895  ValueInternalArray::PageIndex &indexCount,
896  ValueInternalArray::PageIndex minNewIndexCount) = 0;
897  virtual void
898  releaseArrayPageIndex(Value **indexes,
899  ValueInternalArray::PageIndex indexCount) = 0;
900  virtual Value *allocateArrayPage() = 0;
901  virtual void releaseArrayPage(Value *value) = 0;
902 };
903 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
904 
909 public:
910  typedef std::bidirectional_iterator_tag iterator_category;
911  typedef unsigned int size_t;
912  typedef int difference_type;
914 
916 #ifndef JSON_VALUE_USE_INTERNAL_MAP
917  explicit ValueIteratorBase(const Value::ObjectValues::iterator &current);
918 #else
919  ValueIteratorBase(const ValueInternalArray::IteratorState &state);
920  ValueIteratorBase(const ValueInternalMap::IteratorState &state);
921 #endif
922 
923  bool operator==(const SelfType &other) const { return isEqual(other); }
924 
925  bool operator!=(const SelfType &other) const { return !isEqual(other); }
926 
927  difference_type operator-(const SelfType &other) const {
928  return computeDistance(other);
929  }
930 
933  Value key() const;
934 
936  UInt index() const;
937 
940  const char *memberName() const;
941 
942 protected:
943  Value &deref() const;
944 
945  void increment();
946 
947  void decrement();
948 
949  difference_type computeDistance(const SelfType &other) const;
950 
951  bool isEqual(const SelfType &other) const;
952 
953  void copy(const SelfType &other);
954 
955 private:
956 #ifndef JSON_VALUE_USE_INTERNAL_MAP
957  Value::ObjectValues::iterator current_;
958  // Indicates that iterator is for a null value.
959  bool isNull_;
960 #else
961  union {
962  ValueInternalArray::IteratorState array_;
963  ValueInternalMap::IteratorState map_;
964  } iterator_;
965  bool isArray_;
966 #endif
967 };
968 
973  friend class Value;
974 
975 public:
976  typedef const Value value_type;
977  typedef unsigned int size_t;
978  typedef int difference_type;
979  typedef const Value &reference;
980  typedef const Value *pointer;
982 
984 
985 private:
988 #ifndef JSON_VALUE_USE_INTERNAL_MAP
989  explicit ValueConstIterator(const Value::ObjectValues::iterator &current);
990 #else
991  ValueConstIterator(const ValueInternalArray::IteratorState &state);
992  ValueConstIterator(const ValueInternalMap::IteratorState &state);
993 #endif
994 public:
995  SelfType &operator=(const ValueIteratorBase &other);
996 
998  SelfType temp(*this);
999  ++*this;
1000  return temp;
1001  }
1002 
1004  SelfType temp(*this);
1005  --*this;
1006  return temp;
1007  }
1008 
1010  decrement();
1011  return *this;
1012  }
1013 
1015  increment();
1016  return *this;
1017  }
1018 
1019  reference operator*() const { return deref(); }
1020 };
1021 
1025  friend class Value;
1026 
1027 public:
1029  typedef unsigned int size_t;
1030  typedef int difference_type;
1031  typedef Value &reference;
1032  typedef Value *pointer;
1034 
1035  ValueIterator();
1036  ValueIterator(const ValueConstIterator &other);
1037  ValueIterator(const ValueIterator &other);
1038 
1039 private:
1042 #ifndef JSON_VALUE_USE_INTERNAL_MAP
1043  explicit ValueIterator(const Value::ObjectValues::iterator &current);
1044 #else
1045  ValueIterator(const ValueInternalArray::IteratorState &state);
1046  ValueIterator(const ValueInternalMap::IteratorState &state);
1047 #endif
1048 public:
1049  SelfType &operator=(const SelfType &other);
1050 
1052  SelfType temp(*this);
1053  ++*this;
1054  return temp;
1055  }
1056 
1058  SelfType temp(*this);
1059  --*this;
1060  return temp;
1061  }
1062 
1064  decrement();
1065  return *this;
1066  }
1067 
1069  increment();
1070  return *this;
1071  }
1072 
1073  reference operator*() const { return deref(); }
1074 };
1075 
1076 } // namespace Json
1077 
1078 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1079 #pragma warning(pop)
1080 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
1081 
1082 #endif // CPPTL_JSON_H_INCLUDED
Json::ValueIteratorBase::operator!=
bool operator!=(const SelfType &other) const
Definition: value.h:925
Json::ValueInternalArray::ArrayIndex
Value::ArrayIndex ArrayIndex
Definition: value.h:763
Json::ValueConstIterator::size_t
unsigned int size_t
Definition: value.h:977
Json::Value::minInt
static const Int minInt
Minimum signed int value that can be stored in a Json::Value.
Definition: value.h:145
Json::ValueType
ValueType
Type of the value held by a Value object.
Definition: value.h:37
Json::Value::maxLargestInt
static const LargestInt maxLargestInt
Maximum signed integer value that can be stored in a Json::Value.
Definition: value.h:140
Json::numberOfCommentPlacement
root value)
Definition: value.h:53
Json::ArrayIndex
unsigned int ArrayIndex
Definition: forwards.h:23
Json::Value::maxLargestUInt
static const LargestUInt maxLargestUInt
Maximum unsigned integer value that can be stored in a Json::Value.
Definition: value.h:142
Json::ValueIterator::reference
Value & reference
Definition: value.h:1031
Json::Value::Int64
Json::Int64 Int64
Definition: value.h:130
Json::uintValue
unsigned integer value
Definition: value.h:40
Json::LargestUInt
UInt64 LargestUInt
Definition: config.h:107
Json::commentAfterOnSameLine
a comment just after a value on the same line
Definition: value.h:50
Json::ValueConstIterator
const iterator for object and array value.
Definition: value.h:972
Json::Int
int Int
Definition: config.h:91
Json::ValueIterator::operator*
reference operator*() const
Definition: value.h:1073
forwards.h
Json::ValueIteratorBase::operator==
bool operator==(const SelfType &other) const
Definition: value.h:923
Json::commentBefore
a comment placed on the line before a value
Definition: value.h:49
Json::stringValue
UTF-8 string value.
Definition: value.h:42
Json::ValueInternalMap::HashKey
unsigned int HashKey
Definition: value.h:669
Json::ValueIterator
Iterator for object and array value.
Definition: value.h:1024
Json::ValueIteratorBase::difference_type
int difference_type
Definition: value.h:912
Json::ValueIterator::operator--
SelfType & operator--()
Definition: value.h:1063
Json::Int64
__int64 Int64
Definition: config.h:100
Json::Value::iterator
ValueIterator iterator
Definition: value.h:124
Json::ValueIterator::operator++
SelfType & operator++()
Definition: value.h:1068
Json::Path
Experimental and untested: represents a "path" to access a node.
Definition: value.h:537
Json::LargestInt
Int64 LargestInt
Definition: config.h:106
Json::UInt
unsigned int UInt
Definition: config.h:92
Json::ValueMapAllocator
Allocator to customize Value internal map.
Definition: value.h:612
Json::commentAfter
a comment on the line after a value (only make sense for
Definition: value.h:51
Json::intValue
signed integer value
Definition: value.h:39
Json::ValueConstIterator::operator++
SelfType operator++(int)
Definition: value.h:997
Json::UInt64
unsigned __int64 UInt64
Definition: config.h:101
Json::ValueIterator::operator--
SelfType operator--(int)
Definition: value.h:1057
Json::Value::Members
std::vector< std::string > Members
Definition: value.h:123
Json::ValueIterator::value_type
Value value_type
Definition: value.h:1028
Json::ValueIteratorBase::map_
ValueInternalMap::IteratorState map_
Definition: value.h:963
Json::arrayValue
array value (ordered list)
Definition: value.h:44
Json::ValueIteratorBase::SelfType
ValueIteratorBase SelfType
Definition: value.h:913
Json::ValueConstIterator::SelfType
ValueConstIterator SelfType
Definition: value.h:981
Json::Value::maxInt
static const Int maxInt
Maximum signed int value that can be stored in a Json::Value.
Definition: value.h:147
Json::Value::Int
Json::Int Int
Definition: value.h:127
Json::ValueInternalMap
A linked page based hash-table implementation used internally by Value.
Definition: value.h:664
Json::Value
Represents a JSON value.
Definition: value.h:116
Json::ValueInternalMap::BucketIndex
unsigned int BucketIndex
Definition: value.h:670
Json::StaticString::StaticString
StaticString(const char *czstring)
Definition: value.h:77
Json::PathArgument
Experimental and untested: represents an element of the "path" to access a node.
Definition: value.h:506
Json::CommentPlacement
CommentPlacement
Definition: value.h:48
Json::ValueConstIterator::difference_type
int difference_type
Definition: value.h:978
Json::ValueIteratorBase::iterator_category
std::bidirectional_iterator_tag iterator_category
Definition: value.h:910
Json::ValueIterator::size_t
unsigned int size_t
Definition: value.h:1029
Json::Value::LargestInt
Json::LargestInt LargestInt
Definition: value.h:132
Json::in
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
Definition: json_reader.cpp:46
Json::ValueInternalArray::PageIndex
unsigned int PageIndex
Definition: value.h:764
Json
JSON (JavaScript Object Notation).
Definition: config.h:90
JSON_API
#define JSON_API
If defined, indicates that the source file is amalgated to prevent private header inclusion.
Definition: config.h:62
Json::Value::minLargestInt
static const LargestInt minLargestInt
Minimum signed integer value that can be stored in a Json::Value.
Definition: value.h:138
Json::Value::UInt
Json::UInt UInt
Definition: value.h:126
Json::ValueConstIterator::value_type
const typedef Value value_type
Definition: value.h:976
Json::ValueArrayAllocator
Experimental: do not use.
Definition: value.h:875
Json::Value::const_iterator
ValueConstIterator const_iterator
Definition: value.h:125
Json::ValueInternalArray
A simplified deque implementation used internally by Value.
Definition: value.h:755
Json::ValueIteratorBase
base class for Value iterators.
Definition: value.h:908
Json::objectValue
object value (collection of name/value pairs).
Definition: value.h:45
Json::ValueConstIterator::operator++
SelfType & operator++()
Definition: value.h:1014
Json::StaticString::c_str
const char * c_str() const
Definition: value.h:81
Json::Value::maxInt64
static const Int64 maxInt64
Maximum signed 64 bits int value that can be stored in a Json::Value.
Definition: value.h:155
Json::Value::LargestUInt
Json::LargestUInt LargestUInt
Definition: value.h:133
Json::Value::ArrayIndex
Json::ArrayIndex ArrayIndex
Definition: value.h:134
Json::ValueConstIterator::operator--
SelfType & operator--()
Definition: value.h:1009
Json::ValueConstIterator::reference
const typedef Value & reference
Definition: value.h:979
Json::ValueIterator::SelfType
ValueIterator SelfType
Definition: value.h:1033
Json::ValueIterator::difference_type
int difference_type
Definition: value.h:1030
Json::ValueConstIterator::operator*
reference operator*() const
Definition: value.h:1019
Json::Value::maxUInt64
static const UInt64 maxUInt64
Maximum unsigned 64 bits int value that can be stored in a Json::Value.
Definition: value.h:157
Json::ValueConstIterator::pointer
const typedef Value * pointer
Definition: value.h:980
Json::booleanValue
bool value
Definition: value.h:43
Json::ValueIteratorBase::array_
ValueInternalArray::IteratorState array_
Definition: value.h:962
Json::nullValue
'null' value
Definition: value.h:38
Json::ValueIteratorBase::operator-
difference_type operator-(const SelfType &other) const
Definition: value.h:927
Json::StaticString
Lightweight wrapper to tag static string.
Definition: value.h:75
Json::realValue
double value
Definition: value.h:41
Json::ValueIterator::operator++
SelfType operator++(int)
Definition: value.h:1051
Json::ValueIterator::pointer
Value * pointer
Definition: value.h:1032
Json::ValueIteratorBase::size_t
unsigned int size_t
Definition: value.h:911
Json::ValueConstIterator::operator--
SelfType operator--(int)
Definition: value.h:1003
Json::Value::UInt64
Json::UInt64 UInt64
Definition: value.h:129
Json::Value::maxUInt
static const UInt maxUInt
Maximum unsigned int value that can be stored in a Json::Value.
Definition: value.h:149