![]() |
OpenSiv3D
v0.6.5
C++20 framework for creative coding
|
スクリプト (AngelScript) More...
#include <Script.hpp>
Inherits s3d::AssetHandle< Script >.
Public Member Functions | |
| SIV3D_NODISCARD_CXX20 | Script () |
| デフォルトコンストラクタ More... | |
| SIV3D_NODISCARD_CXX20 | Script (FilePathView path, ScriptCompileOption compileOption=ScriptCompileOption::Default) |
| スクリプトをファイルからロードしてコンパイルします。 More... | |
| SIV3D_NODISCARD_CXX20 | Script (Arg::code_< StringView > code, ScriptCompileOption compileOption=ScriptCompileOption::Default) |
| スクリプトをコードからコンパイルします。 More... | |
| virtual | ~Script () |
| デストラクタ More... | |
| Array< String > | getFunctionDeclarations (IncludeParamNames includeParamNames=IncludeParamNames::Yes) const |
| スクリプトに含まれる関数宣言の一覧を返します。 More... | |
| template<class Fty > | |
| ScriptFunction< Fty > | getFunction (StringView decl) const |
| スクリプト関数を取得します。 More... | |
| bool | compiled () const |
| ロードしたスクリプトのコンパイルに成功しているかを返します。 More... | |
| bool | reload (ScriptCompileOption compileOption=ScriptCompileOption::Default) |
| スクリプトをリロードして再コンパイルします。 More... | |
| void | setSystemUpdateCallback (const std::function< bool()> &callback) |
スクリプト内での System::Update() で呼び出す関数を登録します。 More... | |
| const Array< FilePath > & | getIncludedFiles () const noexcept |
| インクルードされているファイル一覧を返します。 More... | |
| const Array< String > & | getMessages () const |
| コンパイル時に出力されたメッセージ一覧を返します。 More... | |
| const FilePath & | path () const |
| スクリプトのファイルパスを返します。 More... | |
| void | swap (Script &other) noexcept |
| 別のスクリプトと中身を交換します。 More... | |
Public Member Functions inherited from s3d::AssetHandle< Script > | |
| SIV3D_NODISCARD_CXX20 | AssetHandle () |
| SIV3D_NODISCARD_CXX20 | AssetHandle (std::shared_ptr< AssetIDWrapperType > &&id) |
| IDType | id () const noexcept |
| アセットの内部管理 ID を返します。 More... | |
| bool | isEmpty () const noexcept |
| アセットが空であるかを返します。 More... | |
| operator bool () const noexcept | |
| アセットが空でないかを返します。 More... | |
| bool | operator== (const AssetHandle &other) const noexcept |
| 2 つのアセットが同じオブジェクトであるかを返します。 More... | |
| bool | operator!= (const AssetHandle &other) const noexcept |
| 2 つのアセットが異なるオブジェクトであるかを返します。 More... | |
| void | release () |
| このハンドルが管理するアセットを解放します。 More... | |
Static Public Member Functions | |
| static AngelScript::asIScriptEngine * | GetEngine () |
| AngelScript の高度な機能にアクセスするためのエンジンポインタを返します(上級者向け) More... | |
Protected Member Functions | |
| const std::shared_ptr< ScriptModule > & | _getModule () const |
| AngelScript::asIScriptFunction * | _getFunction (StringView decl) const |
Additional Inherited Members | |
Public Types inherited from s3d::AssetHandle< Script > | |
| using | AssetIDWrapperType = AssetIDWrapper< AssetHandle > |
| アセット ID ラッパー型 More... | |
| using | IDType = typename AssetIDWrapperType::IDType |
| アセット ID 型 More... | |
Protected Attributes inherited from s3d::AssetHandle< Script > | |
| std::shared_ptr< AssetIDWrapperType > | m_handle |
スクリプト (AngelScript)
| SIV3D_NODISCARD_CXX20 s3d::Script::Script | ( | ) |
デフォルトコンストラクタ
|
explicit |
スクリプトをファイルからロードしてコンパイルします。
| path | スクリプトファイルのパス |
| compileOption | コンパイルオプション |
|
explicit |
スクリプトをコードからコンパイルします。
| code | コード |
| compileOption | コンパイルオプション |
|
virtual |
デストラクタ
|
protected |
|
protected |
| bool s3d::Script::compiled | ( | ) | const |
ロードしたスクリプトのコンパイルに成功しているかを返します。
|
static |
AngelScript の高度な機能にアクセスするためのエンジンポインタを返します(上級者向け)
| ScriptFunction<Fty> s3d::Script::getFunction | ( | StringView | decl | ) | const |
スクリプト関数を取得します。
| Fty | 関数の型 |
| decl | 関数の名前または関数宣言 |
| Array<String> s3d::Script::getFunctionDeclarations | ( | IncludeParamNames | includeParamNames = IncludeParamNames::Yes | ) | const |
スクリプトに含まれる関数宣言の一覧を返します。
| includeParamNames | パラメータ名を含む場合 IncludeParamNames::Yes, それ以外の場合は IncludeParamNames::No |
インクルードされているファイル一覧を返します。
コンパイル時に出力されたメッセージ一覧を返します。
| const FilePath& s3d::Script::path | ( | ) | const |
スクリプトのファイルパスを返します。
| bool s3d::Script::reload | ( | ScriptCompileOption | compileOption = ScriptCompileOption::Default | ) |
スクリプトをリロードして再コンパイルします。
| compileOption | コンパイルオプション |
| void s3d::Script::setSystemUpdateCallback | ( | const std::function< bool()> & | callback | ) |
スクリプト内での System::Update() で呼び出す関数を登録します。
| callback | 登録する関数 |
|
noexcept |
別のスクリプトと中身を交換します。
| other | 別のスクリプト |