-
首页
-
C4D R23.110 C++ SDK
VirtualMachineScopeInterface Class Reference
#include <vm.h>
成员函数文档编制
◆
MAXON_INTERFACE()
◆
Init()
Initialized the virtual machine scope. Needs to be executed before any other function of the interface is used.
-
参数
-
[in]
|
identifier
|
Human readable unique identifier. Depending on the engine, some exception handlers might print this into their exception to make it easier to understand where the exception comes from.
|
[in]
|
code
|
Code to be executed.
|
[in]
|
errorHandling
|
Adjust how the virtual machine should treat an exception.
|
[in]
|
debug
|
Optional virtual machine debugger connection, to debug the code.
|
◆
Add()
Add an object to the scope. The
数据
object will be converted through the underlying library implementation. So the
数据
object must be representable in the target virtual machine.
-
参数
-
[in]
|
name
|
Variable name of the object in the scope.
|
[in]
|
data
|
Object that will be added to the scope.
|
-
返回
-
Return state, depending on VirtualMachineScopeInterface::Init(errorHandling).
◆
Get()
Returns an object from the scope.
-
参数
-
[in]
|
name
|
Variable name of the object in the scope.
|
-
返回
-
Requested object or error.
◆
Execute()
Execute the virtual machine scope. Before, and after executing the code, the optionally given debugger code from the VmDebuggerConnection will be executed.
-
返回
-
Return state, depending on VirtualMachineScopeInterface::Init(errorHandling).
◆
PrivateInvoke()
Executes a callable object from the scope. Must only be called after
VirtualMachineScopeInterface.Execute
.
-
参数
-
[in]
|
name
|
Name of the callable object, e.g a function name
|
[in]
|
helperStack
|
A temporary helper stack for the return value.
|
[in]
|
expected
|
(Optional) Datatype of the returned object, otherwise the type of the object will be chosen automatically.
|
[in]
|
arguments
|
(Optional) Arguments which will be passed to the callable object.
|
◆
ErrorHandling()
Normally to reset the error state of the internal virtual machine. E.g. In Python PyErr_Print is executed. Normally used after
VirtualMachineScopeInterface.Execute
or
VirtualMachineScopeInterface.PrivateInvoke
failed, but only if scope is initialized with
ERRORHANDLING.REDIRECT
.
-
返回
-
OK if the error was handled, otherwise an exception is returned.
◆
_PrivateInit()
Private.