|
grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » IsClassDerivedFrom(string, string) |
Version 2.2 |
IsClassDerivedFrom 関数は、クラスが別のクラスから派生されているかどうかを示す boolean 値を返します。
クラスが別のクラスから派生しているかどうかを確認し、有用なフィードバックを返します。
Lua |
return function() -- Set the value of the two strings. local derivedName = "World" local baseName = "Group" -- Check if the derivedName is the name of a class derived from the baseName class. local isDerived = IsClassDerivedFrom(derivedName, baseName) -- Provide feedback. if isDerived then Printf(derivedName .. " is derived from " .. baseName) else Printf(derivedName .. " is not derived from " .. baseName) end end |