-
Notifications
You must be signed in to change notification settings - Fork 189
/
RTProperty.h
57 lines (46 loc) · 1.65 KB
/
RTProperty.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
typedef enum
{
RTPropertySetterSemanticsAssign,
RTPropertySetterSemanticsRetain,
RTPropertySetterSemanticsCopy
}
RTPropertySetterSemantics;
@interface RTProperty : NSObject
{
}
+ (id)propertyWithObjCProperty: (objc_property_t)property;
+ (id)propertyWithName: (NSString *)name attributes:(NSDictionary *)attributes;
- (id)initWithObjCProperty: (objc_property_t)property;
- (id)initWithName: (NSString *)name attributes:(NSDictionary *)attributes;
- (NSDictionary *)attributes;
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
- (BOOL)addToClass:(Class)classToAddTo;
#endif
- (NSString *)attributeEncodings;
- (BOOL)isReadOnly;
- (RTPropertySetterSemantics)setterSemantics;
- (BOOL)isNonAtomic;
- (BOOL)isDynamic;
- (BOOL)isWeakReference;
- (BOOL)isEligibleForGarbageCollection;
- (SEL)customGetter;
- (SEL)customSetter;
- (NSString *)name;
- (NSString *)typeEncoding;
- (NSString *)oldTypeEncoding;
- (NSString *)ivarName;
@end
extern NSString * const RTPropertyTypeEncodingAttribute;
extern NSString * const RTPropertyBackingIVarNameAttribute;
extern NSString * const RTPropertyCopyAttribute;
extern NSString * const RTPropertyRetainAttribute;
extern NSString * const RTPropertyCustomGetterAttribute;
extern NSString * const RTPropertyCustomSetterAttribute;
extern NSString * const RTPropertyDynamicAttribute;
extern NSString * const RTPropertyEligibleForGarbageCollectionAttribute;
extern NSString * const RTPropertyNonAtomicAttribute;
extern NSString * const RTPropertyOldTypeEncodingAttribute;
extern NSString * const RTPropertyReadOnlyAttribute;
extern NSString * const RTPropertyWeakReferenceAttribute;