Public Member Functions | |
ByteArrayPtr (const ByteArrayPtr &src) | |
ByteArrayPtr & | operator= (const ByteArrayPtr &src) |
int | GetCapacity () const |
int | GetCount () const |
void | MustNotNull () const |
void | MustNull () const |
void | SetCapacity (int length) |
void | SetCount (int length) |
void | AddCount (int length) |
void | Add (uint8_t data) |
void | AddRange (const uint8_t *data, int count) |
void | InsertRange (int indexAt, const uint8_t *data, int count) |
void | RemoveRange (int indexAt, int count) |
void | RemoveAt (int index) |
void | Clear () |
uint8_t * | GetData () |
const uint8_t * | GetData () const |
ByteArrayPtr | Clone () |
template<typename BYTEARRAYT > | |
void | CopyRangeToT (BYTEARRAYT &dest, int srcOffset, int count) const |
void | CopyRangeTo (ByteArrayPtr &dest, int srcOffset, int count) const |
void | CopyRangeTo (ByteArray &dest, int srcOffset, int count) const |
uint8_t & | operator[] (int index) |
const uint8_t | operator[] (int index) const |
GrowPolicy | GetGrowPolicy () const |
void | SetGrowPolicy (GrowPolicy val) |
void | SetMinCapacity (int val) |
void | UseInternalBuffer () |
void | UseExternalBuffer (uint8_t *buf, int capacity) |
void | UninitBuffer () |
bool | IsNull () const |
void | MustInternalBuffer () |
bool | Equals (const ByteArrayPtr &rhs) const |
Public Member Functions inherited from Proud::BiasManagedPointer< ByteArray, true > | |
BiasManagedPointer (const BiasManagedPointer &src) | |
BiasManagedPointer & | operator= (const BiasManagedPointer &src) |
Static Public Attributes | |
static const size_t | TYPE_SIZE = sizeof(uint8_t) |
Additional Inherited Members | |
Protected Member Functions inherited from Proud::BiasManagedPointer< ByteArray, true > | |
Tombstone * | GetTombstone () const |
void | UninitTombstone () |
void | InitTombstoneIfEmpty () |
It is the form that smart pointer function has been added to ByteArray. It is very sensitive to conversion from 32 to 64 because of being used as the form of network packet, so its form is int32 (not intPtr). To avoid build error, this object has to override require method because ByreArray is inherit class instead of typedef.
|
inline |
TODO:translate needed. Add data in 1 byte unit
data | Byte to add data |
|
inline |
TODO:translate needed. Add byte array data to the current array
data | Byte array pointer to add data |
count | Size of the count array |
|
inline |
Empty the array. The capacity does not change
|
inline |
TODO:translate needed.
|
inline |
TODO:translate needed. copy data to dest
dest | ByteArrayPtr to be copied |
srcOffset | Location of the original array to start copying |
count | Size of the array to be copied |
|
inline |
TODO:translate needed. copy data to dest
dest | ByteArray to be copied |
srcOffset | Location of the original array to start copying |
count | Size of the array to be copied |
|
inline |
TODO:translate needed. copy data to dest
dest | object to be copied |
srcOffset | Location of the original array to start copying |
count | Size of the array to be copied |
|
inline |
TODO:translate needed. Check to see if the content is the same as rhs
rhs | ByteArrayPtr to be compared |
|
inline |
|
inline |
TODO:translate needed.
|
inline |
|
inline |
TODO:translate needed.
|
inline |
TODO:translate needed. Generate an exception if an internal buffer is not being used.
|
inline |
TODO:translate needed. Remove one datum within the array
index | Index value of the array to be removed |
|
inline |
TODO:translate needed. Remove data
indexAt | Index of the removed data |
count | Number of the array to be removed |
|
inline |
TODO:translate needed.
length | Capacity size to change the length |
|
inline |
TODO:translate needed. Set the size of the array
length | Size of the array to change the length |
|
inline |
TODO:translate needed. The weighted value type is set when the array size of this object increases. For more details, refer to GrowPolicy
val | The weighted value type when increasing |
|
inline |
TODO:translate needed. Set the minimum buffer size. When the buffer (capacity) size increases, set it at least bigger than this size.
val | Minimum capacity size |
|
inline |
Call this method if you want to reuse UseInternalBuffer,UseExternalBuffer
|
inline |
If you call this at the beginning, this object use external buffer
|
inline |
TODO:translate needed. If you call this at the initial stage, generate and use an internal buffer