CMS 3D CMS Logo

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 
19 namespace Json {
20 
23  enum ValueType {
24  nullValue = 0,
32  };
33 
39  };
40 
41  //# ifdef JSON_USE_CPPTL
42  // typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
43  // typedef CppTL::AnyEnumerator<const Value &> EnumValues;
44  //# endif
45 
61  public:
62  explicit StaticString(const char *czstring) : str_(czstring) {}
63 
64  operator const char *() const { return str_; }
65 
66  const char *c_str() const { return str_; }
67 
68  private:
69  const char *str_;
70  };
71 
99  class JSON_API Value {
100  friend class ValueIteratorBase;
101 #ifdef JSON_VALUE_USE_INTERNAL_MAP
102  friend class ValueInternalLink;
103  friend class ValueInternalMap;
104 #endif
105  public:
106  typedef std::vector<std::string> Members;
109  typedef Json::UInt UInt;
110  typedef Json::Int Int;
111  typedef UInt ArrayIndex;
112 
113  static const Value null;
114  static const Int minInt;
115  static const Int maxInt;
116  static const UInt maxUInt;
117 
118  private:
119 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
120 #ifndef JSON_VALUE_USE_INTERNAL_MAP
121  class CZString {
122  public:
123  enum DuplicationPolicy { noDuplication = 0, duplicate, duplicateOnCopy };
124  CZString(int index);
125  CZString(const char *cstr, DuplicationPolicy allocate);
126  CZString(const CZString &other);
127  ~CZString();
128  CZString &operator=(const CZString &other);
129  bool operator<(const CZString &other) const;
130  bool operator==(const CZString &other) const;
131  int index() const;
132  const char *c_str() const;
133  bool isStaticString() const;
134 
135  private:
136  void swap(CZString &other);
137  const char *cstr_;
138  int index_;
139  };
140 
141  public:
142 #ifndef JSON_USE_CPPTL_SMALLMAP
143  typedef std::map<CZString, Value> ObjectValues;
144 #else
145  typedef CppTL::SmallMap<CZString, Value> ObjectValues;
146 #endif // ifndef JSON_USE_CPPTL_SMALLMAP
147 #endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
148 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
149 
150  public:
167  Value(Int value);
168  Value(UInt value);
169  Value(double value);
170  Value(const char *value);
171  Value(const char *beginValue, const char *endValue);
182  Value(const StaticString &value);
183  Value(const std::string &value);
184 #ifdef JSON_USE_CPPTL
185  Value(const CppTL::ConstString &value);
186 #endif
187  Value(bool value);
188  Value(const Value &other);
189  ~Value();
190 
191  Value &operator=(const Value &other);
195  void swap(Value &other);
196 
197  ValueType type() const;
198 
199  bool operator<(const Value &other) const;
200  bool operator<=(const Value &other) const;
201  bool operator>=(const Value &other) const;
202  bool operator>(const Value &other) const;
203 
204  bool operator==(const Value &other) const;
205  bool operator!=(const Value &other) const;
206 
207  int compare(const Value &other);
208 
209  const char *asCString() const;
210  std::string asString() const;
211 #ifdef JSON_USE_CPPTL
212  CppTL::ConstString asConstString() const;
213 #endif
214  Int asInt() const;
215  UInt asUInt() const;
216  double asDouble() const;
217  bool asBool() const;
218 
219  bool isNull() const;
220  bool isBool() const;
221  bool isInt() const;
222  bool isUInt() const;
223  bool isIntegral() const;
224  bool isDouble() const;
225  bool isNumeric() const;
226  bool isString() const;
227  bool isArray() const;
228  bool isObject() const;
229 
230  bool isConvertibleTo(ValueType other) const;
231 
233  UInt size() const;
234 
237  bool empty() const;
238 
240  bool operator!() const;
241 
245  void clear();
246 
252  void resize(UInt size);
253 
263  const Value &operator[](UInt index) const;
266  Value get(UInt index, const Value &defaultValue) const;
268  bool isValidIndex(UInt index) const;
272  Value &append(const Value &value);
273 
275  Value &operator[](const char *key);
277  const Value &operator[](const char *key) const;
279  Value &operator[](const std::string &key);
281  const Value &operator[](const std::string &key) const;
293  Value &operator[](const StaticString &key);
294 #ifdef JSON_USE_CPPTL
295  Value &operator[](const CppTL::ConstString &key);
298  const Value &operator[](const CppTL::ConstString &key) const;
299 #endif
300  Value get(const char *key, const Value &defaultValue) const;
303  Value get(const std::string &key, const Value &defaultValue) const;
304 #ifdef JSON_USE_CPPTL
305  Value get(const CppTL::ConstString &key, const Value &defaultValue) const;
307 #endif
308  Value removeMember(const char *key);
316  Value removeMember(const std::string &key);
317 
319  bool isMember(const char *key) const;
321  bool isMember(const std::string &key) const;
322 #ifdef JSON_USE_CPPTL
323  bool isMember(const CppTL::ConstString &key) const;
325 #endif
326 
332  Members getMemberNames() const;
333 
334  //# ifdef JSON_USE_CPPTL
335  // EnumMemberNames enumMemberNames() const;
336  // EnumValues enumValues() const;
337  //# endif
338 
340  void setComment(const char *comment, CommentPlacement placement);
342  void setComment(const std::string &comment, CommentPlacement placement);
343  bool hasComment(CommentPlacement placement) const;
345  std::string getComment(CommentPlacement placement) const;
346 
347  std::string toStyledString() const;
348 
349  const_iterator begin() const;
350  const_iterator end() const;
351 
352  iterator begin();
353  iterator end();
354 
355  private:
356  Value &resolveReference(const char *key, bool isStatic);
357 
358 #ifdef JSON_VALUE_USE_INTERNAL_MAP
359  inline bool isItemAvailable() const { return itemIsUsed_ == 0; }
360 
361  inline void setItemUsed(bool isUsed = true) { itemIsUsed_ = isUsed ? 1 : 0; }
362 
363  inline bool isMemberNameStatic() const { return memberNameIsStatic_ == 0; }
364 
365  inline void setMemberNameIsStatic(bool isStatic) { memberNameIsStatic_ = isStatic ? 1 : 0; }
366 #endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
367 
368  private:
369  struct CommentInfo {
370  CommentInfo();
371  ~CommentInfo();
372 
373  void setComment(const char *text);
374 
375  char *comment_;
376  };
377 
378  //struct MemberNamesTransform
379  //{
380  // typedef const char *result_type;
381  // const char *operator()( const CZString &name ) const
382  // {
383  // return name.c_str();
384  // }
385  //};
386 
387  union ValueHolder {
390  double real_;
391  bool bool_;
392  char *string_;
393 #ifdef JSON_VALUE_USE_INTERNAL_MAP
394  ValueInternalArray *array_;
395  ValueInternalMap *map_;
396 #else
398 #endif
399  } value_;
401  int allocated_ : 1; // Notes: if declared as bool, bitfield is useless.
402 #ifdef JSON_VALUE_USE_INTERNAL_MAP
403  unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap container.
404  int memberNameIsStatic_ : 1; // used by the ValueInternalMap container.
405 #endif
407  };
408 
411  class PathArgument {
412  public:
413  friend class Path;
414 
415  PathArgument();
417  PathArgument(const char *key);
418  PathArgument(const std::string &key);
419 
420  private:
421  enum Kind { kindNone = 0, kindIndex, kindKey };
425  };
426 
438  class Path {
439  public:
440  Path(const std::string &path,
441  const PathArgument &a1 = PathArgument(),
442  const PathArgument &a2 = PathArgument(),
443  const PathArgument &a3 = PathArgument(),
444  const PathArgument &a4 = PathArgument(),
445  const PathArgument &a5 = PathArgument());
446 
447  const Value &resolve(const Value &root) const;
448  Value resolve(const Value &root, const Value &defaultValue) const;
450  Value &make(Value &root) const;
451 
452  private:
453  typedef std::vector<const PathArgument *> InArgs;
454  typedef std::vector<PathArgument> Args;
455 
456  void makePath(const std::string &path, const InArgs &in);
457  void addPathInArg(const std::string &path,
458  const InArgs &in,
459  InArgs::const_iterator &itInArg,
461  void invalidPath(const std::string &path, int location);
462 
464  };
465 
474  public:
475  enum { unknown = (unsigned)-1 };
476 
477  virtual ~ValueAllocator();
478 
479  virtual char *makeMemberName(const char *memberName) const = 0;
480  virtual void releaseMemberName(char *memberName) const = 0;
481  virtual char *duplicateStringValue(const char *value, unsigned int length = unknown) const = 0;
482  virtual void releaseStringValue(char *value) const = 0;
483  };
484 
485 #ifdef JSON_VALUE_USE_INTERNAL_MAP
486 
530  class JSON_API ValueMapAllocator {
531  public:
532  virtual ~ValueMapAllocator();
533  virtual ValueInternalMap *newMap() = 0;
534  virtual ValueInternalMap *newMapCopy(const ValueInternalMap &other) = 0;
535  virtual void destructMap(ValueInternalMap *map) = 0;
536  virtual ValueInternalLink *allocateMapBuckets(unsigned int size) = 0;
537  virtual void releaseMapBuckets(ValueInternalLink *links) = 0;
538  virtual ValueInternalLink *allocateMapLink() = 0;
539  virtual void releaseMapLink(ValueInternalLink *link) = 0;
540  };
541 
545  class JSON_API ValueInternalLink {
546  public:
547  enum { itemPerLink = 6 }; // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
548  enum InternalFlags { flagAvailable = 0, flagUsed = 1 };
549 
550  ValueInternalLink();
551 
552  ~ValueInternalLink();
553 
554  Value items_[itemPerLink];
555  char *keys_[itemPerLink];
556  ValueInternalLink *previous_;
557  ValueInternalLink *next_;
558  };
559 
572  class JSON_API ValueInternalMap {
573  friend class ValueIteratorBase;
574  friend class Value;
575 
576  public:
577  typedef unsigned int HashKey;
578  typedef unsigned int BucketIndex;
579 
580 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
581  struct IteratorState {
582  IteratorState() : map_(0), link_(0), itemIndex_(0), bucketIndex_(0) {}
583  ValueInternalMap *map_;
584  ValueInternalLink *link_;
585  BucketIndex itemIndex_;
586  BucketIndex bucketIndex_;
587  };
588 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
589 
590  ValueInternalMap();
591  ValueInternalMap(const ValueInternalMap &other);
592  ValueInternalMap &operator=(const ValueInternalMap &other);
593  ~ValueInternalMap();
594 
595  void swap(ValueInternalMap &other);
596 
597  BucketIndex size() const;
598 
599  void clear();
600 
601  bool reserveDelta(BucketIndex growth);
602 
603  bool reserve(BucketIndex newItemCount);
604 
605  const Value *find(const char *key) const;
606 
607  Value *find(const char *key);
608 
609  Value &resolveReference(const char *key, bool isStatic);
610 
611  void remove(const char *key);
612 
613  void doActualRemove(ValueInternalLink *link, BucketIndex index, BucketIndex bucketIndex);
614 
615  ValueInternalLink *&getLastLinkInBucket(BucketIndex bucketIndex);
616 
617  Value &setNewItem(const char *key, bool isStatic, ValueInternalLink *link, BucketIndex index);
618 
619  Value &unsafeAdd(const char *key, bool isStatic, HashKey hashedKey);
620 
621  HashKey hash(const char *key) const;
622 
623  int compare(const ValueInternalMap &other) const;
624 
625  private:
626  void makeBeginIterator(IteratorState &it) const;
627  void makeEndIterator(IteratorState &it) const;
628  static bool equals(const IteratorState &x, const IteratorState &other);
629  static void increment(IteratorState &iterator);
630  static void incrementBucket(IteratorState &iterator);
631  static void decrement(IteratorState &iterator);
632  static const char *key(const IteratorState &iterator);
633  static const char *key(const IteratorState &iterator, bool &isStatic);
634  static Value &value(const IteratorState &iterator);
635  static int distance(const IteratorState &x, const IteratorState &y);
636 
637  private:
638  ValueInternalLink *buckets_;
639  ValueInternalLink *tailLink_;
640  BucketIndex bucketsSize_;
641  BucketIndex itemCount_;
642  };
643 
655  class JSON_API ValueInternalArray {
656  friend class Value;
657  friend class ValueIteratorBase;
658 
659  public:
660  enum { itemsPerPage = 8 }; // should be a power of 2 for fast divide and modulo.
661  typedef Value::ArrayIndex ArrayIndex;
662  typedef unsigned int PageIndex;
663 
664 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
665  struct IteratorState // Must be a POD
666  {
667  IteratorState() : array_(0), currentPageIndex_(0), currentItemIndex_(0) {}
668  ValueInternalArray *array_;
669  Value **currentPageIndex_;
670  unsigned int currentItemIndex_;
671  };
672 #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
673 
674  ValueInternalArray();
675  ValueInternalArray(const ValueInternalArray &other);
676  ValueInternalArray &operator=(const ValueInternalArray &other);
677  ~ValueInternalArray();
678  void swap(ValueInternalArray &other);
679 
680  void clear();
681  void resize(ArrayIndex newSize);
682 
683  Value &resolveReference(ArrayIndex index);
684 
685  Value *find(ArrayIndex index) const;
686 
687  ArrayIndex size() const;
688 
689  int compare(const ValueInternalArray &other) const;
690 
691  private:
692  static bool equals(const IteratorState &x, const IteratorState &other);
693  static void increment(IteratorState &iterator);
694  static void decrement(IteratorState &iterator);
695  static Value &dereference(const IteratorState &iterator);
696  static Value &unsafeDereference(const IteratorState &iterator);
697  static int distance(const IteratorState &x, const IteratorState &y);
698  static ArrayIndex indexOf(const IteratorState &iterator);
699  void makeBeginIterator(IteratorState &it) const;
700  void makeEndIterator(IteratorState &it) const;
701  void makeIterator(IteratorState &it, ArrayIndex index) const;
702 
703  void makeIndexValid(ArrayIndex index);
704 
705  Value **pages_;
706  ArrayIndex size_;
707  PageIndex pageCount_;
708  };
709 
769  class JSON_API ValueArrayAllocator {
770  public:
771  virtual ~ValueArrayAllocator();
772  virtual ValueInternalArray *newArray() = 0;
773  virtual ValueInternalArray *newArrayCopy(const ValueInternalArray &other) = 0;
774  virtual void destructArray(ValueInternalArray *array) = 0;
786  virtual void reallocateArrayPageIndex(Value **&indexes,
787  ValueInternalArray::PageIndex &indexCount,
788  ValueInternalArray::PageIndex minNewIndexCount) = 0;
789  virtual void releaseArrayPageIndex(Value **indexes, ValueInternalArray::PageIndex indexCount) = 0;
790  virtual Value *allocateArrayPage() = 0;
791  virtual void releaseArrayPage(Value *value) = 0;
792  };
793 #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
794 
799  public:
800  typedef unsigned int size_t;
801  typedef int difference_type;
803 
805 #ifndef JSON_VALUE_USE_INTERNAL_MAP
806  explicit ValueIteratorBase(const Value::ObjectValues::iterator &current);
807 #else
808  ValueIteratorBase(const ValueInternalArray::IteratorState &state);
809  ValueIteratorBase(const ValueInternalMap::IteratorState &state);
810 #endif
811 
812  bool operator==(const SelfType &other) const { return isEqual(other); }
813 
814  bool operator!=(const SelfType &other) const { return !isEqual(other); }
815 
817 
819  Value key() const;
820 
822  UInt index() const;
823 
825  const char *memberName() const;
826 
827  protected:
828  Value &deref() const;
829 
830  void increment();
831 
832  void decrement();
833 
835 
836  bool isEqual(const SelfType &other) const;
837 
838  void copy(const SelfType &other);
839 
840  private:
841 #ifndef JSON_VALUE_USE_INTERNAL_MAP
842  Value::ObjectValues::iterator current_;
843  // Indicates that iterator is for a null value.
844  bool isNull_;
845 #else
846  union {
847  ValueInternalArray::IteratorState array_;
848  ValueInternalMap::IteratorState map_;
849  } iterator_;
850  bool isArray_;
851 #endif
852  };
853 
858  friend class Value;
859 
860  public:
861  typedef unsigned int size_t;
862  typedef int difference_type;
863  typedef const Value &reference;
864  typedef const Value *pointer;
866 
868 
869  private:
872 #ifndef JSON_VALUE_USE_INTERNAL_MAP
873  explicit ValueConstIterator(const Value::ObjectValues::iterator &current);
874 #else
875  ValueConstIterator(const ValueInternalArray::IteratorState &state);
876  ValueConstIterator(const ValueInternalMap::IteratorState &state);
877 #endif
878  public:
880 
882  SelfType temp(*this);
883  ++*this;
884  return temp;
885  }
886 
888  SelfType temp(*this);
889  --*this;
890  return temp;
891  }
892 
894  decrement();
895  return *this;
896  }
897 
899  increment();
900  return *this;
901  }
902 
903  reference operator*() const { return deref(); }
904  };
905 
909  friend class Value;
910 
911  public:
912  typedef unsigned int size_t;
913  typedef int difference_type;
914  typedef Value &reference;
915  typedef Value *pointer;
917 
918  ValueIterator();
921 
922  private:
925 #ifndef JSON_VALUE_USE_INTERNAL_MAP
926  explicit ValueIterator(const Value::ObjectValues::iterator &current);
927 #else
928  ValueIterator(const ValueInternalArray::IteratorState &state);
929  ValueIterator(const ValueInternalMap::IteratorState &state);
930 #endif
931  public:
932  SelfType &operator=(const SelfType &other);
933 
935  SelfType temp(*this);
936  ++*this;
937  return temp;
938  }
939 
941  SelfType temp(*this);
942  --*this;
943  return temp;
944  }
945 
947  decrement();
948  return *this;
949  }
950 
952  increment();
953  return *this;
954  }
955 
956  reference operator*() const { return deref(); }
957  };
958 
959 } // namespace Json
960 
961 #endif // CPPTL_JSON_H_INCLUDED
size
Write out results.
bool operator==(const SelfType &other) const
Definition: value.h:812
unsigned int UInt
Definition: forwards.h:20
bool compare(const P &i, const P &j)
unsigned integer value
Definition: value.h:26
const char * str_
Definition: value.h:69
difference_type operator-(const SelfType &other) const
Definition: value.h:816
std::vector< std::string > Members
Definition: value.h:106
double value
Definition: value.h:27
virtual char * makeMemberName(const char *memberName) const =0
ValueIterator iterator
Definition: value.h:107
SelfType operator--(int)
Definition: value.h:887
ValueType type_
Definition: value.h:400
bool isEqual(const SelfType &other) const
signed integer value
Definition: value.h:25
bool operator<(IOVSyncValue const &iLHS, IOVSyncValue const &iRHS)
Definition: IOVSyncValue.h:34
const char * c_str() const
Definition: value.h:66
virtual void releaseStringValue(char *value) const =0
unsigned int size_t
Definition: value.h:861
void addPathInArg(const std::string &path, const InArgs &in, InArgs::const_iterator &itInArg, PathArgument::Kind kind)
Json::Int Int
Definition: value.h:110
Value key() const
Return either the index or the member name of the referenced value as a Value.
Experimental and untested: represents an element of the "path" to access a node.
Definition: value.h:411
SelfType & operator++()
Definition: value.h:898
void makePath(const std::string &path, const InArgs &in)
std::vector< const PathArgument * > InArgs
Definition: value.h:453
constexpr bool operator<=(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
Lightweight wrapper to tag static string.
Definition: value.h:60
ValueConstIterator const_iterator
Definition: value.h:108
bool operator>(DTCELinkId const &lhs, DTCELinkId const &rhs)
Definition: DTCELinkId.h:74
int allocated_
Definition: value.h:401
ObjectValues * map_
Definition: value.h:397
const Value & reference
Definition: value.h:863
virtual void releaseMemberName(char *memberName) const =0
static const UInt maxUInt
Definition: value.h:116
Represents a JSON value.
Definition: value.h:99
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
a comment placed on the line before a value
Definition: value.h:35
virtual ~ValueAllocator()
SelfType & operator=(const SelfType &other)
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
constexpr bool operator>=(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
difference_type computeDistance(const SelfType &other) const
SelfType & operator--()
Definition: value.h:946
static const Int minInt
Definition: value.h:114
reference operator*() const
Definition: value.h:903
static const Value null
Definition: value.h:113
std::map< CZString, Value > ObjectValues
Definition: value.h:143
#define JSON_API
Definition: config.h:40
ValueConstIterator SelfType
Definition: value.h:865
Json::UInt UInt
Definition: value.h:109
bool operator==(const QGLikelihoodParameters &lhs, const QGLikelihoodCategory &rhs)
Test if parameters are compatible with category.
object value (collection of name/value pairs).
Definition: value.h:31
bool value
Definition: value.h:29
SelfType operator--(int)
Definition: value.h:940
reco::JetExtendedAssociation::JetExtendedData Value
ValueType
Type of the value held by a Value object.
Definition: value.h:23
UInt ArrayIndex
Definition: value.h:111
const char * memberName() const
Return the member name of the referenced Value. "" if it is not an objectValue.
Args args_
Definition: value.h:463
Definition: value.py:1
std::string key_
Definition: value.h:422
bool operator!=(const SelfType &other) const
Definition: value.h:814
void invalidPath(const std::string &path, int location)
virtual char * duplicateStringValue(const char *value, unsigned int length=unknown) const =0
JSON (JavaScript Object Notation).
ValueIteratorBase SelfType
Definition: value.h:802
a comment just after a value on the same line
Definition: value.h:36
SelfType & operator++()
Definition: value.h:951
base class for Value iterators.
Definition: value.h:798
const Value & resolve(const Value &root) const
CommentPlacement
Definition: value.h:34
bool operator!=(DTCELinkId const &lhs, DTCELinkId const &rhs)
Definition: DTCELinkId.h:81
UInt index() const
Return the index of the referenced Value. -1 if it is not an arrayValue.
int Int
Definition: forwards.h:16
Path(const std::string &path, const PathArgument &a1=PathArgument(), const PathArgument &a2=PathArgument(), const PathArgument &a3=PathArgument(), const PathArgument &a4=PathArgument(), const PathArgument &a5=PathArgument())
bool equals(const edm::RefToBase< Jet > &j1, const edm::RefToBase< Jet > &j2)
a comment on the line after a value (only make sense for root value)
Definition: value.h:37
Value * pointer
Definition: value.h:915
void copy(const SelfType &other)
&#39;null&#39; value
Definition: value.h:24
SelfType & operator--()
Definition: value.h:893
UTF-8 string value.
Definition: value.h:28
SelfType operator++(int)
Definition: value.h:934
static const Int maxInt
Definition: value.h:115
unsigned int size_t
Definition: value.h:800
Value & deref() const
StaticString(const char *czstring)
Definition: value.h:62
SelfType operator++(int)
Definition: value.h:881
const char * cstr_
Definition: value.h:137
SelfType & operator=(const ValueIteratorBase &other)
std::vector< PathArgument > Args
Definition: value.h:454
ValueIterator SelfType
Definition: value.h:916
CommentInfo * comments_
Definition: value.h:406
Experimental do not use: Allocator to customize member name and string value memory management done b...
Definition: value.h:473
void clear(EGIsoObj &c)
Definition: egamma.h:82
Iterator for object and array value.
Definition: value.h:908
T operator[](int i) const
Experimental and untested: represents a "path" to access a node.
Definition: value.h:438
const iterator for object and array value.
Definition: value.h:857
const Value * pointer
Definition: value.h:864
unsigned int size_t
Definition: value.h:912
Value::ObjectValues::iterator current_
Definition: value.h:842
Value & make(Value &root) const
Creates the "path" to access the specified node and returns a reference on the node.
reference operator*() const
Definition: value.h:956
array value (ordered list)
Definition: value.h:30
Value & reference
Definition: value.h:914