Manpage logo

SPVM::Document::NativeAPI::ClassVariable - Class Variable Native APIs

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

Name

SPVM::Document::NativeAPI::ClassVariable − Class Variable Native APIs

Description

The class variable native APIs in SPVM are the APIs to get definition information for class variables.

Usage

SPVM_API_CLASS_VAR* api_class_var = env−>api−>class_var;
void* basic_type = env−>get_basic_type(env, stack, "Foo");
void* class_var = env−>api−>basic_type−>get_class_var_by_name(env−>runtime, basic_type, "$VAR");
const char* class_var_name = api_class_var−>get_name(env−>runtime, class_var);

Native APIs

get_name

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

Returns the name of the class variable class_var.

get_index

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

Returns the index of the class variable class_var. This index is the position of the class variable in its belonging class.

get_basic_type

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

Returns the basic type of the class variable class_var.

get_type_dimension

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

Returns the type dimension of the class variable class_var.

get_type_flag

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

Returns the type flag ID of the class variable class_var.

get_current_basic_type

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

Returns the basic type that owns the class variable class_var.

is_cache

"int32_t (*is_cache)(void* runtime, void* class_var);"

If "cache" class variable attribute is specified, returns 1, otherwise returns 0.

Native API IDs

0 get_name
1 get_index
2 get_basic_type
3 get_type_dimension
4 get_type_flag
5 get_current_basic_type
6 is_cache

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