/* * Tencent is pleased to support the open source community by making Puerts available. * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. * Puerts is licensed under the BSD 3-Clause License, except for the third-party components listed in the file 'LICENSE' which may * be subject to their corresponding license terms. This file is subject to the terms and conditions defined in file 'LICENSE', * which is part of this source code package. */ #pragma once #include "CoreMinimal.h" #include "Modules/ModuleInterface.h" #include "Modules/ModuleManager.h" #if !defined(ENGINE_INDEPENDENT_JSENV) #include "EngineMinimal.h" #endif /** * The public interface to this module */ class IJsEnvModule : public IModuleInterface { public: /** * Singleton-like access to this module's interface. This is just for convenience! * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. * * @return Returns singleton instance, loading the module on demand if needed */ static inline IJsEnvModule& Get() { return FModuleManager::LoadModuleChecked("JsEnv"); } /** * 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("JsEnv"); } virtual void* GetV8Platform() = 0; };