Skip to main content

SCRIPT_MODULE_PARAM

Struct SCRIPT_MODULE_PARAM 

Source
#[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

引数の数を取得する

§Returns

引数の数

§get_param_int: unsafe extern "C" fn(index: c_int) -> c_int

引数を整数で取得する

§Arguments

  • index - 引数の位置(0〜)

§Returns

引数の値 (取得出来ない場合は0)

§get_param_double: unsafe extern "C" fn(index: c_int) -> c_double

引数を浮動小数点で取得する

§Arguments

  • index - 引数の位置(0〜)

§Returns

引数の値 (取得出来ない場合は0)

§get_param_string: unsafe extern "C" fn(index: c_int) -> *const c_char

引数を文字列(UTF-8)で取得する

§Arguments

  • index - 引数の位置(0〜)

§Returns

引数の値 (取得出来ない場合はnullptr)

§get_param_data: unsafe extern "C" fn(index: c_int) -> *mut c_void

引数をデータのポインタで取得する

§Arguments

  • index - 引数の位置(0〜)

§Returns

引数の値 (取得出来ない場合はnullptr)

§get_param_table_int: unsafe extern "C" fn(index: c_int, key: *const c_char) -> c_int

引数の連想配列要素を整数で取得する

§Arguments

  • index - 引数の位置(0〜)
  • key - キー名(UTF-8)

§Returns

引数の値 (取得出来ない場合は0)

§get_param_table_double: unsafe extern "C" fn(index: c_int, key: *const c_char) -> c_double

引数の連想配列要素を浮動小数点で取得する

§Arguments

  • index - 引数の位置(0〜)
  • key - キー名(UTF-8)

§Returns

引数の値 (取得出来ない場合は0)

§get_param_table_string: unsafe extern "C" fn(index: c_int, key: *const c_char) -> *const c_char

引数の連想配列要素を文字列(UTF-8)で取得する

§Arguments

  • index - 引数の位置(0〜)
  • key - キー名(UTF-8)

§Returns

引数の値 (取得出来ない場合はnullptr)

§get_param_array_num: unsafe extern "C" fn(index: c_int) -> c_int

引数の配列要素の数を取得する

§Arguments

  • index - 引数の位置(0〜)

§Returns

配列要素の数

§get_param_array_int: unsafe extern "C" fn(index: c_int, key: c_int) -> c_int

引数の配列要素を整数で取得する

§Arguments

  • index - 引数の位置(0〜)
  • key - 配列のインデックス(0〜)

§Returns

引数の値 (取得出来ない場合は0)

§get_param_array_double: unsafe extern "C" fn(index: c_int, key: c_int) -> c_double

引数の配列要素を浮動小数点で取得する

§Arguments

  • index - 引数の位置(0〜)
  • key - 配列のインデックス(0〜)

§Returns

引数の値 (取得出来ない場合は0)

§get_param_array_string: unsafe extern "C" fn(index: c_int, key: c_int) -> *const c_char

引数の配列要素を文字列(UTF-8)で取得する

§Arguments

  • index - 引数の位置(0〜)
  • key - 配列のインデックス(0〜)

§Returns

引数の値 (取得出来ない場合はnullptr)

§push_result_int: unsafe extern "C" fn(value: c_int)

整数の戻り値を追加する

§Arguments

  • value - 戻り値
§push_result_double: unsafe extern "C" fn(value: c_double)

浮動小数点の戻り値を追加する

§Arguments

  • value - 戻り値
§push_result_string: unsafe extern "C" fn(value: *const c_char)

文字列(UTF-8)の戻り値を追加する

§Arguments

  • value - 戻り値
§push_result_data: unsafe extern "C" fn(value: *const c_void)

データのポインタの戻り値を追加する

§Arguments

  • value - 戻り値
§push_result_table_int: unsafe extern "C" fn(key: *const *const c_char, value: *const c_int, num: c_int)

整数連想配列の戻り値を追加する

§Arguments

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

浮動小数点連想配列の戻り値を追加する

§Arguments

  • 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)連想配列の戻り値を追加する

§Arguments

  • key - キー名(UTF-8)の配列
  • value - 戻り値の配列
  • num - 配列の要素数
§push_result_array_int: unsafe extern "C" fn(value: *const c_int, num: c_int)

整数配列の戻り値を追加する

§Arguments

  • value - 戻り値の配列
  • num - 配列の要素数
§push_result_array_double: unsafe extern "C" fn(value: *const c_double, num: c_int)

浮動小数点配列の戻り値を追加する

§Arguments

  • value - 戻り値の配列
  • num - 配列の要素数
§push_result_array_string: unsafe extern "C" fn(value: *const *const c_char, num: c_int)

文字列(UTF-8)配列の戻り値を追加する

§Arguments

  • value - 戻り値の配列
  • num - 配列の要素数
§set_error: unsafe extern "C" fn(message: *const c_char)

エラーメッセージを設定する 呼び出された関数をエラー終了する場合に設定します

§Arguments

  • message - エラーメッセージ(UTF-8)
§get_param_boolean: unsafe extern "C" fn(index: c_int) -> bool

引数をブール値で取得する

§Arguments

  • index - 引数の位置(0〜)

§Returns

引数の値 (取得出来ない場合はfalse)

§push_result_boolean: unsafe extern "C" fn(value: bool)

ブール値の戻り値を追加する

§Arguments

  • value - 戻り値
§get_param_table_boolean: unsafe extern "C" fn(index: c_int, key: *const c_char) -> bool

引数の連想配列要素をブール値で取得する

§Arguments

  • index - 引数の位置(0〜)
  • key - キー名(UTF-8)

§Returns

引数の値 (取得出来ない場合はfalse)

§push_result_array_boolean: unsafe extern "C" fn(value: *const bool, num: c_int)

ブール値配列の戻り値を追加する

§Arguments

  • value - 戻り値の配列
  • num - 配列の要素数
§push_result_table_boolean: unsafe extern "C" fn(key: *const *const c_char, value: *const bool, num: c_int)

ブール値連想配列の戻り値を追加する

§Arguments

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

関数を戻り値として追加する

§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_meta_table: unsafe extern "C" fn(meta_method_functions: *const META_METHOD_FUNCTION, userdata: *mut c_void)

メタテーブルの戻り値を追加する

§get_param_meta_table: unsafe extern "C" fn(index: c_int, meta_method_functions: *mut META_METHOD_FUNCTION) -> *mut c_void

引数のメタテーブルのuserdataのポインタを取得する

§get_param_type: unsafe extern "C" fn(index: c_int) -> PARAM_TYPE

引数の型を取得します

Trait Implementations§

Source§

impl Clone for SCRIPT_MODULE_PARAM

Source§

fn clone(&self) -> SCRIPT_MODULE_PARAM

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SCRIPT_MODULE_PARAM

Source§

impl Debug for SCRIPT_MODULE_PARAM

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.