#include <cbytearray.h>


Public Member Functions | |
| CByteArray & | append (CMachine::ubit8 data) |
| CByteArray & | append (CMachine::ubit8 *data, CMachine::ubit32 size) |
| CMachine::ubit8 | at (CMachine::ubit32 index) |
| CByteArray () | |
| virtual void | clear () |
| CByteArray & | copy (CMachine::ubit8 *data, CMachine::ubit32 size) |
| virtual CMachine::ubit8 * | data () |
| bool | isEmpty () |
| bool | isNull () |
| virtual CMachine::ubit32 | length () |
| CByteArray & | prepend (CMachine::ubit8 data) |
| CByteArray & | prepend (CMachine::ubit8 *data, CMachine::ubit32 size) |
| CByteArray & | resize (CMachine::ubit32 size) |
| CMachine::ubit8 | set (CMachine::ubit32 index, CMachine::ubit8 data) |
| CByteArray & | set (CMachine::ubit32 index, CMachine::ubit8 *data, CMachine::ubit32 size) |
| CMachine::ubit32 | size () |
| virtual | ~CByteArray () |
Protected Attributes | |
| CMachine::ubit8 * | mData |
| CMachine::ubit32 | mSize |
Definition at line 32 of file cbytearray.h.
| PikeAero::CByteArray::CByteArray | ( | ) |
| PikeAero::CByteArray::~CByteArray | ( | ) | [virtual] |
Definition at line 32 of file cbytearray.cpp.
References clear().
00033 { 00034 clear(); 00035 }

| CByteArray& PikeAero::CByteArray::append | ( | CMachine::ubit8 | data | ) | [inline] |
Reimplemented in PikeAero::CString.
Definition at line 43 of file cbytearray.h.
References append().
Referenced by append().


| CByteArray& PikeAero::CByteArray::append | ( | CMachine::ubit8 * | data, | |
| CMachine::ubit32 | size | |||
| ) | [inline] |
Definition at line 42 of file cbytearray.h.
References mSize, resize(), and set().
Referenced by PikeAero::CCommunication::rx().


| CMachine::ubit8 PikeAero::CByteArray::at | ( | CMachine::ubit32 | index | ) | [inline] |
Definition at line 50 of file cbytearray.h.
References mData.
Referenced by PikeAero::CCommunicationPacket::checksum(), PikeAero::CCommunicationPacket::control(), PikeAero::CCommunicationPacket::data(), PikeAero::CCommunicationPacket::length(), PikeAero::CTaskQueue::next(), PikeAero::CCommunicationPacket::sequence(), PikeAero::CCommunicationPacket::setLength(), PikeAero::CCommunicationPacket::setType(), PikeAero::CCommunication::tx(), PikeAero::CCommunicationPacket::txFlush(), PikeAero::CCommunication::txnl(), and PikeAero::CCommunicationPacket::type().
00050 {return mData[index];}

| void PikeAero::CByteArray::clear | ( | ) | [virtual] |
Definition at line 37 of file cbytearray.cpp.
References PikeAero::CMemHeap::free(), mData, and mSize.
Referenced by PikeAero::CTaskConsole::monitor(), PikeAero::CString::resize(), PikeAero::CTaskConsolePacket::run(), PikeAero::CTaskConsole::run(), PikeAero::CCommunication::rx(), PikeAero::CString::setData(), PikeAero::CString::sprintf(), PikeAero::CString::toHex(), ~CByteArray(), PikeAero::CCommunication::~CCommunication(), and PikeAero::CString::~CString().
00038 { 00039 if ( mData != NULL ) 00040 { 00041 CMemHeap::free(mData); 00042 mData=NULL; 00043 } 00044 mSize=0; 00045 }


| CByteArray& PikeAero::CByteArray::copy | ( | CMachine::ubit8 * | data, | |
| CMachine::ubit32 | size | |||
| ) | [inline] |
| virtual CMachine::ubit8* PikeAero::CByteArray::data | ( | ) | [inline, virtual] |
Definition at line 54 of file cbytearray.h.
References mData.
Referenced by PikeAero::CString::append(), PikeAero::CCommunicationPacket::CCommunicationPacket(), PikeAero::CString::compare(), PikeAero::CString::copy(), PikeAero::CTaskConsole::drawCommandPrompt(), PikeAero::CString::find(), PikeAero::CString::isEmpty(), PikeAero::CString::isNull(), PikeAero::CString::left(), PikeAero::CString::length(), PikeAero::CString::mid(), PikeAero::CString::right(), set(), PikeAero::CString::sprintff(), PikeAero::CString::strcmp(), PikeAero::CString::toBit32(), PikeAero::CString::toLower(), PikeAero::CString::toUBit32(), and PikeAero::CString::toUpper().
00054 {return mData;}

| bool PikeAero::CByteArray::isEmpty | ( | ) | [inline] |
Reimplemented in PikeAero::CString.
Definition at line 57 of file cbytearray.h.
References isNull(), and length().

| bool PikeAero::CByteArray::isNull | ( | ) | [inline] |
Reimplemented in PikeAero::CString.
Definition at line 56 of file cbytearray.h.
References mData.
Referenced by isEmpty().
00056 {return mData==NULL;}

| virtual CMachine::ubit32 PikeAero::CByteArray::length | ( | ) | [inline, virtual] |
Reimplemented in PikeAero::CRingBuffer, and PikeAero::CString.
Definition at line 53 of file cbytearray.h.
References mSize.
Referenced by isEmpty(), and PikeAero::CCommunication::tx().
00053 {return mSize;}

| CByteArray& PikeAero::CByteArray::prepend | ( | CMachine::ubit8 | data | ) | [inline] |
Reimplemented in PikeAero::CString.
Definition at line 45 of file cbytearray.h.
References prepend().
Referenced by prepend().


| CByteArray & PikeAero::CByteArray::prepend | ( | CMachine::ubit8 * | data, | |
| CMachine::ubit32 | size | |||
| ) |
Definition at line 47 of file cbytearray.cpp.
References mData, memcpy, memmove, mSize, and resize().
00048 { 00049 CMachine::ubit32 t = mSize; 00050 resize( mSize + size ); 00051 memmove( &mData[size], &mData[0], t ); 00052 memcpy(&mData[0],data,size); 00053 return *this; 00054 }

| CByteArray& PikeAero::CByteArray::resize | ( | CMachine::ubit32 | size | ) | [inline] |
Reimplemented in PikeAero::CString.
Definition at line 40 of file cbytearray.h.
References mData, mSize, and PikeAero::CMemHeap::realloc().
Referenced by append(), PikeAero::CCommunication::CCommunication(), PikeAero::CCommunicationPacket::CCommunicationPacket(), copy(), PikeAero::CTaskQueue::initialize(), and prepend().
00040 {mData = static_cast<CMachine::ubit8*>(CMemHeap::realloc(mData,(mSize=size)));return *this;}


| CMachine::ubit8 PikeAero::CByteArray::set | ( | CMachine::ubit32 | index, | |
| CMachine::ubit8 | data | |||
| ) | [inline] |
| CByteArray& PikeAero::CByteArray::set | ( | CMachine::ubit32 | index, | |
| CMachine::ubit8 * | data, | |||
| CMachine::ubit32 | size | |||
| ) | [inline] |
Definition at line 47 of file cbytearray.h.
References data(), mData, memcpy, and size().
Referenced by append(), PikeAero::CCommunicationPacket::appendData(), copy(), PikeAero::CTaskQueue::initialize(), PikeAero::CCommunicationPacket::setChecksum(), PikeAero::CCommunicationPacket::setData(), PikeAero::CCommunicationPacket::setLength(), PikeAero::CCommunicationPacket::setSequence(), PikeAero::CCommunicationPacket::setType(), PikeAero::CString::strcat(), and PikeAero::CString::strcpy().


| CMachine::ubit32 PikeAero::CByteArray::size | ( | ) | [inline] |
Definition at line 52 of file cbytearray.h.
References mSize.
Referenced by PikeAero::CCommunicationPacket::CCommunicationPacket(), PikeAero::CString::explode(), PikeAero::CRingBuffer::free(), PikeAero::CRingBuffer::full(), PikeAero::CRingBuffer::insert(), PikeAero::CRingBuffer::length(), PikeAero::CTaskQueue::next(), PikeAero::CRingBuffer::remove(), PikeAero::CString::resize(), and set().
00052 {return mSize;}

CMachine::ubit8* PikeAero::CByteArray::mData [protected] |
Definition at line 61 of file cbytearray.h.
Referenced by at(), clear(), data(), PikeAero::CRingBuffer::insert(), isNull(), PikeAero::CRingBuffer::peek(), prepend(), PikeAero::CRingBuffer::remove(), resize(), set(), and PikeAero::CString::setData().
CMachine::ubit32 PikeAero::CByteArray::mSize [protected] |
1.5.8