Files
mie/mie/include/mie/interface/interface-definition.h
Max Wash 11fc7a6ca9 mie: implement an interface system for ops
this system allows dialects to register named interfaces, which are collections of function
pointers. an op can then implement this interface, providing callbacks for the interface's
virtual function pointers.

C code can request a pointer to an op's implementation of a given interface and call
virtual functions with no knowledge required about the op itself. this functonality
will also be extended to types, attributes, and dialects themselves.
2026-01-14 18:17:38 +00:00

18 lines
390 B
C

#ifndef MIE_INTERFACE_INTERFACE_DEFINITION_H_
#define MIE_INTERFACE_INTERFACE_DEFINITION_H_
#include <mie/id.h>
#include <mie/misc.h>
struct mie_interface_definition {
mie_id if_id;
const struct mie_dialect *if_parent;
char *if_name;
size_t if_size;
};
MIE_API struct mie_interface_definition *mie_interface_definition_create(
struct mie_dialect *parent, const char *name);
#endif