OLD | NEW |
(Empty) | |
| 1 // -*- mode: ObjC -*- |
| 2 |
| 3 // This file is part of class-dump, a utility for examining the Objective-C seg
ment of Mach-O files. |
| 4 // Copyright (C) 1997-1998, 2000-2001, 2004-2010 Steve Nygard. |
| 5 |
| 6 #import <Foundation/Foundation.h> |
| 7 |
| 8 @class CDClassDump, CDType, CDStructureInfo, CDSymbolReferences, CDTypeControlle
r, CDTypeFormatter; |
| 9 |
| 10 enum { |
| 11 CDTableTypeStructure = 0, |
| 12 CDTableTypeUnion = 1, |
| 13 }; |
| 14 typedef NSUInteger CDTableType; |
| 15 |
| 16 @interface CDStructureTable : NSObject |
| 17 { |
| 18 NSString *identifier; |
| 19 NSString *anonymousBaseName; |
| 20 |
| 21 // Phase 0 - top level |
| 22 NSMutableDictionary *phase0_structureInfo; // key: NSString (typeString), va
lue: CDStructureInfo |
| 23 |
| 24 // Phase 1 - all substructures |
| 25 NSMutableDictionary *phase1_structureInfo; // key: NSString (typeString), va
lue: CDStructureInfo |
| 26 NSUInteger phase1_maxDepth; |
| 27 NSMutableDictionary *phase1_groupedByDepth; // key: NSNumber (structureDepth
), value: NSMutableArray of CDStructureInfo |
| 28 |
| 29 // Phase 2 - merging all structure bottom up |
| 30 NSMutableDictionary *phase2_namedStructureInfo; // key: NSString (name), val
ue: CDStructureInfo |
| 31 NSMutableDictionary *phase2_anonStructureInfo; // key: NSString (reallyBareT
ypeString), value: CDStructureInfo |
| 32 NSMutableArray *phase2_nameExceptions; // Of CDStructureInfo |
| 33 NSMutableArray *phase2_anonExceptions; // Of CDStructureInfo |
| 34 |
| 35 // Phase 3 - merged reference counts from updated phase0 types |
| 36 NSMutableDictionary *phase3_namedStructureInfo; // key: NSString (name), val
ue: CDStructureInfo |
| 37 NSMutableDictionary *phase3_anonStructureInfo; // key: NSString (reallyBareT
ypeString), value: CDStructureInfo |
| 38 |
| 39 NSMutableDictionary *phase3_nameExceptions; // key: NSString (typeString), v
alue: CDStructureInfo |
| 40 NSMutableDictionary *phase3_anonExceptions; // key: NSString (typeString), v
alue: CDStructureInfo |
| 41 |
| 42 NSMutableSet *phase3_exceptionalNames; // Of NSString |
| 43 NSMutableSet *phase3_inMethodNameExceptions; // Of NSString |
| 44 |
| 45 struct { |
| 46 unsigned int shouldDebug:1; |
| 47 } flags; |
| 48 |
| 49 NSMutableSet *debugNames; // NSString (name) |
| 50 NSMutableSet *debugAnon; // NSString (reallyBareTypeString) |
| 51 } |
| 52 |
| 53 - (id)init; |
| 54 - (void)dealloc; |
| 55 |
| 56 - (NSString *)identifier; |
| 57 - (void)setIdentifier:(NSString *)newIdentifier; |
| 58 |
| 59 - (NSString *)anonymousBaseName; |
| 60 - (void)setAnonymousBaseName:(NSString *)newName; |
| 61 |
| 62 - (BOOL)shouldDebug; |
| 63 - (void)setShouldDebug:(BOOL)newFlag; |
| 64 |
| 65 // Phase 0 |
| 66 - (void)phase0RegisterStructure:(CDType *)aStructure usedInMethod:(BOOL)isUsedIn
Method; |
| 67 - (void)finishPhase0; |
| 68 - (void)logPhase0Info; |
| 69 |
| 70 // Phase 1 |
| 71 - (void)phase1WithTypeController:(CDTypeController *)typeController; |
| 72 - (void)phase1RegisterStructure:(CDType *)aStructure; |
| 73 - (void)finishPhase1; |
| 74 - (NSUInteger)phase1_maxDepth; |
| 75 |
| 76 // Phase 2 |
| 77 - (void)phase2AtDepth:(NSUInteger)depth typeController:(CDTypeController *)typeC
ontroller; |
| 78 - (CDType *)phase2ReplacementForType:(CDType *)type; |
| 79 |
| 80 - (void)finishPhase2; |
| 81 - (void)logPhase2Info; |
| 82 |
| 83 // Phase 3 |
| 84 - (void)phase2ReplacementOnPhase0WithTypeController:(CDTypeController *)typeCont
roller; |
| 85 |
| 86 - (void)buildPhase3Exceptions; |
| 87 - (void)phase3WithTypeController:(CDTypeController *)typeController; |
| 88 - (void)phase3RegisterStructure:(CDType *)aStructure |
| 89 count:(NSUInteger)referenceCount |
| 90 usedInMethod:(BOOL)isUsedInMethod |
| 91 typeController:(CDTypeController *)typeController; |
| 92 - (void)finishPhase3; |
| 93 - (void)logPhase3Info; |
| 94 - (CDType *)phase3ReplacementForType:(CDType *)type; |
| 95 |
| 96 // Other |
| 97 |
| 98 - (void)appendNamedStructuresToString:(NSMutableString *)resultString |
| 99 formatter:(CDTypeFormatter *)aTypeFormatter |
| 100 symbolReferences:(CDSymbolReferences *)symbolReferences |
| 101 markName:(NSString *)markName; |
| 102 |
| 103 - (void)appendTypedefsToString:(NSMutableString *)resultString |
| 104 formatter:(CDTypeFormatter *)aTypeFormatter |
| 105 symbolReferences:(CDSymbolReferences *)symbolReferences |
| 106 markName:(NSString *)markName; |
| 107 |
| 108 - (void)generateTypedefNames; |
| 109 - (void)generateMemberNames; |
| 110 |
| 111 - (BOOL)shouldExpandStructureInfo:(CDStructureInfo *)info; |
| 112 - (BOOL)shouldExpandType:(CDType *)type; |
| 113 - (NSString *)typedefNameForType:(CDType *)type; |
| 114 |
| 115 - (void)debugName:(NSString *)name; |
| 116 - (void)debugAnon:(NSString *)str; |
| 117 |
| 118 @end |
OLD | NEW |