VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtEventView.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef DtEventView_H_
11 #define DtEventView_H_
12 
13 #include <vrvCore/vrvCore.h>
14 #include <vrvCore/DtDe.h>
16 #include <vrvCore/DtDataBank.h>
17 
18 #include <boost/bind.hpp>
19 
20 namespace makVrv
21 {
22  class DtSimEntry;
23 
27  {
28 
29  public:
30 
32  virtual ~DtBaseEventView();
33 
34  protected :
35 
38 
39  };
40 
41 
42  template <class EventType>
44  {
45  public:
46 
50 
53  static void release(DtSimData&);
54 
57 
58  virtual ~DtEventSignaler();
59 
61  boost::signalslib::signal<void (const EventType&)> signal_eventTriggered;
62 
63  protected:
64 
67  void onEventTriggered(const DtSimEventEntry& entry);
68 
71 
74 
75  protected:
76 
78  unsigned int myReferenceCount;
79  };
80 
83  template<class EventType>
85  {
86 
87  public:
88 
90  DtEventView(DtDe& de);
91 
93  virtual ~DtEventView();
94 
96  boost::signalslib::signal<void (const EventType&)> signal_eventTriggered;
97 
98  protected:
99 
102  void onEventTriggered(const EventType& entry);
103 
106 
109 
111  };
112 
113 }
114 
115 #define DtEventView_INL_
116 #include <vrvCore/DtEventView.inl>
117 #undef DtEventView_INL_
118 
119 #endif
120 
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
DtEventSignaler(DtSimData &)
CTOR.
The DtSimData is the repository for simulation specific, read only data. The DtSimData has a map of D...
Definition: DtSimData.h:32
A DtSimEventEntry is an entry for a event like an interaction.
Definition: DtSimEventEntry.h:22
static DtEventSignaler & instance(DtSimData &)
Get the Event view for a particular class from the Sim data object. Internally the instance reference...
void connectToEventTriggeredSignal()
Connects to DtSimData::signal_simEventTriggered.
Contains makVrv::DtDe class.
virtual ~DtEventView()
DTOR.
void disconnectFromEventTriggeredSignal()
Disconnects from DtSimData::signal_simEventTriggered.
void disconnectFromEventTriggeredSignal()
Disconnects from DtSimData::signal_simEventTriggered.
Contains makVrv::DtSimEventEntry class.
unsigned int myReferenceCount
Definition: DtEventView.h:78
boost::signalslib::signal< void(const EventType &)> signal_eventTriggered
Emit the event&#39;s state.
Definition: DtEventView.h:61
void connectToEventTriggeredSignal()
Connects to DtSimData::signal_simEventTriggered.
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Definition: DtEventView.h:43
A DtBaseEventView is a the base class for all DtEventView&#39;s.
Definition: DtEventView.h:26
DtDe & myDe
Definition: DtEventView.h:110
static void release(DtSimData &)
Called whenever the signaler is no longer needed, Internally the instance reference is decreased...
DtSimData & mySimData
Definition: DtEventView.h:77
DtEventView(DtDe &de)
CTOR.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
void onEventTriggered(const DtSimEventEntry &entry)
This will get called by the DtSimEntry when the state for this event received. This emits a signal co...
A DtEventView is a the interface to event state information. Users can create DtEventView&#39;s to receiv...
Definition: DtEventView.h:84
Contains makVrv::DtDataBank class.
boost::signalslib::signal< void(const EventType &)> signal_eventTriggered
Emit the event&#39;s state.
Definition: DtEventView.h:96
void onEventTriggered(const EventType &entry)
This will get called by the DtSimEntry when the state for this event received. This emits a signal co...
Contains DLL export macros.

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)