VR-Engage  2.2
Loading...
Searching...
No Matches
vreVrvUtil.h
Go to the documentation of this file.
1/*********************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*********************************************************************************/
5
6//! \file vreVrvUtil.h
7//! \ingroup vreUtil
8//! \brief Utility functions for working with VRV (Vantage Runtime Visual) components
9//!
10//! This file provides helper functions for finding and manipulating various VRV components
11//! such as windows, channels, and observers, as well as applying configurations to channels.
12//! These utilities simplify common operations in the VREngage application.
13
14#pragma once
15
16#include "export.h"
17
18#include <string>
19
20namespace makVrv
21{
22class DtWindow;
23class DtDe;
24class DtChannel;
25class DtOsgChannel;
26class DtObserver;
27class DtChannelConfiguration;
28} // namespace makVrv
29
30namespace makVre
31{
32//! \brief Finds a window by name in the display engine
33//! \param de Reference to the display engine to search in
34//! \param windowName Name of the window to find (defaults to "Window 1")
35//! \return Pointer to the found window, or nullptr if not found
36//!
37//! This function searches for a window with the specified name in the display engine.
38UTIL_DLL makVrv::DtWindow* findWindow(makVrv::DtDe& de, const std::string& windowName = "Window 1");
39
40//! \brief Finds a channel by name in a specific window
41//! \param de Reference to the display engine to search in
42//! \param channelName Name of the channel to find (defaults to "Channel 1")
43//! \param windowName Name of the window containing the channel (defaults to "Window 1")
44//! \return Pointer to the found channel, or nullptr if not found
45//!
46//! This function searches for a channel with the specified name in the specified window.
47UTIL_DLL makVrv::DtChannel* findChannel(
48 makVrv::DtDe& de, const std::string& channelName = "Channel 1", const std::string& windowName = "Window 1");
49
50//! \brief Finds an OSG channel by name in a specific window
51//! \param de Reference to the display engine to search in
52//! \param channelName Name of the channel to find (defaults to "Channel 1")
53//! \param windowName Name of the window containing the channel (defaults to "Window 1")
54//! \return Pointer to the found OSG channel, or nullptr if not found
55//!
56//! This function searches for an OSG channel with the specified name in the specified window.
57//! It is similar to findChannel but specifically returns a DtOsgChannel pointer.
58UTIL_DLL makVrv::DtOsgChannel* findOsgChannel(
59 makVrv::DtDe& de, const std::string& channelName = "Channel 1", const std::string& windowName = "Window 1");
60
61//! \brief Finds an observer by name in the display engine
62//! \param de Reference to the display engine to search in
63//! \param observerName Name of the observer to find (defaults to "Observer 1")
64//! \return Pointer to the found observer, or nullptr if not found
65//!
66//! This function searches for an observer with the specified name in the display engine.
67UTIL_DLL makVrv::DtObserver* findObserver(makVrv::DtDe& de, const std::string& observerName = "Observer 1");
68
69//! \brief Applies a channel configuration to a channel specified by name
70//! \param de Reference to the display engine containing the channel
71//! \param channelName Name of the channel to configure
72//! \param windowName Name of the window containing the channel
73//! \param config The channel configuration to apply
74//! \return True if the configuration was successfully applied, false otherwise
75//!
76//! This function finds a channel by name and applies the specified configuration to it.
77UTIL_DLL bool applyChannelConfig(makVrv::DtDe& de, const std::string& channelName, const std::string& windowName,
78 const makVrv::DtChannelConfiguration& config);
79
80//! \brief Applies a channel configuration to a specific channel
81//! \param de Reference to the display engine
82//! \param channel Reference to the channel to configure
83//! \param config The channel configuration to apply
84//! \return True if the configuration was successfully applied, false otherwise
85//!
86//! This function applies the specified configuration to the provided channel.
87//! This overload is more efficient when you already have a reference to the channel.
89 makVrv::DtDe& de, const makVrv::DtChannel& channel, const makVrv::DtChannelConfiguration& config);
90
91} // namespace makVre
Defines export macros for the VREngage Utility library.
#define UTIL_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
UTIL_DLL makVrv::DtChannel * findChannel(makVrv::DtDe &de, const std::string &channelName="Channel 1", const std::string &windowName="Window 1")
Finds a channel by name in a specific window.
UTIL_DLL makVrv::DtWindow * findWindow(makVrv::DtDe &de, const std::string &windowName="Window 1")
Finds a window by name in the display engine.
UTIL_DLL bool applyChannelConfig(makVrv::DtDe &de, const std::string &channelName, const std::string &windowName, const makVrv::DtChannelConfiguration &config)
Applies a channel configuration to a channel specified by name.
UTIL_DLL makVrv::DtOsgChannel * findOsgChannel(makVrv::DtDe &de, const std::string &channelName="Channel 1", const std::string &windowName="Window 1")
Finds an OSG channel by name in a specific window.
UTIL_DLL makVrv::DtObserver * findObserver(makVrv::DtDe &de, const std::string &observerName="Observer 1")
Finds an observer by name in the display engine.
Definition appLauncherComponent.h:28
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.