#include <vm.h>
Public Member Functions | |
MAXON_METHOD Result< void > | Init (const LoadRuntime &runtimeInfo, const DataDictionary &settings=DataDictionary::NullValue()) |
MAXON_METHOD void | Free () |
MAXON_METHOD Result< VirtualMachineScopeRef > | CreateScope () |
MAXON_METHOD String | GetName () |
MAXON_METHOD String | GetVersion () |
MAXON_METHOD String | GetCopyright () |
MAXON_METHOD String | GetCompiler () |
MAXON_METHOD String | GetBuildInfo () |
MAXON_METHOD Result< void > | EnterInteractiveMode () |
MAXON_METHOD Result< void > | Execute (const String &code) |
MAXON_METHOD Result< void > | Execute (const Url &filepath) |
MAXON_METHOD Result< void > | ExecuteModule (const String &name) |
MAXON_METHOD Result< void > | GetDocumentString (const String &code, DocStringMeta &meta) |
MAXON_METHOD LibraryRef | GetLibraryRef () |
MAXON_METHOD Result< BaseArray< Runtime > > | GetAllAvailableVirtualMachineLibraries () const |
Private Member Functions | |
MAXON_INTERFACE (VirtualMachineInterface, MAXON_REFERENCE_NORMAL, "net.maxon.python.interface.virtualmachine") | |
|
private |
MAXON_METHOD Result<void> Init | ( | const LoadRuntime & | runtimeInfo, |
const DataDictionary & | settings = DataDictionary::NullValue() |
||
) |
[in] | runtimeInfo | Information about the virtual machine, how to start it up. |
[in] | settings | Optional settings which might be needed by the virtual machine. |
MAXON_METHOD void Free | ( | ) |
Frees and shuts down the virtual machine. Should never be called on virtual machines which are owned by the system.
MAXON_METHOD Result<VirtualMachineScopeRef> CreateScope | ( | ) |
Creates a virtual machine scope. The scope must be deleted before the virtual machine will be shutdown.
MAXON_METHOD String GetName | ( | ) |
Returns the name of the underlying library, e.g. "Python".
MAXON_METHOD String GetVersion | ( | ) |
Returns the human readable version string of the underlying library.
MAXON_METHOD String GetCopyright | ( | ) |
Returns the human readable copyright information of the underlying library.
MAXON_METHOD String GetCompiler | ( | ) |
Returns a human readable compiler info text.
MAXON_METHOD String GetBuildInfo | ( | ) |
Returns a human readable build information.
MAXON_METHOD Result<void> EnterInteractiveMode | ( | ) |
Enters the interactive mode of the virtual machine.
MAXON_METHOD Result<void> Execute | ( | const String & | code | ) |
Executes a given code in the global scope of the virtual machine.
[in] | code | Code to execute. |
MAXON_METHOD Result<void> Execute | ( | const Url & | filepath | ) |
Executes a given file in the global scope of the virtual machine.
[in] | filepath | Path of file to execute. |
MAXON_METHOD Result<void> ExecuteModule | ( | const String & | name | ) |
Executes a given module in the virtual machine.
[in] | name | Name of the module. |
MAXON_METHOD Result<void> GetDocumentString | ( | const String & | code, |
DocStringMeta & | meta | ||
) |
Returns docstrings of a given code.
[in] | code | String code. |
[out] | meta | Returns the docstrings. |
MAXON_METHOD LibraryRef GetLibraryRef | ( | ) |
Returns the underlying library.
MAXON_METHOD Result<BaseArray<Runtime> > GetAllAvailableVirtualMachineLibraries | ( | ) | const |
Returns all available virtual machine libraries.