OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::ManagedScript Class Reference

自動管理されるスクリプト More...

#include <ManagedScript.hpp>

Public Member Functions

SIV3D_NODISCARD_CXX20 ManagedScript ()
 
SIV3D_NODISCARD_CXX20 ManagedScript (FilePathView path)
 
 ~ManagedScript ()
 
bool isEmpty () const
 
 operator bool () const
 
bool compiled () const
 スクリプトコードのコンパイルに成功したかを返します。 More...
 
void setTriggerToReload (const std::function< bool()> &trigger)
 スクリプトのリロードを発生させるイベントを設定します。 More...
 
const Array< FilePath > & getIncludedFiles () const noexcept
 インクルードされているファイル一覧を返します。 More...
 
void run () const
 スクリプトコードを実行します。 More...
 

Detailed Description

自動管理されるスクリプト

Remarks
スクリプトファイルの変更を検知し、自動でリロードするスクリプトクラスです
スクリプトコード内の void Main() がエントリーポイントです

Constructor & Destructor Documentation

◆ ManagedScript() [1/2]

SIV3D_NODISCARD_CXX20 s3d::ManagedScript::ManagedScript ( )

◆ ManagedScript() [2/2]

SIV3D_NODISCARD_CXX20 s3d::ManagedScript::ManagedScript ( FilePathView  path)
explicit

◆ ~ManagedScript()

s3d::ManagedScript::~ManagedScript ( )

Member Function Documentation

◆ compiled()

bool s3d::ManagedScript::compiled ( ) const

スクリプトコードのコンパイルに成功したかを返します。

Returns
コンパイルに成功した場合 true, それ以外の場合は false

◆ getIncludedFiles()

const Array<FilePath>& s3d::ManagedScript::getIncludedFiles ( ) const
noexcept

インクルードされているファイル一覧を返します。

Returns
インクルードされているファイル一覧

◆ isEmpty()

bool s3d::ManagedScript::isEmpty ( ) const

◆ operator bool()

s3d::ManagedScript::operator bool ( ) const
explicit

◆ run()

void s3d::ManagedScript::run ( ) const

スクリプトコードを実行します。

◆ setTriggerToReload()

void s3d::ManagedScript::setTriggerToReload ( const std::function< bool()> &  trigger)

スクリプトのリロードを発生させるイベントを設定します。

Parameters
triggerスクリプトのリロードを発生させるイベント。この関数が true を返すとスクリプトをリロードする

The documentation for this class was generated from the following file: