MAK RTIspy API Documentation for HLA 1516
connectMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: connectMsg.h,v $ $Revision: 1.8 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtConnectMsg_H_
00013 #define DtConnectMsg_H_
00014 
00015 #include "rtiMsg.h"
00016 #include "netDesgFedMsg.h"
00017 
00019 typedef DtNetDesignatedFederateMsg DtNetConnectMsg;
00020 
00021 class DtConnectionMgr;
00022 class DtConnectMsg;
00023 typedef void (*DtConnectCb)(const DtConnectMsg& inter, void* usr);
00024 
00025 class DT_DLL_LRC DtConnectMsg : public DtRtiMsg
00026 {
00027 public:
00028 
00030    DtConnectMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00031 
00033    DtConnectMsg(const DtNetConnectMsg* netRep,
00034       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00035 
00037    DtConnectMsg(DtHandle handle,
00038       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00039 
00041    virtual ~DtConnectMsg();
00042 
00044    virtual DtRtiMsg* clone(bool copy = true) const; 
00045 
00047    virtual void set(DtHandle handle);
00048 
00050    virtual DtHandle connectionHandle() const;
00051    virtual void setConnectionHandle(DtHandle handle);
00052 
00054    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00055 
00056 public:
00057 
00059    static DtRtiMsg* create(const DtNetMsgHeader* initial,
00060       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00061 
00062    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00063 
00065    static void addCallback(DtConnectionMgr* conn,
00066       DtConnectCb cb, void* usr, bool isMomCallback=false);
00067    static void removeCallback(DtConnectionMgr* conn,
00068       DtConnectCb cb, void* usr, bool isMomCallback=false);
00069 
00070 protected:
00071 
00073    virtual DtNetConnectMsg* netConnectMsg();
00074    virtual const DtNetConnectMsg* netConnectMsg() const;
00075 
00077    virtual DtRtiMsgKind internalDtRtiMsgKind();
00078 
00080    virtual int minSize() const;
00081 
00083    virtual DtConnectMsg* self() const;
00084 
00085 protected:
00086 
00087 };
00088 
00089 
00090 inline DtConnectMsg* DtConnectMsg::self() const
00091 {
00092    return const_cast<DtConnectMsg*>( this );
00093 }
00094 
00095 #endif
00096 

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)