SPVM::Document::NativeAPI::Argument − Argument Native APIs
The argument native APIs in SPVM are the APIs to get definition information for arguments.
SPVM_API_ARG*
api_arg = env−>api−>arg;
SPVM_API_METHOD* api_method =
env−>api−>method;
void* basic_type = env−>get_basic_type(env, stack,
"Foo");
void* method =
env−>api−>basic_type−>get_method_by_name(env−>runtime,
basic_type, "get");
void* arg =
api_method−>get_arg_by_index(env−>runtime,
method, 0);
void* arg_basic_type =
api_arg−>get_basic_type(env−>runtime,
arg);
"const char* (*get_name)(void* runtime, void* arg);"
Returns the name of the argument arg.
"int32_t (*get_index)(void* runtime, void* arg);"
Returns the index of the argument arg.
"void* (*get_basic_type)(void* runtime, void* arg);"
Returns the basic type of the argument arg.
"int32_t (*get_type_dimension)(void* runtime, void* arg);"
Returns the type dimention of the argument arg.
"int32_t (*get_type_flag)(void* runtime, void* arg);"
Returns the type flag ID of the argument arg.
"int32_t (*get_stack_index)(void* runtime, void* arg);"
Returns the stack index of the argument arg. The stack index is the position in a runtime stack.
"void* (*get_current_method)(void* runtime, void* arg);"
Returns the method that owns the argment arg.
"int32_t (*is_optional)(void* runtime, void* arg);"
If the argument arg is an optional argument, returns 1, otherwise returns 0.
"SPVM_VALUE (*get_default_value)(void* runtime, void* arg);"
Returns the default value of the optional argument arg.
0 get_name
1 get_index
2 get_basic_type
3 get_type_dimension
4 get_type_flag
5 get_stack_index
6 get_current_method
7 is_optional
8 get_default_value
|
• |
SPVM::Document::NativeAPI |
|||
|
• |
SPVM::Document::NativeAPI::Method |
|||
|
• |
SPVM::Document::NativeClass |
|||
|
• |
SPVM::Document |
Copyright (c) 2023 Yuki Kimoto
MIT License