164 return put ((
const void*)&
c,
sizeof (
c));
204 return put ((
const void*)
str.text () , (
str.length () + 1) * sizeof (
tchar));
282 if (from + bytes >
memSize || bytes == 0)
288 if (from + bytes > to && from < to)
304 if (
data ==
nullptr || bytes == 0)
314 unsigned char t1 = ((*data) >> 4) & 0x0F;
315 unsigned char t2 = (*data) & 0x0F;
325 stringBuffer [
count++] = t1;
326 stringBuffer [
count++] = t2;
330 stringBuffer [
count] = 0;
332 result.take ((
void*)stringBuffer,
false);
340 if (
string ==
nullptr)
344 if (len == 0 || ((len & 1) == 1) )
357 if (
c >=
'0' &&
c <=
'9')
d +=
c -
'0';
358 else if (
c >=
'A' &&
c <=
'F')
d +=
c -
'A' + 10;
359 else if (
c >=
'a' &&
c <=
'f')
d +=
c -
'a' + 10;
363 data [
count >> 1] =
static_cast<unsigned char> (
d << 4);
427 else if (amount < 0 && fillSize > 0)
429 uint32 toRemove = -amount;
451 memset (
buffer, initVal, amount);
458 uint32 toRemove = -amount;
479 if (newBuffer ==
nullptr)
509 if (newSize > 0 && !
buffer)
517 return (newSize > 0) == (
buffer !=
nullptr);
626 if (
str16 () [textLength - 1] != 0)
#define nullptr
Definition DistrhoDefines.h:75
#define byte
Definition blargg_source.h:87
uint32 getSize() const
Definition fbuffer.h:101
bool makeHexString(String &result)
Definition fbuffer.cpp:299
void take(Buffer &from)
takes another Buffer's memory, frees the current Buffer's memory
Definition fbuffer.cpp:578
bool appendString8(const char8 *s)
Definition fbuffer.cpp:208
void shiftStart(int32 amount)
moves all memory by given amount, grows the Buffer if necessary
Definition fbuffer.h:125
void flush()
sets fill size to zero
Definition fbuffer.h:119
int8 * int8Ptr() const
conversion
Definition fbuffer.h:201
bool put(uint8)
append value at end, grows Buffer if necessary
Definition fbuffer.cpp:168
void operator=(const Buffer &buff)
Definition fbuffer.cpp:127
bool truncateToFillSize()
Definition fbuffer.cpp:393
uint32 memSize
Definition fbuffer.h:244
virtual bool toWideString(int32 sourceCodePage)
Definition fbuffer.cpp:600
bool setFillSize(uint32 c)
sets a new fill size, does not change any memory
Definition fbuffer.cpp:382
void move(int32 amount, uint8 initVal=0)
shifts memory at start without growing the buffer, so data is lost and initialized with init val
Definition fbuffer.cpp:441
bool fromHexString(const char8 *string)
Definition fbuffer.cpp:337
swapSize
Definition fbuffer.h:216
@ kSwap16
Definition fbuffer.h:217
@ kSwap64
Definition fbuffer.h:219
@ kSwap32
Definition fbuffer.h:218
void set(uint8 value)
fills complete Buffer with given value
Definition fbuffer.cpp:375
void fillup(uint8 initVal=0)
set from fillSize to end
Definition fbuffer.cpp:521
virtual bool toMultibyteString(int32 destCodePage)
Definition fbuffer.cpp:621
bool copy(uint32 from, uint32 to, uint32 bytes)
copies a number of bytes from one position to another, the size may be adapted
Definition fbuffer.cpp:280
tchar * str() const
conversion
Definition fbuffer.h:198
uint32 fillSize
Definition fbuffer.h:245
void endString8()
Definition fbuffer.h:190
char16 * str16() const
conversion
Definition fbuffer.h:200
uint32 getFree() const
Definition fbuffer.h:123
bool operator==(const Buffer &buff) const
Definition fbuffer.cpp:140
uint32 get(void *b, uint32 size)
copy to buffer from fillSize, and shift fillSize
Definition fbuffer.cpp:150
uint32 getFillSize() const
Definition fbuffer.h:117
static const uint32 defaultDelta
Definition fbuffer.h:241
bool prependString16(const char16 *s)
Definition fbuffer.cpp:244
uint8 * uint8Ptr() const
conversion
Definition fbuffer.h:202
int8 * buffer
Definition fbuffer.h:243
Buffer()
Definition fbuffer.cpp:45
char8 * str8() const
conversion
Definition fbuffer.h:199
void endString16()
Definition fbuffer.h:191
virtual ~Buffer()
Definition fbuffer.cpp:119
bool setSize(uint32 newSize)
Definition fbuffer.cpp:470
bool prependString8(const char8 *s)
Definition fbuffer.cpp:228
bool grow(uint32 memSize)
Definition fbuffer.cpp:402
bool appendString16(const char16 *s)
Definition fbuffer.cpp:218
int8 * operator+(uint32 i)
Definition fbuffer.cpp:528
int8 * pass()
pass the current Buffer's memory
Definition fbuffer.cpp:590
void shiftAt(uint32 position, int32 amount)
moves memory starting at the given position
Definition fbuffer.cpp:415
uint32 delta
Definition fbuffer.h:246
bool swap(int16 swapSize)
swap all bytes of this Buffer by the given swapSize
Definition fbuffer.cpp:541
static int32 wideStringToMultiByte(char8 *dest, const char16 *source, int32 char8Count, uint32 destCodePage=kCP_Default)
If dest is zero, this returns the maximum number of bytes needed to convert source.
Definition fstring.cpp:1924
static int32 multiByteToWideString(char16 *dest, const char8 *source, int32 wcharCount, uint32 sourceCodePage=kCP_Default)
If dest is zero, this returns the maximum number of bytes needed to convert source.
Definition fstring.cpp:1858
unsigned d
Definition inflate.c:940
register unsigned i
Definition inflate.c:1575
unsigned s
Definition inflate.c:1555
#define SWAP_16(w)
Definition ftypes.h:149
#define SWAP_32(l)
Definition ftypes.h:144
#define SWAP_64(i)
Definition ftypes.h:154
static PuglViewHint int value
Definition pugl.h:1708
JSAMPIMAGE data
Definition jpeglib.h:945
Definition baseiids.cpp:43
short int16
Definition ftypes.h:43
int16 char16
Definition ftypes.h:101
int int32
Definition ftypes.h:50
int32 strlen8(const char8 *str)
Definition fstrdefs.h:125
char char8
Definition ftypes.h:93
char int8
Definition ftypes.h:39
long long int64
Definition ftypes.h:66
char16 tchar
Definition ftypes.h:105
unsigned char uint8
Definition ftypes.h:40
unsigned int uint32
Definition ftypes.h:51
#define true
Definition ordinals.h:82
return c
Definition crypt.c:175
memcpy(hh, h, RAND_HEAD_LEN)
int result
Definition process.c:1455
_WDL_CSTRING_PREFIX void INT_PTR count
Definition wdlcstring.h:263