#include <qcstring.h>
To aid porting of Qt programs to FOX.
Public Types | |
typedef unsigned char * | Iterator |
typedef const unsigned char * | ConstIterator |
typedef unsigned char | ValueType |
Public Member Functions | |
QByteArray () | |
QByteArray (FXuval size) | |
QByteArray (unsigned char *a, uint n, bool noDeleteExtArray=true) | |
unsigned char * | data () const |
operator const unsigned char * () const | |
uint | size () const |
uint | count () const |
bool | isEmpty () const |
bool | isNull () const |
bool | resize (uint size) |
bool | resize (uint size, QGArray::Optimization optim) |
bool | truncate (uint pos) |
void | swap (QMemArray< unsigned char > &o) |
bool | fill (const unsigned char &val, int newsize=-1) |
FXDEPRECATEDEXT void | detach () |
FXDEPRECATEDEXT QMemArray < unsigned char > | copy () const |
FXDEPRECATEDEXT QMemArray < unsigned char > & | assign (const QMemArray< unsigned char > &o) |
FXDEPRECATEDEXT QMemArray < unsigned char > & | assign (const unsigned char *a, uint n) |
FXDEPRECATEDEXT QMemArray < unsigned char > & | duplicate (const QMemArray< unsigned char > &o) |
FXDEPRECATEDEXT QMemArray < unsigned char > & | duplicate (const unsigned char *a, uint n) |
QMemArray< unsigned char > & | setRawData (const unsigned char *a, uint n, bool _noDeleteExtArray=false) |
void | resetRawData (const unsigned char *a, uint n) |
int | find (const unsigned char &val, uint i=0) const |
int | contains (const unsigned char &val) const |
void | sort () |
int | bsearch (const unsigned char &val) const |
unsigned char & | at (uint i) const |
unsigned char & | operator[] (uint i) const |
unsigned char & | operator[] (int i) const |
bool | operator== (const QMemArray< unsigned char > &o) const |
bool | operator!= (const QMemArray< unsigned char > &o) const |
Iterator | begin () |
ConstIterator | begin () const |
Iterator | end () |
ConstIterator | end () const |
void | push_back (const unsigned char &v) |
void | append (const unsigned char &v) |
FX::QByteArray::QByteArray | ( | ) | [inline] |
Constructs an empty array of type.
FX::QByteArray::QByteArray | ( | FXuval | size | ) | [inline] |
Constructs an array of type size long.
FX::QByteArray::QByteArray | ( | unsigned char * | a, | |
uint | n, | |||
bool | noDeleteExtArray = true | |||
) | [inline] |
Constructs an array using an external array.
unsigned char * FX::QMemArray< unsigned char >::data | ( | ) | const [inline, inherited] |
Returns a pointer to the array.
uint FX::QMemArray< unsigned char >::size | ( | ) | const [inline, inherited] |
Returns the number of elements in the array.
bool FX::QMemArray< unsigned char >::isEmpty | ( | ) | const [inline, inherited] |
Returns true if the array is empty.
bool FX::QMemArray< unsigned char >::isNull | ( | ) | const [inline, inherited] |
Returns true if the array is empty.
bool FX::QMemArray< unsigned char >::resize | ( | uint | size | ) | [inline, inherited] |
Resizes the array.
void FX::QMemArray< unsigned char >::swap | ( | QMemArray< unsigned char > & | o | ) | [inline, inherited] |
Swaps the contents of two arrays.
bool FX::QMemArray< unsigned char >::fill | ( | const unsigned char & | val, | |
int | newsize = -1 | |||
) | [inline, inherited] |
Fills the array with value val.
FXDEPRECATEDEXT void FX::QMemArray< unsigned char >::detach | ( | ) | [inline, inherited] |
FXDEPRECATEDEXT QMemArray<unsigned char > FX::QMemArray< unsigned char >::copy | ( | ) | const [inline, inherited] |
FXDEPRECATEDEXT QMemArray<unsigned char >& FX::QMemArray< unsigned char >::assign | ( | const QMemArray< unsigned char > & | o | ) | [inline, inherited] |
FXDEPRECATEDEXT QMemArray<unsigned char >& FX::QMemArray< unsigned char >::duplicate | ( | const QMemArray< unsigned char > & | o | ) | [inline, inherited] |
QMemArray<unsigned char >& FX::QMemArray< unsigned char >::setRawData | ( | const unsigned char * | a, | |
uint | n, | |||
bool | _noDeleteExtArray = false | |||
) | [inline, inherited] |
Sets QMemArray<> to use an external array. Note that not all methods are implemented for this (see the header file). Note also that like Qt's version, you must not resize or reassign the array when in this state. Failure to call resetRawData() before destruction causes delete
on the data unless you set _noDeleteExtArray.
void FX::QMemArray< unsigned char >::resetRawData | ( | const unsigned char * | a, | |
uint | n | |||
) | [inline, inherited] |
Resets QMemArray<> to use its internally managed data.
int FX::QMemArray< unsigned char >::find | ( | const unsigned char & | val, | |
uint | i = 0 | |||
) | const [inline, inherited] |
Returns the index of val starting the search from i, returning -1 if not found.
int FX::QMemArray< unsigned char >::contains | ( | const unsigned char & | val | ) | const [inline, inherited] |
Returns the number of times val is in the array.
void FX::QMemArray< unsigned char >::sort | ( | ) | [inline, inherited] |
Sorts the array into numerical order.
int FX::QMemArray< unsigned char >::bsearch | ( | const unsigned char & | val | ) | const [inline, inherited] |
Performs a binary search to find an item (needs a numerically sorted array), returning -1 if not found.
unsigned char & FX::QMemArray< unsigned char >::at | ( | uint | i | ) | const [inline, inherited] |
Returns a reference to the element at index i in the array.
Iterator FX::QMemArray< unsigned char >::begin | ( | ) | [inline, inherited] |
Returns an iterator pointing to the first element.
ConstIterator FX::QMemArray< unsigned char >::begin | ( | ) | const [inline, inherited] |
Returns a const iterator pointint to the first element.
Iterator FX::QMemArray< unsigned char >::end | ( | ) | [inline, inherited] |
Returns an iterator pointing one past the last element.
ConstIterator FX::QMemArray< unsigned char >::end | ( | ) | const [inline, inherited] |
Returns a const iterator pointing one past the last element.
void FX::QMemArray< unsigned char >::push_back | ( | const unsigned char & | v | ) | [inline, inherited] |
Appends an item onto the end.