VR-Link API Documentation for HLA Evolved
pduFactory.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 
00009 
00010 #ifndef DtPduFactory_H_
00011 #define DtPduFactory_H_
00012 
00013 #if DtDIS
00014 
00015 #include "pdu.h"
00016 
00018 typedef DtPdu* (*DtPduCreator)(const DtNetPduHeader* packet,
00019    DtBufferPtr buffer);
00020 
00021 
00025 #define DtADD_PDU_CREATOR(x) \
00026    addCreator(Dt##x##PduKind, &Dt##x##Pdu::create);
00027 
00028 
00033 
00034 class DT_DLL_VL DtPduFactory
00035 {
00036 public:
00037 
00039    DtPduFactory();
00040 
00042    virtual ~DtPduFactory();
00043 
00045    DtPduFactory(const DtPduFactory& orig);
00046 
00048    DtPduFactory& operator=(const DtPduFactory& orig);
00049 
00053    virtual DtPdu* createPdu(const DtNetPacket* packet,
00054       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00055 
00061    virtual DtPduCreator addCreator(DtPduKind kind, DtPduCreator creator);
00063 
00064    virtual int packetGood(const DtNetPacket* packet) const;
00065 
00066 public:
00067    static int dfltPacketGood(const DtNetPacket* packet);
00068 
00069 protected:
00070 
00072    DtPduCreator* myCreators;
00073 
00074 protected:
00075 
00076    static const int theMaxPduKinds;
00077 };
00078 
00079 #endif
00080 #endif
00081 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)