Twitch SDK (Internal)
value.h
Go to the documentation of this file.
1 #ifndef CPPTL_JSON_H_INCLUDED
2 # define CPPTL_JSON_H_INCLUDED
3 
4 # include "forwards.h"
5 # include <string>
6 # include <vector>
7 
8 # ifndef JSON_USE_CPPTL_SMALLMAP
9 # include <map>
10 # else
11 # include <cpptl/smallmap.h>
12 # endif
13 # ifdef JSON_USE_CPPTL
14 # include <cpptl/forwards.h>
15 # endif
16 
20 namespace ttv {
21 
22  namespace json {
23 
26  enum ValueType : uint8_t
27  {
28  nullValue = 0,
36  };
37 
39  {
44  };
45 
46  //# ifdef JSON_USE_CPPTL
47  // typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
48  // typedef CppTL::AnyEnumerator<const Value &> EnumValues;
49  //# endif
50 
66  {
67  public:
68  explicit StaticString( const char *czstring )
69  : str_( czstring )
70  {
71  }
72 
73  operator const char *() const
74  {
75  return str_;
76  }
77 
78  const char *c_str() const
79  {
80  return str_;
81  }
82 
83  private:
84  const char *str_;
85  };
86 
115  {
116  friend class ValueIteratorBase;
117  # ifdef JSON_VALUE_USE_INTERNAL_MAP
118  friend class ValueInternalLink;
119  friend class ValueInternalMap;
120  # endif
121  public:
122  typedef std::vector<std::string> Members;
126  typedef json::Int64 Int;
127  typedef UInt ArrayIndex;
128 
129  static const Value null;
130  static const Int minInt;
131  static const Int maxInt;
132  static const UInt maxUInt;
133 
134  private:
135  #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
136  # ifndef JSON_VALUE_USE_INTERNAL_MAP
137  class CZString
138  {
139  public:
141  {
142  noDuplication = 0,
144  duplicateOnCopy
145  };
146  CZString( Int index );
147  CZString( const char *cstr, DuplicationPolicy allocate );
148  CZString( const CZString &other );
149  ~CZString();
150  CZString &operator =( const CZString &other );
151  bool operator<( const CZString &other ) const;
152  bool operator==( const CZString &other ) const;
153  Int index() const;
154  const char *c_str() const;
155  bool isStaticString() const;
156  private:
157  void swap( CZString &other );
158  const char *cstr_;
159  Int index_;
160  };
161 
162  public:
163  # ifndef JSON_USE_CPPTL_SMALLMAP
164  typedef std::map<CZString, Value> ObjectValues;
165  # else
166  typedef CppTL::SmallMap<CZString, Value> ObjectValues;
167  # endif // ifndef JSON_USE_CPPTL_SMALLMAP
168  # endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
169  #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
170 
171  public:
187  Value( ValueType type = nullValue );
188  Value( Int value );
189  Value( UInt value );
190  Value( double value );
191  Value( const char *value );
192  Value( const char *beginValue, const char *endValue );
203  Value( const StaticString &value );
204  Value( const std::string &value );
205  # ifdef JSON_USE_CPPTL
206  Value( const CppTL::ConstString &value );
207  # endif
208  Value( bool value );
209  Value( const Value &other );
210  ~Value();
211 
212  Value &operator=( const Value &other );
216  void swap( Value &other );
217 
218  ValueType type() const;
219 
220  bool operator <( const Value &other ) const;
221  bool operator <=( const Value &other ) const;
222  bool operator >=( const Value &other ) const;
223  bool operator >( const Value &other ) const;
224 
225  bool operator ==( const Value &other ) const;
226  bool operator !=( const Value &other ) const;
227 
228  int compare( const Value &other );
229 
230  const char *asCString() const;
231  std::string asString() const;
232  # ifdef JSON_USE_CPPTL
233  CppTL::ConstString asConstString() const;
234  # endif
235  Int asInt() const;
236  UInt asUInt() const;
237  double asDouble() const;
238  bool asBool() const;
239 
240  bool isNull() const;
241  bool isBool() const;
242  bool isInt() const;
243  bool isUInt() const;
244  bool isIntegral() const;
245  bool isDouble() const;
246  bool isNumeric() const;
247  bool isString() const;
248  bool isArray() const;
249  bool isNonNullArray() const;
250  bool isObject() const;
251  bool isNonNullObject() const;
252 
253  bool isConvertibleTo( ValueType other ) const;
254 
256  UInt size() const;
257 
260  bool empty() const;
261 
263  bool operator!() const;
264 
268  void clear();
269 
275  void resize( UInt size );
276 
282  Value &operator[]( UInt index );
286  const Value &operator[]( UInt index ) const;
289  Value get( UInt index,
290  const Value &defaultValue ) const;
292  bool isValidIndex( UInt index ) const;
296  Value &append( const Value &value );
297 
299  Value &operator[]( const char *key );
301  const Value &operator[]( const char *key ) const;
303  Value &operator[]( const std::string &key );
305  const Value &operator[]( const std::string &key ) const;
317  Value &operator[]( const StaticString &key );
318  # ifdef JSON_USE_CPPTL
319  Value &operator[]( const CppTL::ConstString &key );
322  const Value &operator[]( const CppTL::ConstString &key ) const;
323  # endif
324  Value get( const char *key,
326  const Value &defaultValue ) const;
328  Value get( const std::string &key,
329  const Value &defaultValue ) const;
330  # ifdef JSON_USE_CPPTL
331  Value get( const CppTL::ConstString &key,
333  const Value &defaultValue ) const;
334  # endif
335  Value removeMember( const char* key );
343  Value removeMember( const std::string &key );
344 
346  bool isMember( const char *key ) const;
348  bool isMember( const std::string &key ) const;
349  # ifdef JSON_USE_CPPTL
350  bool isMember( const CppTL::ConstString &key ) const;
352  # endif
353 
359  Members getMemberNames() const;
360 
361  //# ifdef JSON_USE_CPPTL
362  // EnumMemberNames enumMemberNames() const;
363  // EnumValues enumValues() const;
364  //# endif
365 
367  void setComment( const char *comment,
368  CommentPlacement placement );
370  void setComment( const std::string &comment,
371  CommentPlacement placement );
372  bool hasComment( CommentPlacement placement ) const;
374  std::string getComment( CommentPlacement placement ) const;
375 
376  std::string toStyledString() const;
377 
378  const_iterator begin() const;
379  const_iterator end() const;
380 
381  iterator begin();
382  iterator end();
383 
384  private:
385  Value &resolveReference( const char *key,
386  bool isStatic );
387 
388  # ifdef JSON_VALUE_USE_INTERNAL_MAP
389  inline bool isItemAvailable() const
390  {
391  return itemIsUsed_ == 0;
392  }
393 
394  inline void setItemUsed( bool isUsed = true )
395  {
396  itemIsUsed_ = isUsed ? 1 : 0;
397  }
398 
399  inline bool isMemberNameStatic() const
400  {
401  return memberNameIsStatic_ == 0;
402  }
403 
404  inline void setMemberNameIsStatic( bool isStatic )
405  {
406  memberNameIsStatic_ = isStatic ? 1 : 0;
407  }
408  # endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
409 
410  private:
411  struct CommentInfo
412  {
413  CommentInfo();
414  ~CommentInfo();
415 
416  void setComment( const char *text );
417 
418  char *comment_;
419  };
420 
421  //struct MemberNamesTransform
422  //{
423  // typedef const char *result_type;
424  // const char *operator()( const CZString &name ) const
425  // {
426  // return name.c_str();
427  // }
428  //};
429 
431  {
432  Int int_;
433  UInt uint_;
434  double real_;
435  bool bool_;
436  char *string_;
437  # ifdef JSON_VALUE_USE_INTERNAL_MAP
438  ValueInternalArray *array_;
439  ValueInternalMap *map_;
440  #else
441  ObjectValues *map_;
442  # endif
443  } value_;
445  int allocated_ : 1; // Notes: if declared as bool, bitfield is useless.
446  # ifdef JSON_VALUE_USE_INTERNAL_MAP
447  unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap container.
448  int memberNameIsStatic_ : 1; // used by the ValueInternalMap container.
449  # endif
451  };
452 
453 
457  {
458  public:
459  friend class Path;
460 
461  PathArgument();
462  PathArgument( UInt index );
463  PathArgument( const char *key );
464  PathArgument( const std::string &key );
465 
466  private:
467  enum Kind
468  {
469  kindNone = 0,
471  kindKey
472  };
473  std::string key_;
476  };
477 
489  class Path
490  {
491  public:
492  Path( const std::string &path,
493  const PathArgument &a1 = PathArgument(),
494  const PathArgument &a2 = PathArgument(),
495  const PathArgument &a3 = PathArgument(),
496  const PathArgument &a4 = PathArgument(),
497  const PathArgument &a5 = PathArgument() );
498 
499  const Value &resolve( const Value &root ) const;
500  Value resolve( const Value &root,
501  const Value &defaultValue ) const;
503  Value &make( Value &root ) const;
504 
505  private:
506  typedef std::vector<const PathArgument *> InArgs;
507  typedef std::vector<PathArgument> Args;
508 
509  void makePath( const std::string &path,
510  const InArgs &in );
511  void addPathInArg( const std::string &path,
512  const InArgs &in,
513  InArgs::const_iterator &itInArg,
514  PathArgument::Kind kind );
515  void invalidPath( const std::string &path,
516  int location );
517 
518  Args args_;
519  };
520 
529  {
530  public:
531  static const unsigned int unknown = static_cast<unsigned int>(-1);
532 
533  virtual ~ValueAllocator();
534 
535  virtual char *makeMemberName( const char *memberName ) = 0;
536  virtual void releaseMemberName( char *memberName ) = 0;
537  virtual char *duplicateStringValue( const char *value,
538  unsigned int length = unknown ) = 0;
539  virtual void releaseStringValue( char *value ) = 0;
540  };
541 
542  #ifdef JSON_VALUE_USE_INTERNAL_MAP
543 
587  class JSON_API ValueMapAllocator
588  {
589  public:
590  virtual ~ValueMapAllocator();
591  virtual ValueInternalMap *newMap() = 0;
592  virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0;
593  virtual void destructMap( ValueInternalMap *map ) = 0;
594  virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0;
595  virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
596  virtual ValueInternalLink *allocateMapLink() = 0;
597  virtual void releaseMapLink( ValueInternalLink *link ) = 0;
598  };
599 
603  class JSON_API ValueInternalLink
604  {
605  public:
606  enum { itemPerLink = 6 }; // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
607  enum InternalFlags {
608  flagAvailable = 0,
609  flagUsed = 1
610  };
611 
612  ValueInternalLink();
613 
614  ~ValueInternalLink();
615 
616  Value items_[itemPerLink];
617  char *keys_[itemPerLink];
618  ValueInternalLink *previous_;
619  ValueInternalLink *next_;
620  };
621 
622 
635  class JSON_API ValueInternalMap
636  {
637  friend class ValueIteratorBase;
638  friend class Value;
639  public:
640  typedef unsigned int HashKey;
641  typedef unsigned int BucketIndex;
642 
643  # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
644  struct IteratorState
645  {
646  IteratorState()
647  : map_(0)
648  , link_(0)
649  , itemIndex_(0)
650  , bucketIndex_(0)
651  {
652  }
653  ValueInternalMap *map_;
654  ValueInternalLink *link_;
655  BucketIndex itemIndex_;
656  BucketIndex bucketIndex_;
657  };
658  # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
659 
660  ValueInternalMap();
661  ValueInternalMap( const ValueInternalMap &other );
662  ValueInternalMap &operator =( const ValueInternalMap &other );
663  ~ValueInternalMap();
664 
665  void swap( ValueInternalMap &other );
666 
667  BucketIndex size() const;
668 
669  void clear();
670 
671  bool reserveDelta( BucketIndex growth );
672 
673  bool reserve( BucketIndex newItemCount );
674 
675  const Value *find( const char *key ) const;
676 
677  Value *find( const char *key );
678 
679  Value &resolveReference( const char *key,
680  bool isStatic );
681 
682  void remove( const char *key );
683 
684  void doActualRemove( ValueInternalLink *link,
685  BucketIndex index,
686  BucketIndex bucketIndex );
687 
688  ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
689 
690  Value &setNewItem( const char *key,
691  bool isStatic,
692  ValueInternalLink *link,
693  BucketIndex index );
694 
695  Value &unsafeAdd( const char *key,
696  bool isStatic,
697  HashKey hashedKey );
698 
699  HashKey hash( const char *key ) const;
700 
701  int compare( const ValueInternalMap &other ) const;
702 
703  private:
704  void makeBeginIterator( IteratorState &it ) const;
705  void makeEndIterator( IteratorState &it ) const;
706  static bool equals( const IteratorState &x, const IteratorState &other );
707  static void increment( IteratorState &iterator );
708  static void incrementBucket( IteratorState &iterator );
709  static void decrement( IteratorState &iterator );
710  static const char *key( const IteratorState &iterator );
711  static const char *key( const IteratorState &iterator, bool &isStatic );
712  static Value &value( const IteratorState &iterator );
713  static int distance( const IteratorState &x, const IteratorState &y );
714 
715  private:
716  ValueInternalLink *buckets_;
717  ValueInternalLink *tailLink_;
718  BucketIndex bucketsSize_;
719  BucketIndex itemCount_;
720  };
721 
733  class JSON_API ValueInternalArray
734  {
735  friend class Value;
736  friend class ValueIteratorBase;
737  public:
738  enum { itemsPerPage = 8 }; // should be a power of 2 for fast divide and modulo.
739  typedef Value::ArrayIndex ArrayIndex;
740  typedef unsigned int PageIndex;
741 
742  # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
743  struct IteratorState // Must be a POD
744  {
745  IteratorState()
746  : array_(0)
747  , currentPageIndex_(0)
748  , currentItemIndex_(0)
749  {
750  }
751  ValueInternalArray *array_;
752  Value **currentPageIndex_;
753  unsigned int currentItemIndex_;
754  };
755  # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
756 
757  ValueInternalArray();
758  ValueInternalArray( const ValueInternalArray &other );
759  ValueInternalArray &operator =( const ValueInternalArray &other );
760  ~ValueInternalArray();
761  void swap( ValueInternalArray &other );
762 
763  void clear();
764  void resize( ArrayIndex newSize );
765 
766  Value &resolveReference( ArrayIndex index );
767 
768  Value *find( ArrayIndex index ) const;
769 
770  ArrayIndex size() const;
771 
772  int compare( const ValueInternalArray &other ) const;
773 
774  private:
775  static bool equals( const IteratorState &x, const IteratorState &other );
776  static void increment( IteratorState &iterator );
777  static void decrement( IteratorState &iterator );
778  static Value &dereference( const IteratorState &iterator );
779  static Value &unsafeDereference( const IteratorState &iterator );
780  static int distance( const IteratorState &x, const IteratorState &y );
781  static ArrayIndex indexOf( const IteratorState &iterator );
782  void makeBeginIterator( IteratorState &it ) const;
783  void makeEndIterator( IteratorState &it ) const;
784  void makeIterator( IteratorState &it, ArrayIndex index ) const;
785 
786  void makeIndexValid( ArrayIndex index );
787 
788  Value **pages_;
789  ArrayIndex size_;
790  PageIndex pageCount_;
791  };
792 
852  class JSON_API ValueArrayAllocator
853  {
854  public:
855  virtual ~ValueArrayAllocator();
856  virtual ValueInternalArray *newArray() = 0;
857  virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0;
858  virtual void destructArray( ValueInternalArray *array ) = 0;
870  virtual void reallocateArrayPageIndex( Value **&indexes,
871  ValueInternalArray::PageIndex &indexCount,
872  ValueInternalArray::PageIndex minNewIndexCount ) = 0;
873  virtual void releaseArrayPageIndex( Value **indexes,
874  ValueInternalArray::PageIndex indexCount ) = 0;
875  virtual Value *allocateArrayPage() = 0;
876  virtual void releaseArrayPage( Value *value ) = 0;
877  };
878  #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
879 
880 
885  {
886  public:
887  typedef unsigned int size_t;
888  typedef int difference_type;
890 
892  #ifndef JSON_VALUE_USE_INTERNAL_MAP
893  explicit ValueIteratorBase( const Value::ObjectValues::iterator &current );
894  #else
895  ValueIteratorBase( const ValueInternalArray::IteratorState &state );
896  ValueIteratorBase( const ValueInternalMap::IteratorState &state );
897  #endif
898 
899  bool operator ==( const SelfType &other ) const
900  {
901  return isEqual( other );
902  }
903 
904  bool operator !=( const SelfType &other ) const
905  {
906  return !isEqual( other );
907  }
908 
909  difference_type operator -( const SelfType &other ) const
910  {
911  return computeDistance( other );
912  }
913 
915  Value key() const;
916 
918  Value::Int index() const;
919 
921  const char *memberName() const;
922 
923  protected:
924  Value &deref() const;
925 
926  void increment();
927 
928  void decrement();
929 
930  difference_type computeDistance( const SelfType &other ) const;
931 
932  bool isEqual( const SelfType &other ) const;
933 
934  void copy( const SelfType &other );
935 
936  private:
937  #ifndef JSON_VALUE_USE_INTERNAL_MAP
938  Value::ObjectValues::iterator current_;
939  // Indicates that iterator is for a null value.
940  bool isNull_;
941  #else
942  union
943  {
944  ValueInternalArray::IteratorState array_;
945  ValueInternalMap::IteratorState map_;
946  } iterator_;
947  bool isArray_;
948  #endif
949  };
950 
955  {
956  friend class Value;
957  public:
958  typedef unsigned int size_t;
959  typedef int difference_type;
960  typedef const Value &reference;
961  typedef const Value *pointer;
963 
965  private:
968  #ifndef JSON_VALUE_USE_INTERNAL_MAP
969  explicit ValueConstIterator( const Value::ObjectValues::iterator &current );
970  #else
971  ValueConstIterator( const ValueInternalArray::IteratorState &state );
972  ValueConstIterator( const ValueInternalMap::IteratorState &state );
973  #endif
974  public:
975  SelfType &operator =( const ValueIteratorBase &other );
976 
977  SelfType operator++( int )
978  {
979  SelfType temp( *this );
980  ++*this;
981  return temp;
982  }
983 
984  SelfType operator--( int )
985  {
986  SelfType temp( *this );
987  --*this;
988  return temp;
989  }
990 
991  SelfType &operator--()
992  {
993  decrement();
994  return *this;
995  }
996 
997  SelfType &operator++()
998  {
999  increment();
1000  return *this;
1001  }
1002 
1003  reference operator *() const
1004  {
1005  return deref();
1006  }
1007  };
1008 
1009 
1013  {
1014  friend class Value;
1015  public:
1016  typedef unsigned int size_t;
1017  typedef int difference_type;
1018  typedef Value &reference;
1019  typedef Value *pointer;
1021 
1022  ValueIterator();
1023  ValueIterator( const ValueConstIterator &other );
1024  ValueIterator( const ValueIterator &other );
1025  private:
1028  #ifndef JSON_VALUE_USE_INTERNAL_MAP
1029  explicit ValueIterator( const Value::ObjectValues::iterator &current );
1030  #else
1031  ValueIterator( const ValueInternalArray::IteratorState &state );
1032  ValueIterator( const ValueInternalMap::IteratorState &state );
1033  #endif
1034  public:
1035 
1036  SelfType &operator =( const SelfType &other );
1037 
1038  SelfType operator++( int )
1039  {
1040  SelfType temp( *this );
1041  ++*this;
1042  return temp;
1043  }
1044 
1045  SelfType operator--( int )
1046  {
1047  SelfType temp( *this );
1048  --*this;
1049  return temp;
1050  }
1051 
1052  SelfType &operator--()
1053  {
1054  decrement();
1055  return *this;
1056  }
1057 
1058  SelfType &operator++()
1059  {
1060  increment();
1061  return *this;
1062  }
1063 
1064  reference operator *() const
1065  {
1066  return deref();
1067  }
1068  };
1069 
1070 
1071  } // namespace json
1072 
1073 } // namespace ttv
1074 
1075 
1076 #endif // CPPTL_JSON_H_INCLUDED
char * string_
Definition: value.h:436
int64_t Int64
Definition: forwards.h:24
UInt ArrayIndex
Definition: value.h:127
DuplicationPolicy
Definition: value.h:140
Kind
Definition: value.h:467
#define JSON_API
Definition: config.h:40
std::string key_
Definition: value.h:473
a comment placed on the line before a value
Definition: value.h:40
ObjectValues * map_
Definition: value.h:441
SelfType operator--(int)
Definition: value.h:1045
SelfType & operator++()
Definition: value.h:997
std::vector< const PathArgument * > InArgs
Definition: value.h:506
array value (ordered list)
Definition: value.h:34
Definition: value.h:470
UInt index_
Definition: value.h:474
static const Int maxInt
Definition: value.h:131
unsigned int size_t
Definition: value.h:1016
a comment on the line after a value (only make sense for root value)
Definition: value.h:42
char * comment_
Definition: value.h:418
std::vector< std::string > Members
Definition: value.h:122
Experimental and untested: represents a "path" to access a node.
Definition: value.h:489
signed integer value
Definition: value.h:29
UTF-8 string value.
Definition: value.h:32
Iterator for object and array value.
Definition: value.h:1012
int difference_type
Definition: value.h:959
int allocated_
Definition: value.h:445
SelfType & operator--()
Definition: value.h:1052
SelfType operator++(int)
Definition: value.h:977
static const Value null
Definition: value.h:129
bool isNull_
Definition: value.h:940
bool value
Definition: value.h:33
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
json::UInt64 UInt
Definition: value.h:125
json::Int64 Int
Definition: value.h:126
Lightweight wrapper to tag static string.
Definition: value.h:65
Value & reference
Definition: value.h:1018
Represents a JSON value.
Definition: value.h:114
ValueIteratorBase SelfType
Definition: value.h:889
const Value & reference
Definition: value.h:960
Args args_
Definition: value.h:518
Int index_
Definition: value.h:159
static const UInt maxUInt
Definition: value.h:132
int difference_type
Definition: value.h:888
Definition: value.h:411
base class for Value iterators.
Definition: value.h:884
StaticString(const char *czstring)
Definition: value.h:68
const Value * pointer
Definition: value.h:961
a comment just after a value on the same line
Definition: value.h:41
Kind kind_
Definition: value.h:475
SelfType operator--(int)
Definition: value.h:984
std::vector< PathArgument > Args
Definition: value.h:507
Value::ObjectValues::iterator current_
Definition: value.h:938
ValueConstIterator const_iterator
Definition: value.h:124
unsigned integer value
Definition: value.h:30
uint64_t UInt64
Definition: forwards.h:25
Value * pointer
Definition: value.h:1019
static const Int minInt
Definition: value.h:130
Definition: value.h:137
bool bool_
Definition: value.h:435
const char * str_
Definition: value.h:84
&#39;null&#39; value
Definition: value.h:28
UInt uint_
Definition: value.h:433
const char * cstr_
Definition: value.h:158
ValueConstIterator SelfType
Definition: value.h:962
ValueType type_
Definition: value.h:444
ValueType
Type of the value held by a Value object.
Definition: value.h:26
std::map< CZString, Value > ObjectValues
Definition: value.h:164
object value (collection of name/value pairs).
Definition: value.h:35
uint32_t UInt
Definition: forwards.h:23
SelfType & operator++()
Definition: value.h:1058
Experimental and untested: represents an element of the "path" to access a node.
Definition: value.h:456
const iterator for object and array value.
Definition: value.h:954
unsigned int size_t
Definition: value.h:887
int difference_type
Definition: value.h:1017
unsigned int size_t
Definition: value.h:958
ValueIterator iterator
Definition: value.h:123
double real_
Definition: value.h:434
CommentPlacement
Definition: value.h:38
Int int_
Definition: value.h:432
Experimental do not use: Allocator to customize member name and string value memory management done b...
Definition: value.h:528
Definition: value.h:430
const char * c_str() const
Definition: value.h:78
CommentInfo * comments_
Definition: value.h:450
double value
Definition: value.h:31
SelfType operator++(int)
Definition: value.h:1038
ValueIterator SelfType
Definition: value.h:1020
SelfType & operator--()
Definition: value.h:991