MAK RTIspy API Documentation for HLA 1.3
fedAmbCallbackMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2007 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: fedAmbCallbackMsg.h,v $ $Revision: 1.5 $ $State: Exp $
00007 *********************************************************************/
00008 
00009 #ifndef fedAmbCallbackMsg_h
00010 #define fedAmbCallbackMsg_h
00011 
00014 
00015 #include "rtiMsg.h"
00016 #if defined(DtIFSPEC1516) || defined(DtIFSPEC1516E)
00017 #include <RTI/FederateAmbassador.h>
00018 #else
00019 #ifdef DtIFSPEC13DLC
00020 #include "RTI13.h"
00021 #define RTI rti13
00022 #else
00023 #include "RTI.hh"
00024 #endif
00025 #endif
00026 
00027 class DtConnectionMgr;
00028 class DtFedAmbCallback;
00029 class DtFedAmbCallbackMsg;
00030 
00031 typedef void (*DtCallbackCb)(const DtFedAmbCallbackMsg& msg, void* usr);
00032 
00037 
00038 class DT_DLL_LRC DtFedAmbCallbackMsg : public DtRtiMsg
00039 {
00040 public:
00042    DtFedAmbCallbackMsg(std::auto_ptr<DtFedAmbCallback> callback);
00043 
00045    virtual ~DtFedAmbCallbackMsg();
00046 
00047 private:
00049    DtFedAmbCallbackMsg(DtFedAmbCallbackMsg const& orig);
00050    DtFedAmbCallbackMsg& operator = (DtFedAmbCallbackMsg const& orig);
00051 
00052 public:
00056    virtual DtRtiMsg* clone(bool copy = true) const; 
00057 
00059    virtual DtRtiMsgKind internalDtRtiMsgKind();
00060 
00061 #ifdef DtIFSPEC1516
00062 
00063    virtual void evokeCallback(rti1516::FederateAmbassador* fedAmb) const;
00064 #elif defined(DtIFSPEC1516E)
00065 
00066    virtual void evokeCallback(rti1516e::FederateAmbassador* fedAmb) const;
00067 #else
00068 
00069    virtual void evokeCallback(RTI::FederateAmbassador* fedAmb) const;
00070 #endif
00071 
00073    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00074 
00075 public:
00077    static void addCallback(DtConnectionMgr *conn, 
00078       DtCallbackCb cb, void *usr);
00079 
00081    static void removeCallback(DtConnectionMgr *conn, 
00082       DtCallbackCb cb, void *usr);
00083 
00084 protected:
00085 
00087    std::auto_ptr<DtFedAmbCallback> myCallback;
00088 };
00089 
00090 
00091 #endif //! fedAmbCallbackMsg_h
00092 

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)