VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
chatInterHLA.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 
11 #if DtHLA
12 
14 #include <vl/interactionWithEncDec.h>
15 #include <vlutil/vlString.h>
16 #include <vl/globalObjectDesignator.h>
17 #include <vl/hlaLogicalTime.h>
18 #include <vl/hlaLogicalTimeInterval.h>
19 #include <vlpi/entityType.h>
20 #include <vlpi/entityIdentifier.h>
21 #include <matrix/vlVector.h>
22 
23 class DtExerciseConn;
24 
25 
26 class DtChatInter;
27 
29 typedef void (*DtChatInterCb) (DtChatInter* inter,
30  void* usr);
31 
34 {
35 public:
36 
38  DtChatInter();
39 
41  virtual ~DtChatInter() override;
42 
44  DtChatInter(const DtChatInter& orig);
45 
47  DtChatInter& operator=(const DtChatInter& orig);
48 
50  virtual void printData() const override;
51 
53  virtual void printDataToStream(std::ostream &stream) const override;
54 
56  virtual void setSender(const DtEntityIdentifier& val);
57 
59  virtual DtEntityIdentifier sender() const;
60 
62  virtual void setSenderUsername(const std::wstring& val);
63 
65  virtual std::wstring senderUsername() const;
66 
68  virtual void setChannel(const std::wstring& val);
69 
71  virtual std::wstring channel() const;
72 
74  virtual void setForceIdentifier(DtForceType val);
75 
77  virtual DtForceType forceIdentifier() const;
78 
80  virtual void setMessageText(const std::wstring& val);
81 
83  virtual std::wstring messageText() const;
84 
86  virtual const char *name() const override { return "DtChatInter"; }
87 
88 public:
89 
92  static DtInteraction* create();
93 
96  static void addCallback(DtExerciseConn* conn,
97  DtChatInterCb cb, void* usr,
98  DtDDMRegionSP region = DtDDMRegionSP());
99  static void removeCallback(DtExerciseConn* conn,
100  DtChatInterCb cb, void* usr,
101  DtDDMRegionSP region = DtDDMRegionSP());
102 
103 protected:
104  virtual const char *
105  interactionClassToUse(DtExerciseConn *exConn) const override;
106 
107  virtual DtInteractionDecoder *
108  createDecoder(DtExerciseConn *exConn) const override;
109  virtual DtInteractionEncoder *
110  createEncoder(DtExerciseConn *exConn) const override;
111 
112 
113 protected:
114 
115  DtEntityIdentifier mySender;
116  DtForceType myForceIdentifier;
117  std::wstring mySenderUsername;
118  std::wstring myChannel;
119  std::wstring myMessageText;
120 
121 };
122 
123 
124 #endif
virtual const char * name() const override
Name of the interaction. (Not necessarily the ClassName from the FOM.)
Definition: chatInterHLA.h:86
DtEntityIdentifier mySender
Definition: chatInterHLA.h:115
Instances of DtChatInter are used to store state data for resourceRequest interactions.
Definition: chatInterDIS.h:39
void(* DtChatInterCb)(DtChatInter *inter, void *usr)
DtChatInter callback function signature.
Definition: chatInterHLA.h:29
voidpf stream
Definition: ioapi.h:39
DtForceType myForceIdentifier
Definition: chatInterHLA.h:116
#define DT_DLL_vrfExtObjects
Definition: dllExport.h:23

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)