Skip to content

Commit 1e61f1e

Browse files
committed
rm CZString and privates
1 parent 9376afb commit 1e61f1e

File tree

1 file changed

+1
-84
lines changed

1 file changed

+1
-84
lines changed

include/json/thing.h

Lines changed: 1 addition & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -84,49 +84,8 @@ class JSON_API Thing {
8484
static const UInt64 maxUInt64;
8585
#endif // defined(JSON_HAS_INT64)
8686

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-
12787
public:
128-
typedef std::map<CZString, Thing> ObjectThings;
129-
#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
88+
//typedef std::map<CZString, Thing> ObjectValues;
13089

13190
public:
13291
/** \brief Create a default Thing of the given type.
@@ -411,48 +370,6 @@ Json::Thing obj_value(Json::objectThing); // {}
411370
void setOffsetLimit(ptrdiff_t limit);
412371
ptrdiff_t getOffsetStart() const;
413372
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_;
456373
};
457374

458375
} // namespace Json

0 commit comments

Comments
 (0)