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  UserEvent = 128
54  };
55 
56  public:
57  DtEvent() : myEventType(Unknown), mySelfReflect(false) {};
58  DtEvent(EventType t) : myEventType(t), mySelfReflect(false) {};
59  DtEvent(const DtEvent& orig) : myEventType(orig.myEventType), mySelfReflect(orig.mySelfReflect) {};
60  virtual~ DtEvent() {};
61 
62  EventType eventType() const { return myEventType; };
63 
64  virtual DtEvent* clone() const = 0;
65  virtual bool isNetworkEvent() const { return true; };
66 
69  virtual bool processLocally() const { return true; };
70 
72  void setSelfReflect(bool b) { mySelfReflect = b; };
73  bool selfReflect() const { return mySelfReflect; };
74 
75  DtEvent& operator=(const DtEvent&);
76 
80  static enum EventType UniqueEventTypeFor(const std::string&);
81 
82  protected:
85  };
86 }
EventType
Definition: event.h:16
bool selfReflect() const
Definition: event.h:73
DtEvent()
Definition: event.h:57
Definition: event.h:13
EventType myEventType
Definition: event.h:83
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:69
EventType eventType() const
Definition: event.h:62
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:72
#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:58
bool mySelfReflect
Definition: event.h:84
virtual bool isNetworkEvent() const
Definition: event.h:65
DtEvent(const DtEvent &orig)
Definition: event.h:59

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)