Removes NativeHostDeclarations and NativeHostDefinitions from Gems/ScriptCanvas

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2022-01-06 11:45:03 -08:00
parent b56512fd18
commit 5cca353709
6 changed files with 0 additions and 138 deletions
@@ -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)
{}
}
@@ -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 <AzCore/Component/EntityId.h>
namespace ScriptCanvas
{
class RuntimeContext
{
public:
RuntimeContext(AZ::EntityId graphId);
AZ_INLINE AZ::EntityId GetGraphId() const { return m_graphId; }
protected:
AZ::EntityId m_graphId;
};
}
@@ -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 <AzCore/std/containers/unordered_map.h>
namespace NativeHostDefinitionsCPP
{
using namespace ScriptCanvas;
using FunctionMap = AZStd::unordered_map<AZStd::string, GraphStartFunction>;
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;
}
}
@@ -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);
}
@@ -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
@@ -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