![]() |
VR-Link API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 00006 00007 #ifndef hCreatEntInt_H_ 00008 #define hCreatEntInt_H_ 00009 00010 #if DtHLA 00011 00012 #include "hIntWEncDec.h" 00013 #include "hostStructs.h" 00014 #include <matrix/vlMath.h> 00015 00016 00017 00021 00022 class DT_DLL_VL DtCreateEntityInteraction; 00023 class DT_DLL_VL DtExerciseConn; 00024 00025 00027 typedef void (*DtCreateEntityInteractionCb)( 00028 DtCreateEntityInteraction* inter, void* usr); 00029 00030 00031 00035 class DT_DLL_VL DtCreateEntityInteraction : public DtInteractionWithEncDec 00036 { 00037 public: 00038 00040 DtCreateEntityInteraction(); 00041 00043 virtual ~DtCreateEntityInteraction(); 00044 00046 DtCreateEntityInteraction(const DtCreateEntityInteraction& orig); 00047 00049 DtCreateEntityInteraction& operator=(const DtCreateEntityInteraction& orig); 00050 00052 virtual void printData() const; 00053 00055 virtual void printDataToStream(std::ostream& stream) const; 00056 00058 virtual void setSenderId(const DtEntityIdentifier& id); 00059 virtual const DtEntityIdentifier& senderId() const; 00060 00062 virtual void setReceiverId(const DtEntityIdentifier& id); 00063 virtual const DtEntityIdentifier& receiverId() const; 00064 00066 virtual void setRequestId(int id); 00067 virtual int requestId() const; 00068 00070 virtual const char* name() const; 00071 00072 public: 00073 00076 static DtInteraction* create(); 00077 00080 static void addCallback(DtExerciseConn* conn, 00081 DtCreateEntityInteractionCb cb, void* usr, 00082 DtDDMRegionSP region = DtDDMRegionSP()); 00083 static void removeCallback(DtExerciseConn* conn, 00084 DtCreateEntityInteractionCb cb, void* usr, 00085 DtDDMRegionSP region = DtDDMRegionSP()); 00086 00087 protected: 00088 00089 DtEntityIdentifier myOrigEnt; 00090 DtEntityIdentifier myReceiveEnt; 00091 int myRequestId; 00092 }; 00093 00094 inline void DtCreateEntityInteraction::setSenderId(const DtEntityIdentifier& id) 00095 { 00096 myOrigEnt = id; 00097 } 00098 00099 inline const DtEntityIdentifier& DtCreateEntityInteraction::senderId() const 00100 { 00101 return myOrigEnt; 00102 } 00103 00104 inline void DtCreateEntityInteraction::setReceiverId( 00105 const DtEntityIdentifier& id) 00106 { 00107 myReceiveEnt = id; 00108 } 00109 00110 inline const DtEntityIdentifier& DtCreateEntityInteraction::receiverId() const 00111 { 00112 return myReceiveEnt; 00113 } 00114 00115 inline void DtCreateEntityInteraction::setRequestId(int id) 00116 { 00117 myRequestId = id; 00118 } 00119 00120 inline int DtCreateEntityInteraction::requestId() const 00121 { 00122 return myRequestId; 00123 } 00124 00125 inline const char* DtCreateEntityInteraction::name() const 00126 { 00127 return "DtCreateEntityInteraction"; 00128 } 00129 00130 #endif 00131 #endif 00132 00133