VR-Forces 5.0.3 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  OwnershipAcquisitionRejectedEvent = 19,
38  TransferAcquisitionRequestEvent = 20,
39  TransferAcquisitionResponseEvent = 21,
40  CollisionEvent = 22,
41  ServiceRequestEvent = 23,
42  ResupplyOfferEvent = 24,
43  ResupplyReceivedEvent = 25,
44  ResupplyCancelEvent = 26,
45  VrfSignalInteractionEvent = 27,
46  ExternalCommsSignalInteractionEvent = 28,
47  UserEvent = 128
48  };
49 
50  public:
51  DtEvent() : myEventType(Unknown), mySelfReflect(false) {};
52  DtEvent(EventType t) : myEventType(t), mySelfReflect(false) {};
53  DtEvent(const DtEvent& orig) : myEventType(orig.myEventType), mySelfReflect(orig.mySelfReflect) {};
54  virtual~ DtEvent() {};
55 
56  EventType eventType() const { return myEventType; };
57 
58  virtual DtEvent* clone() const = 0;
59  virtual bool isNetworkEvent() const { return true; };
60 
63  virtual bool processLocally() const { return true; };
64 
66  void setSelfReflect(bool b) { mySelfReflect = b; };
67  bool selfReflect() const { return mySelfReflect; };
68 
69  DtEvent& operator=(const DtEvent&);
70 
74  static enum EventType UniqueEventTypeFor(const std::string&);
75 
76  protected:
79  };
80 }
EventType
Definition: event.h:16
bool selfReflect() const
Definition: event.h:67
DtEvent()
Definition: event.h:51
Definition: event.h:13
EventType myEventType
Definition: event.h:77
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:63
EventType eventType() const
Definition: event.h:56
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:66
#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:52
bool mySelfReflect
Definition: event.h:78
virtual bool isNetworkEvent() const
Definition: event.h:59
DtEvent(const DtEvent &orig)
Definition: event.h:53

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)