VR-Forces 5.0.1 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  SignalInteractionEvent = 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  UserEvent = 128
46  };
47 
48  public:
49  DtEvent() : myEventType(Unknown), mySelfReflect(false) {};
50  DtEvent(EventType t) : myEventType(t), mySelfReflect(false) {};
51  DtEvent(const DtEvent& orig) : myEventType(orig.myEventType), mySelfReflect(orig.mySelfReflect) {};
52  virtual~ DtEvent() {};
53 
54  EventType eventType() const { return myEventType; };
55 
56  virtual DtEvent* clone() const = 0;
57  virtual bool isNetworkEvent() const { return true; };
58 
61  virtual bool processLocally() const { return true; };
62 
64  void setSelfReflect(bool b) { mySelfReflect = b; };
65  bool selfReflect() const { return mySelfReflect; };
66 
67  DtEvent& operator=(const DtEvent&);
68 
72  static enum EventType UniqueEventTypeFor(const std::string&);
73 
74  protected:
77  };
78 }
EventType
Definition: event.h:16
bool selfReflect() const
Definition: event.h:65
DtEvent()
Definition: event.h:49
Definition: event.h:13
EventType myEventType
Definition: event.h:75
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:61
EventType eventType() const
Definition: event.h:54
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:64
#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:50
bool mySelfReflect
Definition: event.h:76
virtual bool isNetworkEvent() const
Definition: event.h:57
DtEvent(const DtEvent &orig)
Definition: event.h:51

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)