Open 3D Engine ScriptCanvas Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
ScriptCanvas::Execution Namespace Reference

Classes

struct  PerformanceTimingReport
 
struct  PerformanceTrackingReport
 
struct  PerformanceReport
 
class  PerformanceScope
 
class  PerformanceScopeExecution
 
class  PerformanceScopeInitialization
 
class  PerformanceScopeLatent
 
struct  ActivationData
 
struct  ActivationInputRange
 
class  Context
 
class  TypeErasedReference
 
class  CloneSource
 
class  PerformanceTimer
 
struct  StateStorage
 This struct allows forward declare usage, rather than including this file, which must pull all derived ExecutionStates into it. More...
 
struct  OutInterpreted
 
struct  OutInterpretedResult
 
struct  PerformanceStatistics
 
class  PerformanceStatistician
 
class  PerformanceStatisticsBus
 
class  PerformanceTracker
 

Typedefs

using FunctorOut = AZStd::function< void(AZ::BehaviorArgument *result, AZ::BehaviorArgument *arguments, int numArguments)>
 
using ReturnTypeIsVoid = AZStd::true_type
 
using ReturnTypeIsNotVoid = AZStd::false_type
 
using HeapAllocatorType = AZStd::allocator
 
using StackAllocatorType = AZStd::static_buffer_allocator< MaxNodeableOutStackSize, 32 >
 
using PerformanceKey = const ExecutionState *
 
using PerformanceReportByAsset = AZStd::unordered_map< AZ::Data::AssetId, PerformanceTrackingReport >
 
using ActivationInputArray = AZStd::array< AZ::BehaviorArgument, 128 >
 
using StorageArray = AZStd::array< AZ::u8, s_StorageSize >
 
using PerformanceStatisticsEBus = AZ::EBus< PerformanceStatisticsBus >
 

Functions

void FinalizePerformanceReport (PerformanceKey key)
 
ExecutionStateCreatePerActivation (StateStorage &storage, ExecutionStateConfig &config)
 
ExecutionStateCreatePerActivationOnGraphStart (StateStorage &storage, ExecutionStateConfig &config)
 
ExecutionStateCreatePure (StateStorage &storage, ExecutionStateConfig &config)
 
ExecutionStateCreatePureOnGraphStart (StateStorage &storage, ExecutionStateConfig &config)
 
void Destruct (StateStorage &storage)
 
const ExecutionStateGet (const StateStorage &storage)
 
ExecutionStateMod (StateStorage &storage)
 
void ActivateInterpreted ()
 
AZ::BehaviorArgument BehaviorValueParameterFromTypeIdString (const char *string, AZ::BehaviorContext &behaviorContext)
 
AZ::Uuid CreateIdFromStringFast (const char *string)
 
AZStd::string CreateStringFastFromId (const AZ::Uuid &uuid)
 
int InterpretedSafeCall (lua_State *lua, int argCount, int returnValueCount)
 
void InitializeInterpretedStatics (RuntimeData &runtimeData)
 
int InitializeNodeableOutKeys (lua_State *lua)
 
void PushActivationArgs (lua_State *lua, AZ::BehaviorArgument *arguments, size_t numArguments)
 
void RegisterAPI (lua_State *lua)
 
void RegisterUserObjectAPI (lua_State *lua)
 
int ReportError (lua_State *lua, AZStd::string_view message)
 
int SetExecutionOut (lua_State *lua)
 
int SetExecutionOutResult (lua_State *lua)
 
void SetInterpretedExecutionMode (BuildConfiguration configuration)
 
void SetInterpretedExecutionModeDebug ()
 
void SetInterpretedExecutionModePerformance ()
 
void SetInterpretedExecutionModeRelease ()
 
void StackPush (lua_State *lua, AZ::BehaviorContext *context, AZ::BehaviorArgument &param)
 
bool StackRead (lua_State *lua, AZ::BehaviorContext *context, int index, AZ::BehaviorArgument &param, AZ::StackVariableAllocator *allocator)
 
int UnpackDependencyConstructionArgs (lua_State *lua)
 
int UnpackDependencyConstructionArgsLeaf (lua_State *lua)
 
void RegisterCloningAPI (lua_State *lua)
 
void RegisterComponentAPI (lua_State *lua)
 
int DebugIsTraced (lua_State *lua)
 
int DebugRuntimeError (lua_State *lua)
 
int DebugSignalIn (lua_State *lua)
 
int DebugSignalInSubgraph (lua_State *lua)
 
int DebugSignalOut (lua_State *lua)
 
int DebugSignalOutSubgraph (lua_State *lua)
 
int DebugSignalReturn (lua_State *)
 
int DebugSignalReturnSubgraph (lua_State *)
 
int DebugVariableChange (lua_State *lua)
 
int DebugVariableChangeSubgraph (lua_State *lua)
 
void RegisterDebugAPI (lua_State *lua)
 
int EBusHandlerConnect (lua_State *lua)
 
int EBusHandlerConnectTo (lua_State *lua)
 
int EBusHandlerCreate (lua_State *lua)
 
int EBusHandlerCreateAndConnect (lua_State *lua)
 
int EBusHandlerCreateAndConnectTo (lua_State *lua)
 
int EBusHandlerDisconnect (lua_State *lua)
 
int EBusHandlerHandleEvent (lua_State *lua)
 
int EBusHandlerHandleEventResult (lua_State *lua)
 
int EBusHandlerIsConnected (lua_State *lua)
 
int EBusHandlerIsConnectedTo (lua_State *lua)
 
void RegisterEBusHandlerAPI (lua_State *lua)
 
void ExecutionStatePush (lua_State *lua, ExecutionStateWeakPtr executionState)
 
ExecutionStateWeakPtr ExecutionStateRead (lua_State *lua, int index)
 
void InitializeFromLuaStackFunctions (Grammar::DebugSymbolMap &debugMap)
 
bool IsLuaValueType (Data::eType etype)
 
AZStd::string ToConsoleString (const PerformanceStatistics &stats)
 

Variables

static constexpr size_t MaxNodeableOutStackSize = 512
 
static constexpr const size_t s_StorageSize
 
constexpr const char * k_LuaClassInheritanceChunk
 

Detailed Description

Defines operations for storage of the dynamic and polymorphic ExecutionState sub classes in a static size buffer. This eliminates heap allocation costs associated with creating the proper ExecutionState against an asset whose type cannot be known at runtime. Use with class ExecutionStateHandler to benefit from RAII semantics or you must perform your own safety checks to call Destruct() before this storage is deleted if any of the Create calls were used on it.

Function Documentation

◆ ExecutionStatePush()

void ScriptCanvas::Execution::ExecutionStatePush ( lua_State *  lua,
ExecutionStateWeakPtr  executionState 
)

Use this function instead of directly pushing the ExectionState onto the stack, to protect calling code from changes to the use of the Lua runtime.

◆ ExecutionStateRead()

ExecutionStateWeakPtr ScriptCanvas::Execution::ExecutionStateRead ( lua_State *  lua,
int  index 
)

Use this function instead of directly reading the ExectionState from the stack, to protect calling code from changes to the use of the Lua runtime.

Variable Documentation

◆ s_StorageSize

constexpr const size_t ScriptCanvas::Execution::s_StorageSize
staticconstexpr
Initial value:
= AZ_SIZE_ALIGN_UP(AZStd::max(sizeof(ExecutionStateInterpretedPerActivation)
, AZStd::max(sizeof(ExecutionStateInterpretedPerActivationOnGraphStart)
, AZStd::max(sizeof(ExecutionStateInterpretedPure)
, sizeof(ExecutionStateInterpretedPureOnGraphStart)))), 32)