VR-Engage  2.2
Loading...
Searching...
No Matches
scenarioEventManager.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6//! \file scenarioEventManager.h
7//! \brief Defines the scenario event management system for VR-Engage
8//!
9//! This file contains the DtScenarioEventManager class which manages
10//! scenario events within VR-Engage. It maintains a list of events
11//! that can be accessed by the action menu and other components.
12
13#pragma once
14
16
17
18#include <string>
19#include <list>
21
22namespace makVre
23{
24//! \brief Manager class for scenario events in VR-Engage
25//!
26//! DtScenarioEventManager maintains a registry of scenario events available
27//! in the current simulation. These events can be triggered by the user through
28//! the action menu or programmatically through other components. The manager
29//! responds to discovery and removal messages to keep its list up to date.
31{
32public:
33 //! \brief Structure representing a scenario event
34 //!
35 //! ScenarioEvent encapsulates the information about a single scenario event,
36 //! including its user-friendly name and unique identifier.
38 {
39 //! \brief Constructor
40 //! \param newName Display name of the event
41 //! \param newUuid Unique identifier for the event
42 //!
43 //! Creates a new scenario event entry with the specified name and UUID.
44 ScenarioEvent(const std::string& newName, const std::string& newUuid)
45 : name(newName)
46 , uuid(newUuid)
47 {
48 }
49
50 //! \brief Display name of the event
51 std::string name;
52
53 //! \brief Unique identifier for the event
54 std::string uuid;
55 };
56
57 //! \brief Constructor
58 //!
59 //! Creates a new scenario event manager with an empty event list.
61
62 //! \brief Virtual destructor
63 //!
64 //! Ensures proper cleanup of the scenario event manager.
66
67 //! \brief Gets the list of available scenario events
68 //! \return Reference to the list of scenario events
69 //!
70 //! Provides access to the current list of available scenario events.
71 //! This is typically used by the action menu to populate event-related options.
72 virtual std::list<ScenarioEvent>& scenarioEvents() { return myEvents; }
73
74protected:
75 //! \brief Handles event discovery messages
76 //! \param msg Pointer to the discovery message
77 //! \return Message handling result
78 //!
79 //! Processes messages about newly discovered scenario events,
80 //! adding them to the event registry if they aren't already present.
82
83 //! \brief Handles event removal messages
84 //! \param msg Pointer to the removal message
85 //! \return Message handling result
86 //!
87 //! Processes messages about removed scenario events,
88 //! removing them from the event registry if they exist.
90
91 //! \brief List of currently available scenario events
92 //!
93 //! Contains all scenario events that have been discovered and not yet removed.
94 std::list<ScenarioEvent> myEvents;
95};
96} // namespace makVre
virtual makVre::DtVreMessageResult handleDiscoverEvent(makVre::DtVreMessage *msg)
Handles event discovery messages.
std::list< ScenarioEvent > myEvents
List of currently available scenario events.
Definition scenarioEventManager.h:94
virtual makVre::DtVreMessageResult handleRemoveEvent(makVre::DtVreMessage *msg)
Handles event removal messages.
virtual ~DtScenarioEventManager()
Virtual destructor.
DtScenarioEventManager()
Constructor.
virtual std::list< ScenarioEvent > & scenarioEvents()
Gets the list of available scenario events.
Definition scenarioEventManager.h:72
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
std::string name
Display name of the event.
Definition scenarioEventManager.h:51
std::string uuid
Unique identifier for the event.
Definition scenarioEventManager.h:54
ScenarioEvent(const std::string &newName, const std::string &newUuid)
Constructor.
Definition scenarioEventManager.h:44
Defines the base class for all VREngage messages.