36 SetBuffer(
new char[aBytes], aBytes,
true);
40 UtBuffer(
char* aData,
int aBytes,
bool aCanGrow =
false)
61 PutRaw(aSrc.mBuffer, aSrc.mPutPos);
84 void SetLittleEndian();
86 void SetNativeByteOrder();
102 void SetBuffer(
char* aData,
size_t aBytes,
bool aCanGrow =
false)
133 void PutRaw(
const char* aBuffer,
size_t aBytes)
140 void GetRaw(
char* aBuffer,
size_t aBytes)
149 void Move(
size_t aBeginOffset,
size_t aEndOffset,
size_t aNewBegin);
160 void GrowBy(
size_t aBytes);
213 for (
size_t i = 0; i < BYTES; ++i)
231 for (
size_t i = 0; i < BYTES; ++i)
233 *(aBuffer + i) = bufPtr[BYTES - 1 - i];
#define WSF_UT_EXPORT
Definition WsfUtExport.hpp:32
void GetRaw(char *aBuffer, size_t aBytes)
Reads a sequence of aBytes to the buffer.
Definition UtBuffer.hpp:140
void PutP(const char *aBuffer)
Definition UtBuffer.hpp:208
size_t mBytes
Definition UtBuffer.hpp:244
void SetGetPos(size_t aPos)
Set the current offset used to get data.
Definition UtBuffer.hpp:118
void GetP(char *aBuffer)
Definition UtBuffer.hpp:226
const char * GetBuffer() const
Returns a pointer to the internal buffer.
Definition UtBuffer.hpp:127
size_t GetPutPos() const
Set the current offset used to put data.
Definition UtBuffer.hpp:116
void Reset()
Set the put/get positions to the start of the buffer.
Definition UtBuffer.hpp:147
void EnableByteSwap(bool aSwapBytes)
Disable or Enable byte swapping.
Definition UtBuffer.hpp:80
void Dispose()
Definition UtBuffer.hpp:88
UtBuffer()
Construct the buffer with a default size, and allow growth.
Definition UtBuffer.hpp:66
void SetPutPos(size_t aPos)
Set the current offset used to put data.
Definition UtBuffer.hpp:112
static const int cDEFAULT_BUFFER_SIZE
Definition UtBuffer.hpp:48
size_t & GetPutPos()
Get the current offset used to put data.
Definition UtBuffer.hpp:114
size_t GetGetPos() const
Get the current offset used to get data.
Definition UtBuffer.hpp:122
size_t GetBytes() const
Returns the size of the internal buffer.
Definition UtBuffer.hpp:130
UtBuffer(const UtBuffer &aSrc)
Construct a copy of aSrc.
Definition UtBuffer.hpp:51
void SetBigEndian()
Enable byte swapping if the local machine is little-endian.
Definition UtBuffer.cpp:15
void Put(const T &aVal)
Definition UtBuffer.hpp:184
void * ReleaseBuffer()
Definition UtBuffer.hpp:173
void SwapBuffer(UtBuffer &aRhs)
Swap the internal buffers between this and aRhs.
Definition UtBuffer.hpp:164
UtBuffer(char *aData, int aBytes, bool aCanGrow=false)
Construct the buffer with a user buffer, see SetBuffer().
Definition UtBuffer.hpp:40
bool CheckPutSpace(size_t aPutSize)
Definition UtBuffer.hpp:196
void Get(T &aVal)
Definition UtBuffer.hpp:191
~UtBuffer()
Definition UtBuffer.hpp:77
size_t mPutPos
Definition UtBuffer.hpp:246
size_t mGetPos
Definition UtBuffer.hpp:245
size_t & GetGetPos()
Get the current offset used to get data.
Definition UtBuffer.hpp:120
bool mCanGrow
Definition UtBuffer.hpp:247
void PutRaw(const char *aBuffer, size_t aBytes)
Writes a sequence of aBytes to the buffer.
Definition UtBuffer.hpp:133
void SetBuffer(char *aData, size_t aBytes, bool aCanGrow=false)
Definition UtBuffer.hpp:102
char * mBuffer
Definition UtBuffer.hpp:243
void Grow(size_t aNewSize)
Grow the buffer so it is at least as large as aNewSize.
Definition UtBuffer.hpp:152
char * GetBuffer()
Returns a pointer to the internal buffer.
Definition UtBuffer.hpp:125
void GrowBy(size_t aBytes)
Grow the buffer by an increment of at least aBytes.
Definition UtBuffer.cpp:36
UtBuffer(int aBytes)
Construct the buffer with a grow-able buffer of size aBytes.
Definition UtBuffer.hpp:31
bool mSwapBytes
Definition UtBuffer.hpp:248
UtBuffer & operator=(const UtBuffer &)=delete
size_t GetValidBytes() const
Return the difference between the write position and the read position.
Definition UtBuffer.hpp:162
void swap(WsfRoute &aLhs, WsfRoute &aRhs)
Definition WsfRoute.hpp:294