54 kFullFlag = 1ull << FlagConstant::kReserveIsSizeShift
71 static_assert(
sizeof(
DataDesc) == 0x10);
103 [[nodiscard]]
const char&
front()
const;
106 [[nodiscard]]
const char&
back()
const;
108 [[nodiscard]]
const char*
data() const noexcept;
111 [[nodiscard]] const
char*
c_str() const noexcept;
113 operator
std::string_view() const noexcept;
116 [[nodiscard]]
bool empty() const noexcept;
125 inline friend
bool operator==(const
GString& a_lhs, const
char* a_rhs) {
return (a_lhs.data() == a_rhs || std::strcmp(a_lhs.data(), a_rhs) == 0); }
126 inline friend bool operator!=(
const GString& a_lhs,
const char* a_rhs) {
return !(a_lhs == a_rhs); }
127 inline friend bool operator==(
const char* a_lhs,
const GString& a_rhs) {
return a_rhs == a_lhs; }
128 inline friend bool operator!=(
const char* a_lhs,
const GString& a_rhs) {
return !(a_lhs == a_rhs); }
131 inline friend bool operator==(
const GString& a_lhs,
const std::string_view& a_rhs) {
return a_lhs == a_rhs.
data(); }
132 inline friend bool operator!=(
const GString& a_lhs,
const std::string_view& a_rhs) {
return !(a_lhs == a_rhs); }
133 inline friend bool operator==(
const std::string_view& a_lhs,
const GString& a_rhs) {
return a_rhs == a_lhs; }
134 inline friend bool operator!=(
const std::string_view& a_lhs,
const GString& a_rhs) {
return !(a_lhs == a_rhs); }
149 static_assert(
sizeof(
GString) == 0x8);
UPInt operator()(const GString &a_data) const
Definition: GString.h:13
UPInt operator()(const GString &a_data) const
Definition: GString.h:22
UPInt size_type
Definition: GString.h:29
friend bool operator==(const char *a_lhs, const GString &a_rhs)
Definition: GString.h:127
GString * ctor(const char *a_str)
const char & front() const
HeapType
Definition: GString.h:34
friend bool operator==(const GString &a_lhs, const GString &a_rhs)
Definition: GString.h:129
DataDesc * get_desc() const
GString & operator=(const char *a_rhs)
GString & operator=(GString &&a_rhs)
GString(const char *a_rhs)
char value_type
Definition: GString.h:28
size_type length() const noexcept
friend bool operator!=(const GString &a_lhs, const char *a_rhs)
Definition: GString.h:126
friend bool operator==(const std::string_view &a_lhs, const GString &a_rhs)
Definition: GString.h:133
static UPInt BernsteinHashFunctionCIS(const void *a_dataIn, UPInt a_size, UPInt a_seed=5381)
const_reference operator[](size_type a_pos) const
friend bool operator!=(const std::string_view &a_lhs, const GString &a_rhs)
Definition: GString.h:134
reference operator[](size_type a_pos)
friend bool operator!=(const char *a_lhs, const GString &a_rhs)
Definition: GString.h:128
const char * data() const noexcept
void set_desc(DataDesc *a_desc)
static UPInt BernsteinHashFunction(const void *a_dataIn, UPInt a_size, UPInt a_seed=5381)
GString(const std::string_view &a_rhs)
const value_type & const_reference
Definition: GString.h:31
friend bool operator!=(const GString &a_lhs, const GString &a_rhs)
Definition: GString.h:130
GString(const GString &a_rhs)
friend bool operator==(const GString &a_lhs, const std::string_view &a_rhs)
Definition: GString.h:131
GString & operator=(const std::string_view &a_rhs)
HeapType heap_type() const
DataDescUnion _dataDesc
Definition: GString.h:147
GString & operator=(const GString &a_rhs)
size_type size() const noexcept
bool empty() const noexcept
const char & back() const
friend bool operator!=(const GString &a_lhs, const std::string_view &a_rhs)
Definition: GString.h:132
const char * c_str() const noexcept
value_type & reference
Definition: GString.h:30
Definition: AbsorbEffect.h:6
std::size_t UPInt
Definition: SFTypes.h:5
Definition: NiBinaryStream.h:94
char data[1]
Definition: GString.h:69
volatile std::int32_t refCount
Definition: GString.h:68
UPInt capacity
Definition: GString.h:67
@ kFullFlag
Definition: GString.h:54
UPInt GetCapacity() const
FlagConstant
Definition: GString.h:44
@ kReserveIsSizeShift
Definition: GString.h:45
stl::enumeration< HeapType, UPInt > heapType
Definition: GString.h:78
DataDesc * data
Definition: GString.h:77