MAK RTIspy API Documentation for HLA Evolved
destroyMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: destroyMsg.h,v $ $Revision: 1.17 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtDestroyMsg_H_
00013 #define DtDestroyMsg_H_
00014 
00015 #include "rtiMsg.h"
00016 #include "netRtiMsgHdr.h"
00017 
00018 class DtConnectionMgr;
00019 class DtDestroyMsg;
00020 typedef void (*DtDestroyCb)(const DtDestroyMsg& inter, void* usr);
00021 
00022 class DtNetDestroyMsg
00023 {
00024 public:
00025 
00026    DtNetMsgHeader header;
00027    char fullFedExName[64];
00028 };
00029 
00030 class DT_DLL_LRC DtDestroyMsg : public DtRtiMsg
00031 {
00032 public:
00033 
00035    DtDestroyMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00036 
00037    DtDestroyMsg(const char* fedExName,
00038       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00039 
00041    DtDestroyMsg(const DtNetDestroyMsg* netRepMsg,
00042       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00043 
00045    virtual ~DtDestroyMsg();
00046 
00048    virtual DtRtiMsg* clone(bool copy = true) const; 
00049 
00051    virtual void set(const char* fedExName);
00052 
00054    virtual void setFullFedExName(const MAKRti::DtString& name);
00055    virtual const MAKRti::DtString fullFedExName() const;
00056 
00058    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00059 
00060 public:
00061 
00063    static DtRtiMsg* create(const DtNetMsgHeader* initial,
00064       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00065 
00067    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00068 
00070    static void addCallback(DtConnectionMgr* conn,
00071       DtDestroyCb cb, void* usr);
00072    static void removeCallback(DtConnectionMgr* conn,
00073       DtDestroyCb cb, void* usr);
00074 
00075 protected:
00076 
00078    virtual DtNetDestroyMsg* netDestroyMsg();
00079    virtual const DtNetDestroyMsg* netDestroyMsg() const;
00080 
00082    virtual DtRtiMsgKind internalDtRtiMsgKind();
00083 
00085    virtual int minSize() const;
00086 
00088    virtual DtDestroyMsg* self() const;
00089 };
00090 
00091 
00092 inline DtDestroyMsg* DtDestroyMsg::self() const
00093 {
00094    return const_cast<DtDestroyMsg*>( this );
00095 }
00096 
00097 #endif
00098 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)