![]() |
VR-Link API Documentation for DIS
|
class DtPduFactory: More...
Inheritance diagram for DtPduFactory:
Collaboration diagram for DtPduFactory:Public Member Functions | |
| DtPduFactory () | |
| default constructor | |
| virtual | ~DtPduFactory () |
| destructor | |
| DtPduFactory (const DtPduFactory &orig) | |
| copy constructor | |
| DtPduFactory & | operator= (const DtPduFactory &orig) |
| assignment operator | |
| virtual DtPdu * | createPdu (const DtNetPacket *packet, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER) |
| Create the specified pdu. | |
| virtual DtPduCreator | addCreator (DtPduKind kind, DtPduCreator creator) |
| Add a pdu creation function to the factory. | |
| virtual int | packetGood (const DtNetPacket *packet) const |
| Returns whether packet is appropriate DIS version. | |
Static Public Member Functions | |
| static int | dfltPacketGood (const DtNetPacket *packet) |
Protected Attributes | |
| DtPduCreator * | myCreators |
| myCreators is an array of theMaxPduKinds items. | |
Static Protected Attributes | |
| static const int | theMaxPduKinds |
class DtPduFactory:
Instances of DtPduFactory are used to create PDUs (protocol data units) or packets, typically for DIS (as opposed to HLA).
default constructor
| virtual DtPduFactory::~DtPduFactory | ( | ) | [virtual] |
destructor
| DtPduFactory::DtPduFactory | ( | const DtPduFactory & | orig | ) |
copy constructor
| virtual DtPduCreator DtPduFactory::addCreator | ( | DtPduKind | kind, |
| DtPduCreator | creator | ||
| ) | [virtual] |
Add a pdu creation function to the factory.
The function must return a new'ed pdu object which will be deleted by the user. Returns any previous pdu creation function which was replaced by the add.
| virtual DtPdu* DtPduFactory::createPdu | ( | const DtNetPacket * | packet, |
| DtBufferPtr | buffer = DtUSE_INTERNAL_BUFFER |
||
| ) | [virtual] |
Create the specified pdu.
Note: Caller is responsible for deleting. Returns NULL if pdu creation function is not in the factory.
| static int DtPduFactory::dfltPacketGood | ( | const DtNetPacket * | packet | ) | [static] |
| DtPduFactory& DtPduFactory::operator= | ( | const DtPduFactory & | orig | ) |
assignment operator
| virtual int DtPduFactory::packetGood | ( | const DtNetPacket * | packet | ) | const [virtual] |
Returns whether packet is appropriate DIS version.
DtPduCreator* DtPduFactory::myCreators [protected] |
myCreators is an array of theMaxPduKinds items.
const int DtPduFactory::theMaxPduKinds [static, protected] |