SPVM::Document::NativeAPI::Field − Field Native APIs
The field native APIs in SPVM are the APIs to get definition information for fields.
SPVM_API_FIELD*
api_field = env−>api−>field;
void* basic_type = env−>get_basic_type(env, stack,
"Foo");
void* field =
env−>api−>basic_type−>get_field_by_name(env−>runtime,
basic_type, "value");
const char* field_name =
api_field−>get_name(env−>runtime,
field);
"const char* (*get_name)(void* runtime, void* field);"
Returns the name of the field field.
"int32_t (*get_index)(void* runtime, void* field);"
Returns the index of the field field.
"int32_t (*get_offset)(void* runtime, void* field);"
Returns the byte offset of the field field. The byte offset is the position in bytes where the field is allocated in its belonging class.
"void* (*get_basic_type)(void* runtime, void* field);"
Returns the basic type of the field field.
"int32_t (*get_type_dimension)(void* runtime, void* field);"
Returns the type dimension of the field field.
"int32_t (*get_type_flag)(void* runtime, void* field);"
Returns the type flag ID of the field field.
"void* (*get_current_basic_type)(void* runtime, void* field);"
Returns the basic type that owns the field field.
"int32_t (*get_exists_offset)(void* runtime, void* field);"
Returns the byte offset of the exists flag of the field field.
"int32_t (*get_exists_bit)(void* runtime, void* field);"
Return the bit shift of the exsits flag of the field field.
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
7 get_exists_offset
8 get_exists_bit
|
• |
SPVM::Document::NativeAPI |
|||
|
• |
SPVM::Document::NativeClass |
|||
|
• |
SPVM::Document |
Copyright (c) 2023 Yuki Kimoto
MIT License