Manpage logo

SPVM::Document::NativeAPI::Field - Field Native APIs

Name  Description  Usage  Native APIs  get_name  get_index  get_offset  get_basic_type  get_type_dimension  get_type_flag  get_current_basic_type  get_exists_offset  get_exists_bit  Native API IDs  See Also  Copyright & License 

Name

SPVM::Document::NativeAPI::Field − Field Native APIs

Description

The field native APIs in SPVM are the APIs to get definition information for fields.

Usage

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);

Native APIs

get_name

"const char* (*get_name)(void* runtime, void* field);"

Returns the name of the field field.

get_index

"int32_t (*get_index)(void* runtime, void* field);"

Returns the index of the field field.

get_offset

"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.

get_basic_type

"void* (*get_basic_type)(void* runtime, void* field);"

Returns the basic type of the field field.

get_type_dimension

"int32_t (*get_type_dimension)(void* runtime, void* field);"

Returns the type dimension of the field field.

get_type_flag

"int32_t (*get_type_flag)(void* runtime, void* field);"

Returns the type flag ID of the field field.

get_current_basic_type

"void* (*get_current_basic_type)(void* runtime, void* field);"

Returns the basic type that owns the field field.

get_exists_offset

"int32_t (*get_exists_offset)(void* runtime, void* field);"

Returns the byte offset of the exists flag of the field field.

get_exists_bit

"int32_t (*get_exists_bit)(void* runtime, void* field);"

Return the bit shift of the exsits flag of the field field.

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
7 get_exists_offset
8 get_exists_bit

See Also

SPVM::Document::NativeAPI

SPVM::Document::NativeClass

SPVM::Document

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License


Updated 2026-06-01 - jenkler.se | uex.se