Files
fx/fx/type.h
T

47 lines
1.3 KiB
C

#ifndef _TYPE_H_
#define _TYPE_H_
#include <fx/bst.h>
#include <fx/namemap.h>
#include <fx/queue.h>
#include <fx/reflection/function.h>
#include <fx/reflection/property.h>
#include <fx/reflection/type.h>
#include <fx/type.h>
#include <stddef.h>
struct fx_type_component {
struct fx_bst_node c_node;
struct fx_queue_entry c_entry;
const struct fx_type_info *c_type;
size_t c_class_data_offset, c_class_data_size;
size_t c_instance_private_data_offset, c_instance_private_data_size;
size_t c_instance_protected_data_offset, c_instance_protected_data_size;
};
struct fx_type_function {
struct fx_namemap_entry f_entry;
fx_function *f_func;
};
struct fx_type_property {
struct fx_namemap_entry p_entry;
fx_property *p_prop;
};
extern struct fx_type_registration *fx_type_get_registration(fx_type_id id);
extern struct fx_type_component *fx_type_get_component(
const fx_bst *tree,
const union fx_type_id *key);
extern struct fx_type_info *fx_type_info_get_by_id(const union fx_type_id *key);
extern struct fx_type_info *fx_type_info_get_by_name(const char *name);
extern fx_function *fx_type_info_get_function_by_name(
const struct fx_type_info *ty,
const char *name);
extern fx_property *fx_type_info_get_property_by_name(
const struct fx_type_info *ty,
const char *name);
#endif