MCPcopy Create free account
hub / github.com/Illumina/paragraph / CZString

Class CZString

external/jsoncpp/json/json.h:670–711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668private:
669#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
670 class CZString {
671 public:
672 enum DuplicationPolicy {
673 noDuplication = 0,
674 duplicate,
675 duplicateOnCopy
676 };
677 CZString(ArrayIndex index);
678 CZString(char const* str, unsigned length, DuplicationPolicy allocate);
679 CZString(CZString const& other);
680#if JSON_HAS_RVALUE_REFERENCES
681 CZString(CZString&& other);
682#endif
683 ~CZString();
684 CZString& operator=(const CZString& other);
685
686#if JSON_HAS_RVALUE_REFERENCES
687 CZString& operator=(CZString&& other);
688#endif
689
690 bool operator<(CZString const& other) const;
691 bool operator==(CZString const& other) const;
692 ArrayIndex index() const;
693 //const char* c_str() const; ///< \deprecated
694 char const* data() const;
695 unsigned length() const;
696 bool isStaticString() const;
697
698 private:
699 void swap(CZString& other);
700
701 struct StringStorage {
702 unsigned policy_: 2;
703 unsigned length_: 30; // 1GB max
704 };
705
706 char const* cstr_; // actually, a prefixed string, unless policy is noDup
707 union {
708 ArrayIndex index_;
709 StringStorage storage_;
710 };
711 };
712
713public:
714#ifndef JSON_USE_CPPTL_SMALLMAP

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected