Add placeholder for types that start with A, for _Atomic() types.
[class-dump.git] / Source / CDTypeController.h
blob85e9df3eb8a84f2fb26eccb81f149658e163a294
1 // -*- mode: ObjC -*-
3 // This file is part of class-dump, a utility for examining the Objective-C segment of Mach-O files.
4 // Copyright (C) 1997-2019 Steve Nygard.
6 @protocol CDTypeControllerDelegate;
8 @class CDClassDump, CDType, CDTypeFormatter;
10 @interface CDTypeController : NSObject
12 - (id)initWithClassDump:(CDClassDump *)classDump;
14 @property (weak) id <CDTypeControllerDelegate> delegate;
16 @property (readonly) CDTypeFormatter *ivarTypeFormatter;
17 @property (readonly) CDTypeFormatter *methodTypeFormatter;
18 @property (readonly) CDTypeFormatter *propertyTypeFormatter;
19 @property (readonly) CDTypeFormatter *structDeclarationTypeFormatter;
21 @property (nonatomic, readonly) BOOL shouldShowIvarOffsets;
22 @property (nonatomic, readonly) BOOL shouldShowMethodAddresses;
23 @property (nonatomic, readonly) BOOL targetArchUses64BitABI;
25 @property (nonatomic, assign) BOOL hasUnknownFunctionPointers;
26 @property (nonatomic, assign) BOOL hasUnknownBlocks;
28 - (CDType *)typeFormatter:(CDTypeFormatter *)typeFormatter replacementForType:(CDType *)type;
29 - (NSString *)typeFormatter:(CDTypeFormatter *)typeFormatter typedefNameForStructure:(CDType *)structureType level:(NSUInteger)level;
30 - (void)typeFormatter:(CDTypeFormatter *)typeFormatter didReferenceClassName:(NSString *)name;
31 - (void)typeFormatter:(CDTypeFormatter *)typeFormatter didReferenceProtocolNames:(NSArray *)names;
33 - (void)appendStructuresToString:(NSMutableString *)resultString;
35 // Phase 0 - initiated from -[CDClassDump registerTypes]
36 - (void)phase0RegisterStructure:(CDType *)structure usedInMethod:(BOOL)isUsedInMethod;
38 // Run phase 1+
39 - (void)workSomeMagic;
41 // Phase 1
42 - (void)phase1RegisterStructure:(CDType *)structure;
44 - (void)endPhase:(NSUInteger)phase;
46 - (CDType *)phase2ReplacementForType:(CDType *)type;
48 - (void)phase3RegisterStructure:(CDType *)structure;
49 - (CDType *)phase3ReplacementForType:(CDType *)type;
51 - (BOOL)shouldShowName:(NSString *)name;
52 - (BOOL)shouldExpandType:(CDType *)type;
53 - (NSString *)typedefNameForType:(CDType *)type;
55 @end
57 #pragma mark -
59 @protocol CDTypeControllerDelegate <NSObject>
60 @optional
61 - (void)typeController:(CDTypeController *)typeController didReferenceClassName:(NSString *)name;
62 - (void)typeController:(CDTypeController *)typeController didReferenceProtocolNames:(NSArray *)names;
63 @end