New doc system done for core
[io.git] / libs / iovm / source / IoCFunction.h
blob7c42d38fee6d791c15d5a2d7827e59c232deb0a0
2 //metadoc CFunction copyright Steve Dekorte 2002
3 //metadoc CFunction license BSD revised
5 #ifndef IOCFUNCTION_DEFINED
6 #define IOCFUNCTION_DEFINED 1
8 #include "IoVMApi.h"
10 #include "Common.h"
11 #include "IoObject.h"
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
17 #define ISCFUNCTION(self) \
18 IoObject_hasCloneFunc_(self, (IoTagCloneFunc *)IoCFunction_rawClone)
20 #define IOCFUNCTION(func, tag) IoCFunction_newWithFunctionPointer_tag_name_(IOSTATE, (IoUserFunction *)func, tag, "?")
22 typedef IoObject *(IoUserFunction)(IoObject *, IoObject *, IoMessage *);
23 typedef IoObject IoCFunction;
25 typedef struct
27 IoTag *typeTag; // pointer to tag of type excepted for self value to have as data
28 IoUserFunction *func;
29 IoSymbol *uniqueName;
30 } IoCFunctionData;
32 IOVM_API IoCFunction *IoCFunction_proto(void *state);
33 IOVM_API void IoCFunction_protoFinish(void *state);
34 IOVM_API IoCFunction *IoCFunction_rawClone(IoCFunction *self);
35 IOVM_API IoCFunction *IoCFunction_newWithFunctionPointer_tag_name_(void *state, IoUserFunction *s, IoTag *typeTag, const char *name);
37 IOVM_API void IoCFunction_mark(IoCFunction *self);
38 IOVM_API void IoCFunction_free(IoCFunction *self);
39 IOVM_API void IoCFunction_print(IoCFunction *self);
41 IOVM_API IoObject *IoCFunction_id(IoCFunction *self, IoObject *locals, IoMessage *m);
42 IOVM_API IoObject *IoCFunction_uniqueName(IoCFunction *self, IoObject *locals, IoMessage *m);
43 IOVM_API IoObject *IoCFunction_typeName(IoCFunction *self, IoObject *locals, IoMessage *m);
44 IOVM_API IoObject *IoCFunction_equals(IoCFunction *self, IoObject *locals, IoMessage *m);
45 IOVM_API IoObject *IoCFunction_activate(IoCFunction *self, IoObject *target, IoObject *locals, IoMessage *m, IoObject *slotContext);
47 IOVM_API IoObject *IoCFunction_performOn(IoCFunction *self, IoObject *locals, IoMessage *m);
49 #ifdef __cplusplus
51 #endif
52 #endif