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  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  IffInterrogatorEvent = 29,
48  IffInterrogatorResponseEvent = 30,
49  UserEvent = 128
50  };
51 
52  public:
53  DtEvent() : myEventType(Unknown), mySelfReflect(false) {};
54  DtEvent(EventType t) : myEventType(t), mySelfReflect(false) {};
55  DtEvent(const DtEvent& orig) : myEventType(orig.myEventType), mySelfReflect(orig.mySelfReflect) {};
56  virtual~ DtEvent() {};
57 
58  EventType eventType() const { return myEventType; };
59 
60  virtual DtEvent* clone() const = 0;
61  virtual bool isNetworkEvent() const { return true; };
62 
65  virtual bool processLocally() const { return true; };
66 
68  void setSelfReflect(bool b) { mySelfReflect = b; };
69  bool selfReflect() const { return mySelfReflect; };
70 
71  DtEvent& operator=(const DtEvent&);
72 
76  static enum EventType UniqueEventTypeFor(const std::string&);
77 
78  protected:
81  };
82 }
EventType
Definition: event.h:16
bool selfReflect() const
Definition: event.h:69
DtEvent()
Definition: event.h:53
Definition: event.h:13
EventType myEventType
Definition: event.h:79
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:65
EventType eventType() const
Definition: event.h:58
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:68
#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:54
bool mySelfReflect
Definition: event.h:80
virtual bool isNetworkEvent() const
Definition: event.h:61
DtEvent(const DtEvent &orig)
Definition: event.h:55

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)