Files
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

58 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GenericPlatform/GenericApplicationMessageHandler.h"
#include "Features/IModularFeatures.h"
#include "Features/IModularFeature.h"
#include "Modules/ModuleInterface.h"
#include "Modules/ModuleManager.h"
#include "IInputDevice.h"
/**
* The public interface of the InputDeviceModule
*/
class IInputDeviceModule : public IModuleInterface, public IModularFeature
{
public:
static FName GetModularFeatureName()
{
static FName FeatureName = FName(TEXT("InputDevice"));
return FeatureName;
}
virtual void StartupModule() override
{
IModularFeatures::Get().RegisterModularFeature( GetModularFeatureName(), this );
}
/**
* Singleton-like access to IInputDeviceModule
*
* @return Returns IInputDeviceModule singleton instance, loading the module on demand if needed
*/
static inline IInputDeviceModule& Get()
{
return FModuleManager::LoadModuleChecked< IInputDeviceModule >( "InputDevice" );
}
/**
* Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.
*
* @return True if the module is loaded and ready to use
*/
static inline bool IsAvailable()
{
return FModuleManager::Get().IsModuleLoaded( "InputDevice" );
}
/**
* Attempts to create a new head tracking device interface
*
* @return Interface to the new head tracking device, if we were able to successfully create one
*/
virtual TSharedPtr< class IInputDevice > CreateInputDevice(const TSharedRef< FGenericApplicationMessageHandler >& InMessageHandler) = 0;
};