diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDeclarations.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDeclarations.cpp deleted file mode 100644 index b3383a1044..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDeclarations.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "NativeHostDeclarations.h" - -namespace ScriptCanvas -{ - RuntimeContext::RuntimeContext(AZ::EntityId graphId) - : m_graphId(graphId) - {} -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDeclarations.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDeclarations.h deleted file mode 100644 index ea6c884a6f..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDeclarations.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - class RuntimeContext - { - public: - RuntimeContext(AZ::EntityId graphId); - - AZ_INLINE AZ::EntityId GetGraphId() const { return m_graphId; } - - protected: - AZ::EntityId m_graphId; - }; -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp deleted file mode 100644 index 036310fca4..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "NativeHostDefinitions.h" -#include - -namespace NativeHostDefinitionsCPP -{ - using namespace ScriptCanvas; - - using FunctionMap = AZStd::unordered_map; - FunctionMap s_functionMap; -} - -namespace ScriptCanvas -{ - bool CallNativeGraphStart(AZStd::string_view name, const RuntimeContext& context) - { - using namespace NativeHostDefinitionsCPP; - - auto iter = s_functionMap.find(name); - if (iter != s_functionMap.end()) - { - iter->second(context); - return true; - } - - return false; - } - - bool RegisterNativeGraphStart(AZStd::string_view name, GraphStartFunction function) - { - using namespace NativeHostDefinitionsCPP; - - auto iter = s_functionMap.find(name); - if (iter == s_functionMap.end()) - { - s_functionMap.insert({ name, function }); - return true; - } - - return false; - } - - // this may never have to be necessary - bool UnregisterNativeGraphStart(AZStd::string_view name) - { - using namespace NativeHostDefinitionsCPP; - - auto iter = s_functionMap.find(name); - if (iter != s_functionMap.end()) - { - s_functionMap.erase(iter); - return true; - } - - return false; - } - -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDefinitions.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDefinitions.h deleted file mode 100644 index 457e8d4621..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/NativeHostDefinitions.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "NativeHostDeclarations.h" - -namespace ScriptCanvas -{ - typedef void (*GraphStartFunction)(const RuntimeContext&); - - using GraphStartFunction = void(*)(const RuntimeContext&); - - bool CallNativeGraphStart(AZStd::string_view name, const RuntimeContext& context); - - bool RegisterNativeGraphStart(AZStd::string_view name, GraphStartFunction function); - - // this may never have to be necessary - bool UnregisterNativeGraphStart(AZStd::string_view name); - -} diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake index c0dcc04838..65aaeb1b33 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake @@ -68,8 +68,6 @@ set(FILES Include/ScriptCanvas/Execution/ExecutionObjectCloning.cpp Include/ScriptCanvas/Execution/ExecutionPerformanceTimer.cpp Include/ScriptCanvas/Execution/ExecutionState.cpp - Include/ScriptCanvas/Execution/NativeHostDeclarations.cpp - Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp Include/ScriptCanvas/Execution/RuntimeComponent.cpp Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedCloningAPI.cpp @@ -90,8 +88,6 @@ set(FILES Include/ScriptCanvas/Grammar/PrimitivesDeclarations.cpp Include/ScriptCanvas/Grammar/PrimitivesExecution.cpp Include/ScriptCanvas/Execution/ExecutionContext.cpp - Include/ScriptCanvas/Execution/NativeHostDeclarations.cpp - Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp Include/ScriptCanvas/Execution/RuntimeComponent.cpp Include/ScriptCanvas/Internal/Nodeables/BaseTimer.cpp Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.cpp diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake index 530d98e112..c5e0d75b39 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake @@ -100,8 +100,6 @@ set(FILES Include/ScriptCanvas/Execution/ExecutionPerformanceTimer.h Include/ScriptCanvas/Execution/ExecutionState.h Include/ScriptCanvas/Execution/ExecutionStateDeclarations.h - Include/ScriptCanvas/Execution/NativeHostDeclarations.h - Include/ScriptCanvas/Execution/NativeHostDefinitions.h Include/ScriptCanvas/Execution/RuntimeComponent.h Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.h Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedCloningAPI.h @@ -126,8 +124,6 @@ set(FILES Include/ScriptCanvas/Execution/ErrorBus.h Include/ScriptCanvas/Execution/ExecutionContext.h Include/ScriptCanvas/Execution/ExecutionBus.h - Include/ScriptCanvas/Execution/NativeHostDeclarations.h - Include/ScriptCanvas/Execution/NativeHostDefinitions.h Include/ScriptCanvas/Execution/RuntimeComponent.h Include/ScriptCanvas/Internal/Nodeables/BaseTimer.h Include/ScriptCanvas/Internal/Nodeables/BaseTimer.ScriptCanvasNodeable.xml