Add GetFields and GetMethods to binary module api
This commit is contained in:
@@ -115,6 +115,15 @@ public:
|
||||
return TypeNameToTypeIndex.TryGet(typeName, typeIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets handles of all method in a given scripting type.
|
||||
/// </summary>
|
||||
/// <param name="typeHandle">The type to find methods inside it.</param>
|
||||
/// <param name="methods">The output list of method pointers.</param>
|
||||
virtual void GetMethods(const ScriptingTypeHandle& typeHandle, Array<void*>& methods)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find a method in a given scripting type by the method name and parameters count.
|
||||
/// </summary>
|
||||
@@ -158,6 +167,15 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets handles of all fields in a given scripting type.
|
||||
/// </summary>
|
||||
/// <param name="typeHandle">The type to find fields inside it.</param>
|
||||
/// <param name="fields">The output list of field pointers.</param>
|
||||
virtual void GetFields(const ScriptingTypeHandle& typeHandle, Array<void*>& fields)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find a field in a given scripting type by the field name.
|
||||
/// </summary>
|
||||
@@ -318,10 +336,12 @@ public:
|
||||
// [BinaryModule]
|
||||
const StringAnsi& GetName() const override;
|
||||
bool IsLoaded() const override;
|
||||
void GetMethods(const ScriptingTypeHandle& typeHandle, Array<void*>& methods) override;
|
||||
void* FindMethod(const ScriptingTypeHandle& typeHandle, const StringAnsiView& name, int32 numParams = 0) override;
|
||||
void* FindMethod(const ScriptingTypeHandle& typeHandle, const ScriptingTypeMethodSignature& signature) override;
|
||||
bool InvokeMethod(void* method, const Variant& instance, Span<Variant> paramValues, Variant& result) override;
|
||||
void GetMethodSignature(void* method, ScriptingTypeMethodSignature& signature) override;
|
||||
void GetFields(const ScriptingTypeHandle& typeHandle, Array<void*>& fields) override;
|
||||
void* FindField(const ScriptingTypeHandle& typeHandle, const StringAnsiView& name) override;
|
||||
void GetFieldSignature(void* field, ScriptingTypeFieldSignature& fieldSignature) override;
|
||||
bool GetFieldValue(void* field, const Variant& instance, Variant& result) override;
|
||||
|
||||
Reference in New Issue
Block a user