ObjFW
Loading...
Searching...
No Matches
OFMethodSignature.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This file is part of ObjFW. It may be distributed under the terms of the
7 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8 * the packaging of this file.
9 *
10 * Alternatively, it may be distributed under the terms of the GNU General
11 * Public License, either version 2 or 3, which can be found in the file
12 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13 * file.
14 */
15
16#import "OFObject.h"
17
18OF_ASSUME_NONNULL_BEGIN
19
20@class OFMutableData;
21
27OF_SUBCLASSING_RESTRICTED
29{
30 char *_types;
31 OFMutableData *_typesPointers, *_offsets;
32}
33
37@property (readonly, nonatomic) size_t numberOfArguments;
38
42@property (readonly, nonatomic) const char *methodReturnType;
43
49@property (readonly, nonatomic) size_t frameLength;
50
58+ (instancetype)signatureWithObjCTypes: (const char *)types;
59
60- (instancetype)init OF_UNAVAILABLE;
61
70- (instancetype)initWithObjCTypes: (const char *)types
71 OF_DESIGNATED_INITIALIZER;
72
79- (const char *)argumentTypeAtIndex: (size_t)index;
80
90- (size_t)argumentOffsetAtIndex: (size_t)index;
91@end
92
93#ifdef __cplusplus
94extern "C" {
95#endif
103extern size_t OFSizeOfTypeEncoding(const char *type);
104
112extern size_t OFAlignmentOfTypeEncoding(const char *type);
113#ifdef __cplusplus
114}
115#endif
116
117OF_ASSUME_NONNULL_END
A class for parsing type encodings and accessing them.
Definition OFMethodSignature.h:29
A class for storing and manipulating arbitrary data in an array.
Definition OFMutableData.h:26
The root class for all other classes inside ObjFW.
Definition OFObject.h:688