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
;
39 - (void)workSomeMagic
;
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
;
59 @protocol CDTypeControllerDelegate
<NSObject
>
61 - (void)typeController
:(CDTypeController
*)typeController didReferenceClassName
:(NSString
*)name
;
62 - (void)typeController
:(CDTypeController
*)typeController didReferenceProtocolNames
:(NSArray
*)names
;