Name
SPVM::Document::NativeAPI::Field - Field Native APIs
Description
The field native APIs of SPVM are the APIs to manipulate information of fields.
Usage
SPVM_API_FIELD* api_field = env->api->field;
const char* field_name = api_field->get_name(runtime, field);
The field
is got by the get_field_by_index and the get_field_by_name basic type native API.
Native APIs
get_name
const char* (
*get_name
)(void* runtime, void* field);
Returns the name of the field.
The runtime
argument is a runtime object.
The field
argument is a field object.
get_index
int32_t (
*get_index
)(void* runtime, void* field);
Returns the index of the field.
The runtime
argument is a runtime object.
The field
argument is a field object.
get_offset
int32_t (
*get_offset
)(void* runtime, void* field);
Returns the offset of the field.
The runtime
argument is a runtime object.
The field
argument is a field object.
get_basic_type
void* (
*get_basic_type
)(void* runtime, void* field);
Returns the basic type of the field.
The runtime
argument is a runtime object.
The field
argument is a field object.
get_type_dimension
int32_t (
*get_type_dimension
)(void* runtime, void* field);
Returns the type dimension of the field.
The runtime
argument is a runtime object.
The field
argument is a field object.
get_type_flag
int32_t (
*get_type_flag
)(void* runtime, void* field);
Returns the type flag of the field.
The runtime
argument is a runtime object.
The field
argument is a field object.
get_current_basic_type
void* (
*get_current_basic_type
)(void* runtime, void* field);
Returns the current basic type of the field.
The runtime
argument is a runtime object.
The field
argument is a field object.
Native API IDs
0 get_name
1 get_index
2 get_offset
3 get_basic_type
4 get_type_dimension
5 get_type_flag
6 get_current_basic_type
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License