Alex Bikfalvi
SimStream Documentation
Packet.h
00001 #pragma once 00002 00003 #include "Codes.h" 00004 00005 class CPacket 00006 { 00007 public: 00008 enum ETypeOfService 00009 { 00010 PACKET_TOS_HIGH = 0, 00011 PACKET_TOS_LOW = 1 00012 }; 00013 00014 protected: 00015 __uint32 size; 00016 CPacket* payload; 00017 ETypeOfService tos; 00018 00019 public: 00020 CPacket( 00021 __uint32 size, 00022 CPacket* payload, 00023 ETypeOfService tos = PACKET_TOS_LOW 00024 ); 00025 virtual ~CPacket() { } 00026 00027 inline __uint32 Size() { return this->size; } 00028 inline CPacket* Payload() { return this->payload; } 00029 inline ETypeOfService Tos() { return this->tos; } 00030 00031 virtual EPacketType Type() = 0; 00032 virtual CPacket* Copy() = 0; 00033 00034 void Delete(); 00035 00036 virtual inline char* ToString() { return NULL; } 00037 };
Last updated: February 8, 2011