VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
event.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 #pragma once
6 
8 #include <string>
9 
11 namespace makVrfEvents
12 {
14  {
15  public:
16  enum EventType
17  {
18  Unknown = 0,
19  DetonationEvent = 1,
20  FireEvent = 2,
21  DataInteractionEvent = 3,
22  RawSignalInteractionEvent = 4,
23  InfluenceInteractionEvent = 5,
24  SensorFieldOfViewControlEvent = 6,
25  CommentInteractionEvent = 7,
26  SimControlEvent = 8,
27  DIGuyActionEvent = 9,
28  RadioMessageReceivedEvent = 10,
29  ScenarioLoadedEvent = 11,
30  LoadScenarioEvent = 12,
31  CloseScenarioEvent = 13,
32  SetEvent = 14,
33  TransferRequestEvent = 15,
34  TransferResponseEvent = 16,
35  InitiateTakeEvent = 17,
36  OwnershipAcquisitionAcquiredEvent = 18,
37  OwnershipAcquisitionDivestedEvent = 19,
38  OwnershipAcquisitionRejectedEvent = 20,
39  CollisionEvent = 22,
40  ServiceRequestEvent = 23,
41  ResupplyOfferEvent = 24,
42  ResupplyReceivedEvent = 25,
43  ResupplyCancelEvent = 26,
44  VrfSignalInteractionEvent = 27,
45  ExternalCommsSignalInteractionEvent = 28,
46  IffInterrogatorEvent = 29,
47  IffInterrogatorResponseEvent = 30,
48  ResourceRequestEvent = 31,
49  ResourceResponseEvent = 32,
50  ChatMessageEvent = 33,
51  TaskEvent = 34,
52  GuiEvent = 35,
53  TransferAcknowledgeEvent = 36,
54  SoundEvent = 37,
55  UserEvent = 128
56  };
57 
58  public:
59  DtEvent() : myEventType(Unknown), mySelfReflect(false) {};
60  DtEvent(EventType t) : myEventType(t), mySelfReflect(false) {};
61  DtEvent(const DtEvent& orig) : myEventType(orig.myEventType), mySelfReflect(orig.mySelfReflect) {};
62  virtual~ DtEvent() {};
63 
64  EventType eventType() const { return myEventType; };
65 
66  virtual DtEvent* clone() const = 0;
67  virtual bool isNetworkEvent() const { return true; };
68 
71  virtual bool processLocally() const { return true; };
72 
74  void setSelfReflect(bool b) { mySelfReflect = b; };
75  bool selfReflect() const { return mySelfReflect; };
76 
77  DtEvent& operator=(const DtEvent&);
78 
82  static enum EventType UniqueEventTypeFor(const std::string&);
83 
84  protected:
87  };
88 }
EventType
Definition: event.h:16
bool selfReflect() const
Definition: event.h:75
DtEvent()
Definition: event.h:59
Definition: event.h:13
EventType myEventType
Definition: event.h:85
virtual bool processLocally() const
There are some events that, if sent over the network, don&#39;t want to be processed locally. Event these events (if not sent) do not want to be processed locally. Return false from this method to never process this event locally.
Definition: event.h:71
EventType eventType() const
Definition: event.h:64
void setSelfReflect(bool b)
If self-reflect is on, and the comm is not self reflecting, immediately process the event for self re...
Definition: event.h:74
#define DT_DLL_vrfMsgTransport
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfCommunicationManagerDefines.h:26
DtEvent(EventType t)
Definition: event.h:60
bool mySelfReflect
Definition: event.h:86
virtual bool isNetworkEvent() const
Definition: event.h:67
DtEvent(const DtEvent &orig)
Definition: event.h:61

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)