CommonLibSSE NG
Loading...
Searching...
No Matches
GFxWStringBuffer.h
Go to the documentation of this file.
1#pragma once
2
3namespace RE
4{
6 {
7 public:
8 using value_type = wchar_t;
9 using size_type = UPInt;
12
14 {
18 ReserveHeader(wchar_t* a_buffer, UPInt a_size);
19 ~ReserveHeader() = default;
20
23
24 // members
25 wchar_t* buffer; // 00
26 UPInt size; // 08
27 };
28 static_assert(sizeof(ReserveHeader) == 0x10);
29
30 template <std::uint32_t SIZE>
31 struct Reserve : public ReserveHeader
32 {
35 {}
36
37 // members
38 wchar_t buffer[SIZE]; // 10
39 };
40
41 // (constructor)
47
48 // (destructor)
50
51 // operator=
54 GFxWStringBuffer& operator=(const wchar_t* a_rhs);
55 GFxWStringBuffer& operator=(const std::wstring_view& a_rhs);
56
57 // element access
60
61 wchar_t& front();
62 [[nodiscard]] const wchar_t& front() const;
63
64 wchar_t& back();
65 [[nodiscard]] const wchar_t& back() const;
66
67 [[nodiscard]] const wchar_t* data() const noexcept;
68 wchar_t* data() noexcept;
69
70 [[nodiscard]] const wchar_t* c_str() const noexcept;
71
72 operator std::wstring_view() const noexcept;
73
74 // Capacity
75 [[nodiscard]] bool empty() const noexcept;
76
77 [[nodiscard]] size_type size() const noexcept;
78
79 [[nodiscard]] size_type length() const noexcept;
80
81 // Operations
82 void clear() noexcept;
83
84 void resize(size_type a_count);
85
86 protected:
87 wchar_t* alloc(size_type a_count);
88 void release();
89
90 // members
91 wchar_t* _text; // 00
94 };
95 static_assert(sizeof(GFxWStringBuffer) == 0x20);
96}
Definition GFxWStringBuffer.h:6
value_type & reference
Definition GFxWStringBuffer.h:10
ReserveHeader _reserved
Definition GFxWStringBuffer.h:93
GFxWStringBuffer(ReserveHeader &&a_reserve)
reference operator[](size_type a_pos)
wchar_t * alloc(size_type a_count)
operator std::wstring_view() const noexcept
const wchar_t * c_str() const noexcept
GFxWStringBuffer(const ReserveHeader &a_reserve)
const wchar_t & back() const
GFxWStringBuffer(const GFxWStringBuffer &a_rhs)
const_reference operator[](size_type a_pos) const
GFxWStringBuffer & operator=(const std::wstring_view &a_rhs)
const wchar_t * data() const noexcept
bool empty() const noexcept
GFxWStringBuffer & operator=(const wchar_t *a_rhs)
size_type length() const noexcept
const value_type & const_reference
Definition GFxWStringBuffer.h:11
UPInt _length
Definition GFxWStringBuffer.h:92
GFxWStringBuffer(GFxWStringBuffer &&a_rhs)
UPInt size_type
Definition GFxWStringBuffer.h:9
wchar_t value_type
Definition GFxWStringBuffer.h:8
wchar_t * _text
Definition GFxWStringBuffer.h:91
const wchar_t & front() const
GFxWStringBuffer & operator=(const GFxWStringBuffer &a_rhs)
void clear() noexcept
void resize(size_type a_count)
size_type size() const noexcept
GFxWStringBuffer & operator=(GFxWStringBuffer &&a_rhs)
Definition AbsorbEffect.h:6
std::size_t UPInt
Definition SFTypes.h:5
Definition ActorValueList.h:28
Definition GFxWStringBuffer.h:14
ReserveHeader & operator=(const ReserveHeader &a_rhs)
ReserveHeader & operator=(ReserveHeader &&a_rhs)
ReserveHeader(ReserveHeader &&a_rhs)
UPInt size
Definition GFxWStringBuffer.h:26
ReserveHeader(const ReserveHeader &a_rhs)
wchar_t * buffer
Definition GFxWStringBuffer.h:25
ReserveHeader(wchar_t *a_buffer, UPInt a_size)
Definition GFxWStringBuffer.h:32
wchar_t buffer[SIZE]
Definition GFxWStringBuffer.h:38
Reserve()
Definition GFxWStringBuffer.h:33