fx.reflection: implement retrieving functions and properties from fx_type

This commit is contained in:
2026-05-25 17:25:27 +01:00
parent 82bb20c6af
commit 673bf07cf6
2 changed files with 334 additions and 3 deletions
@@ -1,8 +1,11 @@
#ifndef FX_REFLECTION_TYPE_H_
#define FX_REFLECTION_TYPE_H_
#include <fx/iterator.h>
#include <fx/macros.h>
#include <fx/reflection/assembly.h>
#include <fx/reflection/function.h>
#include <fx/reflection/property.h>
FX_DECLS_BEGIN;
@@ -17,14 +20,27 @@ FX_TYPE_CLASS_DECLARATION_END(fx_type)
FX_API fx_type_id fx_type_get_type();
FX_API const fx_assembly *fx_type_get_assembly(const fx_type *ty);
FX_API fx_status fx_type_set_assembly(fx_type *ty, fx_assembly *assembly);
FX_API const char *fx_type_get_name(const fx_type *ty);
FX_API fx_type_flags fx_type_get_flags(const fx_type *ty);
FX_API const fx_function *fx_type_get_function(
const fx_type *ty,
const char *name);
FX_API fx_iterator *fx_type_get_functions(const fx_type *ty);
FX_API const fx_property *fx_type_get_property(
const fx_type *ty,
const char *name);
FX_API fx_iterator *fx_type_get_properties(const fx_type *ty);
FX_API const fx_type *fx_type_get_by_id(fx_type_id id);
FX_API const fx_type *fx_type_get_by_name(const char *name);
FX_API fx_type_id fx_type_get_id(const fx_type *ty);
FX_API const fx_type *fx_type_get_parent(const fx_type *ty);
FX_API void *fx_type_get_interface(const fx_type *ty, fx_type_id interface_id);
FX_API fx_type *__fx_type_create(struct fx_type_info *opaque);
#endif