1995-03-12 19:44:41 +00:00
|
|
|
#ifndef __Invocation_h_OBJECTS_INCLUDE
|
|
|
|
#define __Invocation_h_OBJECTS_INCLUDE
|
|
|
|
|
|
|
|
/*
|
|
|
|
Use these for notifications!
|
|
|
|
Don't forget to make these archivable / transportable.
|
|
|
|
WARNING: All the (char*) type arguments and return values may
|
|
|
|
extraneous stuff after the first type.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <objects/stdobjects.h>
|
|
|
|
#include <objects/Collection.h>
|
|
|
|
|
|
|
|
@interface Invocation : NSObject
|
|
|
|
{
|
|
|
|
char *encoding;
|
|
|
|
unsigned return_size;
|
|
|
|
void *return_value;
|
|
|
|
}
|
|
|
|
- initWithReturnType: (const char *)encoding;
|
|
|
|
- (void) invoke;
|
|
|
|
- (void) invokeWithObject: anObj;
|
|
|
|
- (const char *) returnType;
|
|
|
|
- (unsigned) returnSize;
|
1996-02-13 01:54:48 +00:00
|
|
|
- (void) getReturnValue: (void*) addr;
|
1995-03-12 19:44:41 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface ArgframeInvocation : Invocation
|
|
|
|
{
|
|
|
|
arglist_t argframe;
|
|
|
|
/* char *function_encoding; Using return_encoding */
|
|
|
|
}
|
|
|
|
- initWithArgframe: (arglist_t)frame type: (const char *)e;
|
|
|
|
- initWithType: (const char *)e;
|
|
|
|
- (const char *) argumentTypeAtIndex: (unsigned)i;
|
|
|
|
- (unsigned) argumentSizeAtIndex: (unsigned)i;
|
|
|
|
- (void) getArgument: (void*)addr atIndex: (unsigned)i;
|
|
|
|
- (void) setArgumentAtIndex: (unsigned)i
|
|
|
|
toValueAt: (const void*)addr;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface MethodInvocation : ArgframeInvocation
|
|
|
|
- initWithArgframe: (arglist_t)frame selector: (SEL)s;
|
|
|
|
- initWithSelector: (SEL)s;
|
1996-02-13 01:54:48 +00:00
|
|
|
- initWithTarget: target selector: (SEL)s, ...;
|
1995-03-12 19:44:41 +00:00
|
|
|
- (void) invokeWithTarget: t;
|
|
|
|
- (SEL) selector;
|
|
|
|
- (void) setSelector: (SEL)s;
|
|
|
|
- target;
|
|
|
|
- (void) setTarget: t;
|
|
|
|
@end
|
|
|
|
|
1996-02-13 01:54:48 +00:00
|
|
|
@interface VoidFunctionInvocation : Invocation
|
1995-03-12 19:44:41 +00:00
|
|
|
{
|
|
|
|
void (*function)();
|
|
|
|
}
|
|
|
|
- initWithFunction: (void(*)())f;
|
|
|
|
@end
|
|
|
|
|
|
|
|
#if 0
|
1996-02-13 01:54:48 +00:00
|
|
|
|
|
|
|
@interface VoidObjectFunctionInvocation : Invocation
|
1995-03-12 19:44:41 +00:00
|
|
|
{
|
1996-02-13 01:54:48 +00:00
|
|
|
void (*function)(id);
|
|
|
|
id object;
|
1995-03-12 19:44:41 +00:00
|
|
|
}
|
1996-02-13 01:54:48 +00:00
|
|
|
- initWithFunction: (void(*)())f;
|
1995-03-12 19:44:41 +00:00
|
|
|
@end
|
|
|
|
|
1996-02-13 01:54:48 +00:00
|
|
|
@interface ObjectObjectFunctionInvocation : Invocation
|
|
|
|
{
|
|
|
|
id (*function)(id);
|
|
|
|
}
|
|
|
|
- initWithFunction: (void(*)())f;
|
1995-03-12 19:44:41 +00:00
|
|
|
@end
|
|
|
|
|
1996-02-13 01:54:48 +00:00
|
|
|
@interface FunctionInvocation : ArgframeInvocation
|
|
|
|
{
|
|
|
|
void (*function)();
|
|
|
|
}
|
|
|
|
- initWithFunction: (void(*)())f
|
|
|
|
argframe: (arglist_t)frame type: (const char *)e;
|
|
|
|
- initWithFunction: (void(*)())f;
|
1995-03-12 19:44:41 +00:00
|
|
|
@end
|
1996-02-13 01:54:48 +00:00
|
|
|
|
1995-03-12 19:44:41 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __Invocation_h_OBJECTS_INCLUDE */
|