ObjFW
Loading...
Searching...
No Matches
OFInvocation.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20#import "OFObject.h"
21
22OF_ASSUME_NONNULL_BEGIN
23
25@class OFMutableArray OF_GENERIC(ObjectType);
26@class OFMutableData;
27
33OF_SUBCLASSING_RESTRICTED
35{
36 OFMethodSignature *_methodSignature;
37 OFMutableArray OF_GENERIC(OFMutableData *) *_arguments;
38 OFMutableData *_returnValue;
39}
40
44@property (readonly, nonatomic) OFMethodSignature *methodSignature;
45
52+ (instancetype)invocationWithMethodSignature: (OFMethodSignature *)signature;
53
61- (instancetype)initWithMethodSignature: (OFMethodSignature *)signature;
62
69- (void)setArgument: (const void *)buffer atIndex: (size_t)index;
70
77- (void)getArgument: (void *)buffer atIndex: (size_t)index;
78
84- (void)setReturnValue: (const void *)buffer;
85
91- (void)getReturnValue: (void *)buffer;
92@end
93
94OF_ASSUME_NONNULL_END
A class for storing and accessing invocations, and invoking them.
Definition OFInvocation.h:35
A class for parsing type encodings and accessing them.
Definition OFMethodSignature.h:33
An abstract class for storing, adding and removing objects in an array.
Definition OFMutableArray.h:48
A class for storing and manipulating arbitrary data in an array.
Definition OFMutableData.h:30
The root class for all other classes inside ObjFW.
Definition OFObject.h:692