41 lines
990 B
C
41 lines
990 B
C
#ifndef _TYPE_H_
|
|
#define _TYPE_H_
|
|
|
|
#include <fx/core/bst.h>
|
|
#include <fx/core/queue.h>
|
|
#include <fx/core/type.h>
|
|
#include <stddef.h>
|
|
|
|
enum fx_type_category {
|
|
FX_TYPE_NONE = 0,
|
|
FX_TYPE_CLASS,
|
|
FX_TYPE_INTERFACE,
|
|
};
|
|
|
|
struct fx_type_component {
|
|
struct fx_bst_node c_node;
|
|
struct fx_queue_entry c_entry;
|
|
const struct fx_type_registration *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_registration {
|
|
enum fx_type_category r_category;
|
|
struct fx_bst_node r_node;
|
|
const fx_type_info *r_info;
|
|
struct _fx_class *r_class;
|
|
struct fx_bst r_components;
|
|
struct fx_queue r_class_hierarchy;
|
|
|
|
size_t r_instance_size, r_class_size;
|
|
};
|
|
|
|
extern struct fx_type_registration *fx_type_get_registration(fx_type id);
|
|
extern struct fx_type_component *fx_type_get_component(
|
|
const fx_bst *tree, const union fx_type *key);
|
|
|
|
#endif
|