Differences From Artifact [e893ac091c]:
- File
src/OFInvocation.h
— part of check-in
[ef614a225d]
at
2020-09-26 21:58:39
on branch trunk
— Don't require __COUNTER__ for OF_RESERVE_IVARS
__COUNTER__ does not exist in GCC 4.2, and Apple GCC 4.2 is still the
newest compiler available for macOS 10.5. (user: js, size: 2870) [annotate] [blame] [check-ins using]
To Artifact [86507cef33]:
- File src/OFInvocation.h — part of check-in [163a4a5a2e] at 2020-10-03 11:35:41 on branch trunk — Use /** */ instead of /*! */ for documentation (user: js, size: 2870) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
31 32 33 34 35 36 37 | # endif #endif @class OFMethodSignature; @class OFMutableArray OF_GENERIC(ObjectType); @class OFMutableData; | | | | | | | | | | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# endif
#endif
@class OFMethodSignature;
@class OFMutableArray OF_GENERIC(ObjectType);
@class OFMutableData;
/**
* @class OFInvocation OFInvocation.h ObjFW/OFInvocation.h
*
* @brief A class for storing and accessing invocations, and invoking them.
*/
@interface OFInvocation: OFObject
{
OFMethodSignature *_methodSignature;
OFMutableArray OF_GENERIC(OFMutableData *) *_arguments;
OFMutableData *_returnValue;
OF_RESERVE_IVARS(OFInvocation, 4)
}
/**
* @brief The method signature for the invocation.
*/
@property (readonly, nonatomic) OFMethodSignature *methodSignature;
/**
* @brief Creates a new invocation with the specified method signature.
*
* @param signature The method signature for the invocation
* @return A new, autoreleased OFInvocation
*/
+ (instancetype)invocationWithMethodSignature: (OFMethodSignature *)signature;
/**
* @brief Initializes an already allocated invocation with the specified method
* signature.
*
* @param signature The method signature for the invocation
* @return An initialized OFInvocation
*/
- (instancetype)initWithMethodSignature: (OFMethodSignature *)signature;
/**
* @brief Sets the argument for the specified index.
*
* @param buffer The buffer in which the argument is stored
* @param index The index of the argument to set
*/
- (void)setArgument: (const void *)buffer
atIndex: (size_t)index;
/**
* @brief Gets the argument for the specified index.
*
* @param buffer The buffer in which the argument is stored
* @param index The index of the argument to get
*/
- (void)getArgument: (void *)buffer
atIndex: (size_t)index;
/**
* @brief Sets the return value.
*
* @param buffer The buffer in which the return value is stored
*/
- (void)setReturnValue: (const void *)buffer;
/**
* @brief Gets the return value.
*
* @param buffer The buffer in which the return value is stored
*/
- (void)getReturnValue: (void *)buffer;
#ifdef OF_INVOCATION_CAN_INVOKE
/**
* @brief Invokes the method.
*/
- (void)invoke;
#endif
@end
OF_ASSUME_NONNULL_END
|