INET Framework for OMNeT++/OMNEST
|
Class generated from inet/common/ByteArray.msg:27
by nedtool.
More...
#include <ByteArray_m.h>
Public Member Functions | |
virtual | ~ByteArray_Base () |
virtual ByteArray_Base * | dup () const override |
virtual void | parsimPack (omnetpp::cCommBuffer *b) const override |
virtual void | parsimUnpack (omnetpp::cCommBuffer *b) override |
virtual void | setDataArraySize (unsigned int size) |
virtual unsigned int | getDataArraySize () const |
virtual char | getData (unsigned int k) const |
virtual void | setData (unsigned int k, char data) |
Protected Member Functions | |
bool | operator== (const ByteArray_Base &) |
ByteArray_Base () | |
ByteArray_Base (const ByteArray_Base &other) | |
ByteArray_Base & | operator= (const ByteArray_Base &other) |
Protected Attributes | |
char * | data |
unsigned int | data_arraysize |
Private Member Functions | |
void | copy (const ByteArray_Base &other) |
Class generated from inet/common/ByteArray.msg:27
by nedtool.
// // Class that carries raw bytes. // For example, used by ~RawPacket and some TCP queues. // class ByteArray { @customize(true); char data[]; }
ByteArray_Base is only useful if it gets subclassed, and ByteArray is derived from it. The minimum code to be written for ByteArray is the following:
class INET_API ByteArray : public ByteArray_Base { private: void copy(const ByteArray& other) { ... }
public: ByteArray() : ByteArray_Base() {} ByteArray(const ByteArray& other) : ByteArray_Base(other) {copy(other);} ByteArray& operator=(const ByteArray& other) {if (this==&other) return *this; ByteArray_Base::operator=(other); copy(other); return *this;} virtual ByteArray *dup() const override {return new ByteArray(*this);} // ADD CODE HERE to redefine and implement pure virtual functions from ByteArray_Base };
The following should go into a .cc (.cpp) file:
Register_Class(ByteArray)
|
protected |
|
protected |
|
virtual |
|
private |
|
inlineoverridevirtual |
Reimplemented in inet::ByteArray.
|
virtual |
|
virtual |
Referenced by inet::IPv4FragBuf::addFragment(), PacketDrill::buildInitAckChunk(), PacketDrill::buildInitChunk(), inet::tcp::TCPByteStreamRcvQueue::Region::copyTo(), inet::tcp::TCPByteStreamRcvQueue::createRegionFromSegment(), inet::tcp::TcpLwipByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TCP_NSC_ByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TcpLwipByteStreamSendQueue::enqueueAppData(), inet::tcp::TCP_NSC_ByteStreamSendQueue::enqueueAppData(), inet::tcp::TCPByteStreamSendQueue::enqueueAppData(), and inet::ByteArrayBuffer::push().
|
protected |
Referenced by inet::ByteArray::operator=().
|
protected |
|
overridevirtual |
|
overridevirtual |
|
virtual |
Referenced by inet::TCPEchoApp::handleMessage().
|
virtual |
Referenced by inet::TCPEchoApp::handleMessage().
|
protected |
Referenced by inet::ByteArray::addDataFromBuffer(), inet::ByteArray::assignBuffer(), inet::ByteArray::copyDataFromBuffer(), inet::ByteArray::copyDataFromByteArray(), inet::ByteArray::copyDataToBuffer(), inet::ByteArray::expandData(), inet::ByteArray::setDataFromBuffer(), inet::ByteArray::setDataFromByteArray(), and inet::ByteArray::truncateData().
|
protected |
Referenced by inet::ByteArray::addDataFromBuffer(), inet::ByteArray::assignBuffer(), inet::ByteArray::copyDataFromBuffer(), inet::ByteArray::copyDataFromByteArray(), inet::ByteArray::copyDataToBuffer(), inet::ByteArray::expandData(), inet::ByteArray::setDataFromBuffer(), inet::ByteArray::setDataFromByteArray(), and inet::ByteArray::truncateData().