VR-Engage  2.2
Loading...
Searching...
No Matches
inputDeviceFactory.h
Go to the documentation of this file.
1/*********************************************************************************
2** Copyright (c) 2025 MAK Technologies, Inc.
3** All rights reserved.
4*********************************************************************************/
5
6//! \file
7//! \brief Factory for creating input device instances
8
9#pragma once
10
11#include "vreInput/export.h"
13
14#include "vreUtil/factory.h"
15
16namespace makVre
17{
18//! \brief Factory for creating input device instances
19//!
20//! This factory allows for the dynamic creation of input device objects
21//! based on their registered type names. It handles the registration of
22//! device creators and provides access to the list of available device types.
23class VREINPUT_DLL DtInputDeviceFactory : public DtFactory<DtInputDevice>
24{
25public:
26 //! \brief Constructor
27 //!
28 //! Initializes the factory and registers default device creators
30
31 //! \brief Virtual destructor
32 virtual ~DtInputDeviceFactory() override;
33
34 //! \brief Gets a list of all registered input device type names
35 //!
36 //! Returns the names of all input device types that can be created by this factory.
37 //! These names can be used with the create() method to instantiate specific device types.
38 //!
39 //! \return Vector of strings containing registered device type names
40 virtual std::vector<std::string> registeredCreators();
41
42protected:
43 //! \brief Registers the standard set of input device creators
44 //!
45 //! Called during construction to register all the default device types
46 //! that should be available without additional plugins.
47 virtual void installDefaultDevices();
48};
49
50} // namespace makVre
DtFactory()
Definition factory.h:85
virtual ~DtInputDeviceFactory() override
Virtual destructor.
DtInputDeviceFactory()
Constructor.
virtual void installDefaultDevices()
Registers the standard set of input device creators.
virtual std::vector< std::string > registeredCreators()
Gets a list of all registered input device type names.
Provides a template-based factory system for object creation.
Defines DLL export/import macros for the vreInput library.
#define VREINPUT_DLL
DLL export/import macro for the vreInput library.
Definition export.h:25
Abstract base class for input device implementations.
Include export definitions for this library.
Definition glsVreMessageUtil.h:49