@@ -84,49 +84,8 @@ class JSON_API Thing {
84
84
static const UInt64 maxUInt64;
85
85
#endif // defined(JSON_HAS_INT64)
86
86
87
- private:
88
- #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
89
- class CZString {
90
- public:
91
- enum DuplicationPolicy {
92
- noDuplication = 0 ,
93
- duplicate,
94
- duplicateOnCopy
95
- };
96
- CZString (ArrayIndex index);
97
- CZString (char const * str, unsigned length, DuplicationPolicy allocate);
98
- CZString (CZString const & other);
99
- #if JSON_HAS_RVALUE_REFERENCES
100
- CZString (CZString&& other);
101
- #endif
102
- ~CZString ();
103
- CZString& operator =(CZString other);
104
- bool operator <(CZString const & other) const ;
105
- bool operator ==(CZString const & other) const ;
106
- ArrayIndex index () const ;
107
- // const char* c_str() const; ///< \deprecated
108
- char const * data () const ;
109
- unsigned length () const ;
110
- bool isStaticString () const ;
111
-
112
- private:
113
- void swap (CZString& other);
114
-
115
- struct StringStorage {
116
- unsigned policy_: 2 ;
117
- unsigned length_: 30 ; // 1GB max
118
- };
119
-
120
- char const * cstr_; // actually, a prefixed string, unless policy is noDup
121
- union {
122
- ArrayIndex index_;
123
- StringStorage storage_;
124
- };
125
- };
126
-
127
87
public:
128
- typedef std::map<CZString, Thing> ObjectThings;
129
- #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
88
+ // typedef std::map<CZString, Thing> ObjectValues;
130
89
131
90
public:
132
91
/* * \brief Create a default Thing of the given type.
@@ -411,48 +370,6 @@ Json::Thing obj_value(Json::objectThing); // {}
411
370
void setOffsetLimit (ptrdiff_t limit);
412
371
ptrdiff_t getOffsetStart () const ;
413
372
ptrdiff_t getOffsetLimit () const ;
414
-
415
- private:
416
- void initBasic (ThingType type, bool allocated = false );
417
-
418
- Thing& resolveReference (const char * key);
419
- Thing& resolveReference (const char * key, const char * end);
420
-
421
- struct CommentInfo {
422
- CommentInfo ();
423
- ~CommentInfo ();
424
-
425
- void setComment (const char * text, size_t len);
426
-
427
- char * comment_;
428
- };
429
-
430
- // struct MemberNamesTransform
431
- // {
432
- // typedef const char *result_type;
433
- // const char *operator()( const CZString &name ) const
434
- // {
435
- // return name.c_str();
436
- // }
437
- // };
438
-
439
- union ThingHolder {
440
- LargestInt int_;
441
- LargestUInt uint_;
442
- double real_;
443
- bool bool_;
444
- char * string_; // actually ptr to unsigned, followed by str, unless !allocated_
445
- ObjectThings* map_;
446
- } value_;
447
- ThingType type_ : 8 ;
448
- unsigned int allocated_ : 1 ; // Notes: if declared as bool, bitfield is useless.
449
- // If not allocated_, string_ must be null-terminated.
450
- CommentInfo* comments_;
451
-
452
- // [start, limit) byte offsets in the source JSON text from which this Thing
453
- // was extracted.
454
- ptrdiff_t start_;
455
- ptrdiff_t limit_;
456
373
};
457
374
458
375
} // namespace Json
0 commit comments