MCPcopy Create free account
hub / github.com/PlayFab/gsdk / CZString

Class CZString

cpp/cppsdk/json/json.h:706–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704#endif
705#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
706 class CZString {
707 public:
708 enum DuplicationPolicy { noDuplication = 0, duplicate, duplicateOnCopy };
709 CZString(ArrayIndex index);
710 CZString(char const* str, unsigned length, DuplicationPolicy allocate);
711 CZString(CZString const& other);
712#if JSON_HAS_RVALUE_REFERENCES
713 CZString(CZString&& other);
714#endif
715 ~CZString();
716 CZString& operator=(const CZString& other);
717
718#if JSON_HAS_RVALUE_REFERENCES
719 CZString& operator=(CZString&& other);
720#endif
721
722 bool operator<(CZString const& other) const;
723 bool operator==(CZString const& other) const;
724 ArrayIndex index() const;
725 // const char* c_str() const; ///< \deprecated
726 char const* data() const;
727 unsigned length() const;
728 bool isStaticString() const;
729
730 private:
731 void swap(CZString& other);
732
733 struct StringStorage {
734 unsigned policy_ : 2;
735 unsigned length_ : 30; // 1GB max
736 };
737
738 char const* cstr_; // actually, a prefixed string, unless policy is noDup
739 union {
740 ArrayIndex index_;
741 StringStorage storage_;
742 };
743 };
744
745public:
746#ifndef JSON_USE_CPPTL_SMALLMAP

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected