JD2022-TU1/main/extern/gear4/gear_detection/detection_init.h

35 lines
1 KiB
C++

////////////////////////////////////////////////////////////////////////////////
//
// File : detection_init.h
// Copyright (c) Ubisoft Entertainment. All rights reserved.
//
////////////////////////////////////////////////////////////////////////////////
#pragma once
#ifndef G4_DETECTION_INIT__INCLUDED
#define G4_DETECTION_INIT__INCLUDED
#include <gear_core/gearconfig.h>
#include <gear_detection/detectionconfig.h>
namespace G4
{
/// Initialize Detection.
/// \sa ShutdownDetection
G4_DETECTION_DLL_ENTRY void InitializeDetection();
/// De-initialize Detection.
/// \note ShutdownDetection must be called the same number of times as \sa InitializeDetection
G4_DETECTION_DLL_ENTRY void ShutdownDetection();
/// Initializer object will automatically initialize and shutdown the service.
struct DetectionInitializer
{
DetectionInitializer() { InitializeDetection(); }
~DetectionInitializer() { ShutdownDetection(); }
};
} // namespace G4
#endif // G4_DETECTION_INIT__INCLUDED