MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fedAmbCallbackMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2007 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: fedAmbCallbackMsg.h,v $ $Revision: 1.5 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef fedAmbCallbackMsg_h
10 #define fedAmbCallbackMsg_h
11 
14 
15 #include "rtiMsg.h"
16 #if defined(DtIFSPEC1516) || defined(DtIFSPEC1516E)
17 #include <RTI/FederateAmbassador.h>
18 #else
19 #ifdef DtIFSPEC13DLC
20 #include "RTI13.h"
21 #define RTI rti13
22 #else
23 #include "RTI.hh"
24 #endif
25 #endif
26 
27 class DtConnectionMgr;
28 class DtFedAmbCallback;
30 
31 typedef void (*DtCallbackCb)(const DtFedAmbCallbackMsg& msg, void* usr);
32 
37 
39 {
40 public:
42  DtFedAmbCallbackMsg(std::auto_ptr<DtFedAmbCallback> callback);
43 
45  virtual ~DtFedAmbCallbackMsg();
46 
47 private:
50  DtFedAmbCallbackMsg& operator = (DtFedAmbCallbackMsg const& orig);
51 
52 public:
56  virtual DtRtiMsg* clone(bool copy = true) const;
57 
60 
61 #ifdef DtIFSPEC1516
62 
63  virtual void evokeCallback(rti1516::FederateAmbassador* fedAmb) const;
64 #elif defined(DtIFSPEC1516E)
65 
66  virtual void evokeCallback(rti1516e::FederateAmbassador* fedAmb) const;
67 #else
68 
69  virtual void evokeCallback(RTI::FederateAmbassador* fedAmb) const;
70 #endif
71 
73  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
74 
75 public:
77  static void addCallback(DtConnectionMgr *conn,
78  DtCallbackCb cb, void *usr);
79 
81  static void removeCallback(DtConnectionMgr *conn,
82  DtCallbackCb cb, void *usr);
83 
84 protected:
85 
87  std::auto_ptr<DtFedAmbCallback> myCallback;
88 };
89 
90 
91 #endif
92 

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)