VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
actionResponseFromObjInter.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #ifndef actionResponseFromObjInter_H_
8 #define actionResponseFromObjInter_H_
9 
10 #if DtHLA
11 
12 #include "interactionWithEncDec.h"
13 #include "hostStructs.h"
14 #include <matrix/vlMath.h>
15 
16 
17 
21 
22 class DT_DLL_VL DtActionResponseFromObjInter;
24 
26 typedef void (*DtActionResponseFromObjInterCb)
27  (DtActionResponseFromObjInter* inter, void* usr);
28 
29 
33 class DT_DLL_VL DtActionResponseFromObjInter : public DtInteractionWithEncDec
34 {
35 public:
36 
38  DtActionResponseFromObjInter();
39 
41  virtual ~DtActionResponseFromObjInter();
42 
44  DtActionResponseFromObjInter(const DtActionResponseFromObjInter& orig);
45 
47  DtActionResponseFromObjInter& operator=(
48  const DtActionResponseFromObjInter& orig);
49 
51  virtual void printData() const;
52 
54  virtual void printDataToStream(std::ostream& stream) const;
55 
57  virtual void setActionResult(DtResponseFlag response);
58  virtual DtResponseFlag actionResult() const;
59 
61  virtual const char* name() const;
62 
63 public:
64 
67  static DtInteraction* create();
68 
71  static void addCallback(DtExerciseConn* conn,
72  DtActionResponseFromObjInterCb cb, void* usr,
73  DtDDMRegionSP region = DtDDMRegionSP());
74  static void removeCallback(DtExerciseConn* conn,
75  DtActionResponseFromObjInterCb cb, void* usr,
76  DtDDMRegionSP region = DtDDMRegionSP());
77 
78 protected:
79 
80  DtResponseFlag myActionResult;
81 };
82 
83 inline void DtActionResponseFromObjInter::
84  setActionResult(DtResponseFlag response)
85 {
86  myActionResult = response;
87 }
88 
89 inline DtResponseFlag DtActionResponseFromObjInter::actionResult() const
90 {
91  return myActionResult;
92 }
93 
94 inline const char* DtActionResponseFromObjInter::name() const
95 {
96  return "DtActionResponseFromObjInter";
97 }
98 
99 #endif
100 #endif
101 

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)