#[repr(C)]pub struct SCRIPT_MODULE_PARAM {Show 35 fields
pub get_param_num: unsafe extern "C" fn() -> c_int,
pub get_param_int: unsafe extern "C" fn(index: c_int) -> c_int,
pub get_param_double: unsafe extern "C" fn(index: c_int) -> c_double,
pub get_param_string: unsafe extern "C" fn(index: c_int) -> *const c_char,
pub get_param_data: unsafe extern "C" fn(index: c_int) -> *mut c_void,
pub get_param_table_int: unsafe extern "C" fn(index: c_int, key: *const c_char) -> c_int,
pub get_param_table_double: unsafe extern "C" fn(index: c_int, key: *const c_char) -> c_double,
pub get_param_table_string: unsafe extern "C" fn(index: c_int, key: *const c_char) -> *const c_char,
pub get_param_array_num: unsafe extern "C" fn(index: c_int) -> c_int,
pub get_param_array_int: unsafe extern "C" fn(index: c_int, key: c_int) -> c_int,
pub get_param_array_double: unsafe extern "C" fn(index: c_int, key: c_int) -> c_double,
pub get_param_array_string: unsafe extern "C" fn(index: c_int, key: c_int) -> *const c_char,
pub push_result_int: unsafe extern "C" fn(value: c_int),
pub push_result_double: unsafe extern "C" fn(value: c_double),
pub push_result_string: unsafe extern "C" fn(value: *const c_char),
pub push_result_data: unsafe extern "C" fn(value: *const c_void),
pub push_result_table_int: unsafe extern "C" fn(key: *const *const c_char, value: *const c_int, num: c_int),
pub push_result_table_double: unsafe extern "C" fn(key: *const *const c_char, value: *const c_double, num: c_int),
pub push_result_table_string: unsafe extern "C" fn(key: *const *const c_char, value: *const *const c_char, num: c_int),
pub push_result_array_int: unsafe extern "C" fn(value: *const c_int, num: c_int),
pub push_result_array_double: unsafe extern "C" fn(value: *const c_double, num: c_int),
pub push_result_array_string: unsafe extern "C" fn(value: *const *const c_char, num: c_int),
pub set_error: unsafe extern "C" fn(message: *const c_char),
pub get_param_boolean: unsafe extern "C" fn(index: c_int) -> bool,
pub push_result_boolean: unsafe extern "C" fn(value: bool),
pub get_param_table_boolean: unsafe extern "C" fn(index: c_int, key: *const c_char) -> bool,
pub push_result_array_boolean: unsafe extern "C" fn(value: *const bool, num: c_int),
pub push_result_table_boolean: unsafe extern "C" fn(key: *const *const c_char, value: *const bool, num: c_int),
pub edit: *mut EDIT_SECTION,
pub push_result_function: unsafe extern "C" fn(func: unsafe extern "C" fn(smp: *mut SCRIPT_MODULE_PARAM), userdata: *mut c_void),
pub deprecated_push_result_meta_table: unsafe extern "C" fn(func_getter: unsafe extern "C" fn(smp: *mut SCRIPT_MODULE_PARAM), func_setter: unsafe extern "C" fn(smp: *mut SCRIPT_MODULE_PARAM), userdata: *mut c_void),
pub userdata: *mut c_void,
pub push_result_meta_table: unsafe extern "C" fn(meta_method_functions: *const META_METHOD_FUNCTION, userdata: *mut c_void),
pub get_param_meta_table: unsafe extern "C" fn(index: c_int, meta_method_functions: *mut META_METHOD_FUNCTION) -> *mut c_void,
pub get_param_type: unsafe extern "C" fn(index: c_int) -> PARAM_TYPE,
}Expand description
スクリプトモジュール引数構造体
Fields§
§get_param_num: unsafe extern "C" fn() -> c_int引数の数を取得する 戻り値 : 引数の数
get_param_int: unsafe extern "C" fn(index: c_int) -> c_int引数を整数で取得する index : 引数の位置(0〜) 戻り値 : 引数の値 (取得出来ない場合は0)
get_param_double: unsafe extern "C" fn(index: c_int) -> c_double引数を浮動小数点で取得する index : 引数の位置(0〜) 戻り値 : 引数の値 (取得出来ない場合は0)
get_param_string: unsafe extern "C" fn(index: c_int) -> *const c_char引数を文字列(UTF-8)で取得する index : 引数の位置(0〜) 戻り値 : 引数の値 (取得出来ない場合はnullptr)
get_param_data: unsafe extern "C" fn(index: c_int) -> *mut c_void引数をデータのポインタで取得する ※LightUserData等から取得 index : 引数の位置(0〜) 戻り値 : 引数の値 (取得出来ない場合はnullptr)
get_param_table_int: unsafe extern "C" fn(index: c_int, key: *const c_char) -> c_int引数の連想配列要素を整数で取得する index : 引数の位置(0〜) key : キー名(UTF-8) 戻り値 : 引数の値 (取得出来ない場合は0)
get_param_table_double: unsafe extern "C" fn(index: c_int, key: *const c_char) -> c_double引数の連想配列要素を浮動小数点で取得する index : 引数の位置(0〜) key : キー名(UTF-8) 戻り値 : 引数の値 (取得出来ない場合は0)
get_param_table_string: unsafe extern "C" fn(index: c_int, key: *const c_char) -> *const c_char引数の連想配列要素を文字列(UTF-8)で取得する index : 引数の位置(0〜) key : キー名(UTF-8) 戻り値 : 引数の値 (取得出来ない場合はnullptr)
get_param_array_num: unsafe extern "C" fn(index: c_int) -> c_int引数の配列要素の数を取得する index : 引数の位置(0〜) 戻り値 : 配列要素の数
get_param_array_int: unsafe extern "C" fn(index: c_int, key: c_int) -> c_int引数の配列要素を整数で取得する index : 引数の位置(0〜) key : 配列のインデックス(0〜) 戻り値 : 引数の値 (取得出来ない場合は0)
get_param_array_double: unsafe extern "C" fn(index: c_int, key: c_int) -> c_double引数の配列要素を浮動小数点で取得する index : 引数の位置(0〜) key : 配列のインデックス(0〜) 戻り値 : 引数の値 (取得出来ない場合は0)
get_param_array_string: unsafe extern "C" fn(index: c_int, key: c_int) -> *const c_char引数の配列要素を文字列(UTF-8)で取得する index : 引数の位置(0〜) key : 配列のインデックス(0〜) 戻り値 : 引数の値 (取得出来ない場合はnullptr)
push_result_int: unsafe extern "C" fn(value: c_int)整数の戻り値を追加する value : 戻り値
push_result_double: unsafe extern "C" fn(value: c_double)浮動小数点の戻り値を追加する value : 戻り値
push_result_string: unsafe extern "C" fn(value: *const c_char)文字列(UTF-8)の戻り値を追加する value : 戻り値
push_result_data: unsafe extern "C" fn(value: *const c_void)データのポインタの戻り値を追加する ※LightUserDataを返却 value : 戻り値
push_result_table_int: unsafe extern "C" fn(key: *const *const c_char, value: *const c_int, num: c_int)整数連想配列の戻り値を追加する key : キー名(UTF-8)の配列 value : 戻り値の配列 num : 配列の要素数
push_result_table_double: unsafe extern "C" fn(key: *const *const c_char, value: *const c_double, num: c_int)浮動小数点連想配列の戻り値を追加する key : キー名(UTF-8)の配列 value : 戻り値の配列 num : 配列の要素数
push_result_table_string: unsafe extern "C" fn(key: *const *const c_char, value: *const *const c_char, num: c_int)文字列(UTF-8)連想配列の戻り値を追加する key : キー名(UTF-8)の配列 value : 戻り値の配列 num : 配列の要素数
push_result_array_int: unsafe extern "C" fn(value: *const c_int, num: c_int)整数配列の戻り値を追加する value : 戻り値の配列 num : 配列の要素数
push_result_array_double: unsafe extern "C" fn(value: *const c_double, num: c_int)浮動小数点配列の戻り値を追加する value : 戻り値の配列 num : 配列の要素数
push_result_array_string: unsafe extern "C" fn(value: *const *const c_char, num: c_int)文字列(UTF-8)配列の戻り値を追加する value : 戻り値の配列 num : 配列の要素数
set_error: unsafe extern "C" fn(message: *const c_char)エラーメッセージを設定する 呼び出された関数をエラー終了する場合に設定します message : エラーメッセージ(UTF-8)
get_param_boolean: unsafe extern "C" fn(index: c_int) -> bool引数をブール値で取得する index : 引数の位置(0〜) 戻り値 : 引数の値 (取得出来ない場合はfalse)
push_result_boolean: unsafe extern "C" fn(value: bool)ブール値の戻り値を追加する value : 戻り値
get_param_table_boolean: unsafe extern "C" fn(index: c_int, key: *const c_char) -> bool引数の連想配列要素をブール値で取得する index : 引数の位置(0〜) key : キー名(UTF-8) 戻り値 : 引数の値 (取得出来ない場合はfalse)
push_result_array_boolean: unsafe extern "C" fn(value: *const bool, num: c_int)ブール値配列の戻り値を追加する value : 戻り値の配列 num : 配列の要素数
push_result_table_boolean: unsafe extern "C" fn(key: *const *const c_char, value: *const bool, num: c_int)ブール値連想配列の戻り値を追加する key : キー名(UTF-8)の配列 value : 戻り値の配列 num : 配列の要素数
edit: *mut EDIT_SECTION編集セクション関数 スクリプト処理中は参照系の関数が利用出来ます
push_result_function: unsafe extern "C" fn(func: unsafe extern "C" fn(smp: *mut SCRIPT_MODULE_PARAM), userdata: *mut c_void)関数を戻り値として追加する func : 返却した関数の実行時に呼ばれるコールバック関数 userdata : 任意のユーザーデータのポインタ
deprecated_push_result_meta_table: unsafe extern "C" fn(func_getter: unsafe extern "C" fn(smp: *mut SCRIPT_MODULE_PARAM), func_setter: unsafe extern "C" fn(smp: *mut SCRIPT_MODULE_PARAM), userdata: *mut c_void)新しい関数に差し替えるので廃止します
userdata: *mut c_void任意のユーザーデータのポインタ push_result_function(),push_result_meta_table()の引数の値が格納されます
push_result_meta_table: unsafe extern "C" fn(meta_method_functions: *const META_METHOD_FUNCTION, userdata: *mut c_void)メタテーブルの戻り値を追加する 任意のメタメソッドのコールバック関数を設定したメタテーブルを返却します meta_method_functions : 登録するメタメソッドの一覧 (META_METHOD_FUNCTIONを列挙してメタメソッド名がnullの要素で終端したリストへのポインタ) userdata : 任意のユーザーデータのポインタ
get_param_meta_table: unsafe extern "C" fn(index: c_int, meta_method_functions: *mut META_METHOD_FUNCTION) -> *mut c_void引数のメタテーブルのuserdataのポインタを取得する index : 引数の位置(0〜) meta_method_functions : 対象のメタテーブルを識別する為のメタメソッドの一覧 ※同一アドレスの場合のみ取得出来ます 戻り値 : userdataのポインタ (取得出来ない場合はnullptr)
get_param_type: unsafe extern "C" fn(index: c_int) -> PARAM_TYPE引数の型を取得します index : 引数の位置(0〜) 戻り値 : 引数の型