22 lines
719 B
C
22 lines
719 B
C
#include "mirror.h"
|
|
|
|
MirroredTypeclass* internal_mirror_get_typeclass(void* self, IMirror const* tc, const char* typeclass) {
|
|
return dictionary_get_raw(tc->get_typeclasses(self), typeclass);
|
|
}
|
|
|
|
const void* mirror_get_typeclass(void* data, IMirror const* tc, const char* typeclass) {
|
|
MirroredTypeclass* class = internal_mirror_get_typeclass(data, tc, typeclass);
|
|
if(class != NULL)
|
|
return class->typeclass;
|
|
else
|
|
return NULL;
|
|
}
|
|
|
|
void* mirror_get_function(void* data, IMirror const* tc, const char* typeclass_name) {
|
|
MirroredTypeclass* class = internal_mirror_get_typeclass(data, tc, typeclass_name);
|
|
if(class != NULL)
|
|
return class->function;
|
|
else
|
|
return NULL;
|
|
}
|