|
override int | GetHashCode () |
|
override bool | Equals (object obj) |
|
string | GetUTF8String () |
|
string | GetUTF8String (uint offset) |
|
string | GetUTF8String (uint offset, uint size) |
|
uint | WriteUTF8String (string s) |
|
uint | WriteUTF8String (string s, bool nullTerminated) |
|
uint | WriteUTF8String (string s, uint offset) |
|
uint | WriteUTF8String (string s, bool nullTerminated, uint offset) |
|
uint | WriteUTF8String (string s, uint offset, uint size) |
|
uint | WriteUTF8String (string s, bool nullTerminated, uint offset, uint size) |
|
|
static int | operator- (VoidPtr p1, VoidPtr p2) |
|
static VoidPtr | operator+ (VoidPtr p1, uint addr) |
|
static VoidPtr | operator- (VoidPtr p1, uint addr) |
|
static VoidPtr | operator+ (VoidPtr p1, int addr) |
|
static VoidPtr | operator- (VoidPtr p1, int addr) |
|
static VoidPtr | operator+ (VoidPtr p1, ulong addr) |
|
static VoidPtr | operator- (VoidPtr p1, ulong addr) |
|
static VoidPtr | operator+ (VoidPtr p1, long addr) |
|
static VoidPtr | operator- (VoidPtr p1, long addr) |
|
static bool | operator> (VoidPtr p1, VoidPtr p2) |
|
static bool | operator< (VoidPtr p1, VoidPtr p2) |
|
static bool | operator>= (VoidPtr p1, VoidPtr p2) |
|
static bool | operator<= (VoidPtr p1, VoidPtr p2) |
|
static bool | operator== (VoidPtr p1, VoidPtr p2) |
|
static bool | operator!= (VoidPtr p1, VoidPtr p2) |
|
static implicit | operator bool (VoidPtr ptr) |
|
static implicit | operator void * (VoidPtr ptr) |
|
static implicit | operator VoidPtr (void *ptr) |
|
static implicit | operator uint (VoidPtr ptr) |
|
static implicit | operator VoidPtr (uint ptr) |
|
static implicit | operator int (VoidPtr ptr) |
|
static implicit | operator VoidPtr (int ptr) |
|
static implicit | operator ulong (VoidPtr ptr) |
|
static implicit | operator VoidPtr (ulong ptr) |
|
static implicit | operator long (VoidPtr ptr) |
|
static implicit | operator VoidPtr (long ptr) |
|
static implicit | operator VoidPtr (IntPtr ptr) |
|
static implicit | operator IntPtr (VoidPtr ptr) |
|
static void | Swap (float *p1, float *p2) |
|
static void | Swap (int *p1, int *p2) |
|
static void | Swap (short *p1, short *p2) |
|
static void | Swap (ushort *p1, ushort *p2) |
|
static void | Swap (byte *p1, byte *p2) |
|
◆ Equals()
override bool BrawlLib.Internal.VoidPtr.Equals |
( |
object |
obj | ) |
|
|
inline |
171 {
172 return base.Equals(obj);
173 }
◆ GetHashCode()
override int BrawlLib.Internal.VoidPtr.GetHashCode |
( |
| ) |
|
|
inline |
166 {
168 }
void * address
Definition: VoidPtr.cs:11
◆ GetUTF8String() [1/3]
string BrawlLib.Internal.VoidPtr.GetUTF8String |
( |
| ) |
|
|
inline |
211 {
213 }
string GetUTF8String()
Definition: VoidPtr.cs:210
◆ GetUTF8String() [2/3]
string BrawlLib.Internal.VoidPtr.GetUTF8String |
( |
uint |
offset | ) |
|
|
inline |
216 {
217 byte[] bytes = new byte[new string((sbyte*)(this + offset)).Length];
218 for (int i = 0; i < bytes.Length; i++)
219 {
220 bytes[i] = (
this + offset).
Byte;
221 offset++;
222 }
223
224 return Encoding.UTF8.GetString(bytes);
225 }
byte Byte
Definition: VoidPtr.cs:13
◆ GetUTF8String() [3/3]
string BrawlLib.Internal.VoidPtr.GetUTF8String |
( |
uint |
offset, |
|
|
uint |
size |
|
) |
| |
|
inline |
228 {
229 byte[] bytes = new byte[size];
230 for (int i = 0; i < size; i++)
231 {
232 bytes[i] = (
this + offset).
Byte;
233 offset++;
234 }
235
236 return Encoding.UTF8.GetString(bytes);
237 }
◆ operator bool()
static implicit BrawlLib.Internal.VoidPtr.operator bool |
( |
VoidPtr |
ptr | ) |
|
|
inlinestatic |
101 {
102 return ptr.address != null;
103 }
◆ operator int()
static implicit BrawlLib.Internal.VoidPtr.operator int |
( |
VoidPtr |
ptr | ) |
|
|
inlinestatic |
126 {
127 return checked((int) ptr.address);
128 }
◆ operator IntPtr()
static implicit BrawlLib.Internal.VoidPtr.operator IntPtr |
( |
VoidPtr |
ptr | ) |
|
|
inlinestatic |
161 {
162 return (IntPtr) ptr.address;
163 }
◆ operator long()
static implicit BrawlLib.Internal.VoidPtr.operator long |
( |
VoidPtr |
ptr | ) |
|
|
inlinestatic |
146 {
147 return (long) ptr.address;
148 }
◆ operator uint()
static implicit BrawlLib.Internal.VoidPtr.operator uint |
( |
VoidPtr |
ptr | ) |
|
|
inlinestatic |
116 {
117 return checked((uint) ptr.address);
118 }
◆ operator ulong()
static implicit BrawlLib.Internal.VoidPtr.operator ulong |
( |
VoidPtr |
ptr | ) |
|
|
inlinestatic |
136 {
137 return (ulong) ptr.address;
138 }
◆ operator void *()
static implicit BrawlLib.Internal.VoidPtr.operator void * |
( |
VoidPtr |
ptr | ) |
|
|
inlinestatic |
106 {
107 return ptr.address;
108 }
◆ operator VoidPtr() [1/6]
static implicit BrawlLib.Internal.VoidPtr.operator VoidPtr |
( |
int |
ptr | ) |
|
|
inlinestatic |
131 {
132 return new VoidPtr {
address = (
void*) ptr};
133 }
◆ operator VoidPtr() [2/6]
static implicit BrawlLib.Internal.VoidPtr.operator VoidPtr |
( |
IntPtr |
ptr | ) |
|
|
inlinestatic |
156 {
157 return new VoidPtr {
address = (
void*) ptr};
158 }
◆ operator VoidPtr() [3/6]
static implicit BrawlLib.Internal.VoidPtr.operator VoidPtr |
( |
long |
ptr | ) |
|
|
inlinestatic |
151 {
152 return new VoidPtr {
address = (
void*) ptr};
153 }
◆ operator VoidPtr() [4/6]
static implicit BrawlLib.Internal.VoidPtr.operator VoidPtr |
( |
uint |
ptr | ) |
|
|
inlinestatic |
121 {
122 return new VoidPtr {
address = (
void*) ptr};
123 }
◆ operator VoidPtr() [5/6]
static implicit BrawlLib.Internal.VoidPtr.operator VoidPtr |
( |
ulong |
ptr | ) |
|
|
inlinestatic |
141 {
142 return new VoidPtr {
address = (
void*) ptr};
143 }
◆ operator VoidPtr() [6/6]
static implicit BrawlLib.Internal.VoidPtr.operator VoidPtr |
( |
void * |
ptr | ) |
|
|
inlinestatic |
111 {
112 return new VoidPtr {
address = ptr};
113 }
◆ operator!=()
static bool BrawlLib.Internal.VoidPtr.operator!= |
( |
VoidPtr |
p1, |
|
|
VoidPtr |
p2 |
|
) |
| |
|
inlinestatic |
93 {
94 return p1.address != p2.address;
95 }
◆ operator+() [1/4]
static VoidPtr BrawlLib.Internal.VoidPtr.operator+ |
( |
VoidPtr |
p1, |
|
|
int |
addr |
|
) |
| |
|
inlinestatic |
38 {
39 return new VoidPtr {
address = (
byte*) p1.address + addr};
40 }
◆ operator+() [2/4]
static VoidPtr BrawlLib.Internal.VoidPtr.operator+ |
( |
VoidPtr |
p1, |
|
|
long |
addr |
|
) |
| |
|
inlinestatic |
58 {
59 return new VoidPtr {
address = (
byte*) p1.address + addr};
60 }
◆ operator+() [3/4]
static VoidPtr BrawlLib.Internal.VoidPtr.operator+ |
( |
VoidPtr |
p1, |
|
|
uint |
addr |
|
) |
| |
|
inlinestatic |
28 {
29 return new VoidPtr {
address = (
byte*) p1.address + addr};
30 }
◆ operator+() [4/4]
static VoidPtr BrawlLib.Internal.VoidPtr.operator+ |
( |
VoidPtr |
p1, |
|
|
ulong |
addr |
|
) |
| |
|
inlinestatic |
48 {
49 return new VoidPtr {
address = (
byte*) p1.address + addr};
50 }
◆ operator-() [1/5]
static VoidPtr BrawlLib.Internal.VoidPtr.operator- |
( |
VoidPtr |
p1, |
|
|
int |
addr |
|
) |
| |
|
inlinestatic |
43 {
44 return new VoidPtr {
address = (
byte*) p1.address - addr};
45 }
◆ operator-() [2/5]
static VoidPtr BrawlLib.Internal.VoidPtr.operator- |
( |
VoidPtr |
p1, |
|
|
long |
addr |
|
) |
| |
|
inlinestatic |
63 {
64 return new VoidPtr {
address = (
byte*) p1.address - addr};
65 }
◆ operator-() [3/5]
static VoidPtr BrawlLib.Internal.VoidPtr.operator- |
( |
VoidPtr |
p1, |
|
|
uint |
addr |
|
) |
| |
|
inlinestatic |
33 {
34 return new VoidPtr {
address = (
byte*) p1.address - addr};
35 }
◆ operator-() [4/5]
static VoidPtr BrawlLib.Internal.VoidPtr.operator- |
( |
VoidPtr |
p1, |
|
|
ulong |
addr |
|
) |
| |
|
inlinestatic |
53 {
54 return new VoidPtr {
address = (
byte*) p1.address - addr};
55 }
◆ operator-() [5/5]
static int BrawlLib.Internal.VoidPtr.operator- |
( |
VoidPtr |
p1, |
|
|
VoidPtr |
p2 |
|
) |
| |
|
inlinestatic |
23 {
24 return checked((int) ((byte*) p1.address - (byte*) p2.address));
25 }
◆ operator<()
static bool BrawlLib.Internal.VoidPtr.operator< |
( |
VoidPtr |
p1, |
|
|
VoidPtr |
p2 |
|
) |
| |
|
inlinestatic |
73 {
74 return p1.address < p2.address;
75 }
◆ operator<=()
static bool BrawlLib.Internal.VoidPtr.operator<= |
( |
VoidPtr |
p1, |
|
|
VoidPtr |
p2 |
|
) |
| |
|
inlinestatic |
83 {
84 return p1.address <= p2.address;
85 }
◆ operator==()
static bool BrawlLib.Internal.VoidPtr.operator== |
( |
VoidPtr |
p1, |
|
|
VoidPtr |
p2 |
|
) |
| |
|
inlinestatic |
88 {
89 return p1.address == p2.address;
90 }
◆ operator>()
static bool BrawlLib.Internal.VoidPtr.operator> |
( |
VoidPtr |
p1, |
|
|
VoidPtr |
p2 |
|
) |
| |
|
inlinestatic |
68 {
69 return p1.address > p2.address;
70 }
◆ operator>=()
static bool BrawlLib.Internal.VoidPtr.operator>= |
( |
VoidPtr |
p1, |
|
|
VoidPtr |
p2 |
|
) |
| |
|
inlinestatic |
78 {
79 return p1.address >= p2.address;
80 }
◆ Swap() [1/5]
static void BrawlLib.Internal.VoidPtr.Swap |
( |
byte * |
p1, |
|
|
byte * |
p2 |
|
) |
| |
|
inlinestatic |
204 {
205 byte f = *p1;
206 *p1 = *p2;
207 *p2 = f;
208 }
◆ Swap() [2/5]
static void BrawlLib.Internal.VoidPtr.Swap |
( |
float * |
p1, |
|
|
float * |
p2 |
|
) |
| |
|
inlinestatic |
176 {
177 float f = *p1;
178 *p1 = *p2;
179 *p2 = f;
180 }
◆ Swap() [3/5]
static void BrawlLib.Internal.VoidPtr.Swap |
( |
int * |
p1, |
|
|
int * |
p2 |
|
) |
| |
|
inlinestatic |
183 {
184 int f = *p1;
185 *p1 = *p2;
186 *p2 = f;
187 }
◆ Swap() [4/5]
static void BrawlLib.Internal.VoidPtr.Swap |
( |
short * |
p1, |
|
|
short * |
p2 |
|
) |
| |
|
inlinestatic |
190 {
191 short f = *p1;
192 *p1 = *p2;
193 *p2 = f;
194 }
◆ Swap() [5/5]
static void BrawlLib.Internal.VoidPtr.Swap |
( |
ushort * |
p1, |
|
|
ushort * |
p2 |
|
) |
| |
|
inlinestatic |
197 {
198 ushort f = *p1;
199 *p1 = *p2;
200 *p2 = f;
201 }
◆ WriteUTF8String() [1/6]
uint BrawlLib.Internal.VoidPtr.WriteUTF8String |
( |
string |
s | ) |
|
|
inline |
240 {
242 }
uint WriteUTF8String(string s)
Definition: VoidPtr.cs:239
◆ WriteUTF8String() [2/6]
uint BrawlLib.Internal.VoidPtr.WriteUTF8String |
( |
string |
s, |
|
|
bool |
nullTerminated |
|
) |
| |
|
inline |
◆ WriteUTF8String() [3/6]
uint BrawlLib.Internal.VoidPtr.WriteUTF8String |
( |
string |
s, |
|
|
bool |
nullTerminated, |
|
|
uint |
offset |
|
) |
| |
|
inline |
255 {
256 return WriteUTF8String(s, nullTerminated, offset, (uint)(s.UTF8Length() + (nullTerminated ? 1 : 0)));
257 }
◆ WriteUTF8String() [4/6]
uint BrawlLib.Internal.VoidPtr.WriteUTF8String |
( |
string |
s, |
|
|
bool |
nullTerminated, |
|
|
uint |
offset, |
|
|
uint |
size |
|
) |
| |
|
inline |
265 {
266 byte* ptr = (byte*)(this + offset);
267 byte[] name = Encoding.UTF8.GetBytes(s);
268 for (int j = 0; j < name.Length && j < size; j++)
269 {
270 ptr[j] = name[j];
271 }
272
273 if (name.Length < size && nullTerminated)
274 {
275 ptr[name.Length] = 0;
276 }
277 else if (nullTerminated)
278 {
279 ptr[size - 1] = 0;
280 }
281
282 for (int j = name.Length; j < size; j++)
283 {
284 ptr[j] = 0;
285 }
286
287 return size;
288 }
◆ WriteUTF8String() [5/6]
uint BrawlLib.Internal.VoidPtr.WriteUTF8String |
( |
string |
s, |
|
|
uint |
offset |
|
) |
| |
|
inline |
◆ WriteUTF8String() [6/6]
uint BrawlLib.Internal.VoidPtr.WriteUTF8String |
( |
string |
s, |
|
|
uint |
offset, |
|
|
uint |
size |
|
) |
| |
|
inline |
◆ address
void* BrawlLib.Internal.VoidPtr.address |
◆ Byte
byte BrawlLib.Internal.VoidPtr.Byte |
|
get |
◆ Char
char BrawlLib.Internal.VoidPtr.Char |
|
get |
◆ Int
int BrawlLib.Internal.VoidPtr.Int |
|
get |
◆ SByte
sbyte BrawlLib.Internal.VoidPtr.SByte |
|
get |
◆ Short
short BrawlLib.Internal.VoidPtr.Short |
|
get |
◆ Single
float BrawlLib.Internal.VoidPtr.Single |
|
get |
◆ this[int count, int stride]
VoidPtr BrawlLib.Internal.VoidPtr.this[int count, int stride] |
|
get |
◆ UInt
uint BrawlLib.Internal.VoidPtr.UInt |
|
get |
◆ UShort
ushort BrawlLib.Internal.VoidPtr.UShort |
|
get |
The documentation for this struct was generated from the following file:
- BrawlLib/Internal/VoidPtr.cs