forked from nygard/class-dump
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCDClassDump.h
More file actions
144 lines (101 loc) · 4.44 KB
/
CDClassDump.h
File metadata and controls
144 lines (101 loc) · 4.44 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// This file is part of class-dump, a utility for examining the Objective-C segment of Mach-O files.
// Copyright (C) 1997-1998, 2000-2001, 2004-2006 Steve Nygard
#import <Foundation/NSObject.h>
#include <sys/types.h>
#include <mach/machine.h> // for cpu_type_t
#include <regex.h>
#import "CDStructureRegistrationProtocol.h"
#define CLASS_DUMP_VERSION @"3.1.1"
@class NSMutableArray, NSMutableDictionary, NSMutableSet, NSMutableString, NSString;
@class CDDylibCommand, CDMachOFile;
@class CDStructureTable, CDSymbolReferences, CDType, CDTypeFormatter;
@interface CDClassDump : NSObject <CDStructureRegistration>
{
NSString *executablePath;
struct {
unsigned int shouldProcessRecursively:1;
unsigned int shouldGenerateSeparateHeaders:1;
unsigned int shouldSortClasses:1; // And categories, protocols
unsigned int shouldSortClassesByInheritance:1; // And categories, protocols
unsigned int shouldSortMethods:1;
unsigned int shouldShowIvarOffsets:1;
unsigned int shouldShowMethodAddresses:1;
unsigned int shouldMatchRegex:1;
unsigned int shouldShowHeader:1;
unsigned int shouldGenerateXML:1;
} flags;
regex_t compiledRegex;
NSString *outputPath;
NSMutableDictionary *machOFilesByID;
NSMutableArray *objCSegmentProcessors;
CDStructureTable *structureTable;
CDStructureTable *unionTable;
CDTypeFormatter *ivarTypeFormatter;
CDTypeFormatter *methodTypeFormatter;
CDTypeFormatter *structDeclarationTypeFormatter;
NSMutableDictionary *frameworkNamesByClassName;
cpu_type_t preferredCPUType;
}
+ (void)initialize;
+ (BOOL)isWrapperAtPath:(NSString *)path;
+ (NSString *)pathToMainFileOfWrapper:(NSString *)wrapperPath;
+ (NSString *)adjustUserSuppliedPath:(NSString *)path;
- (id)init;
- (void)dealloc;
- (NSString *)executablePath;
- (void)setExecutablePath:(NSString *)newPath;
- (BOOL)shouldProcessRecursively;
- (void)setShouldProcessRecursively:(BOOL)newFlag;
- (BOOL)shouldGenerateSeparateHeaders;
- (void)setShouldGenerateSeparateHeaders:(BOOL)newFlag;
- (BOOL)shouldSortClasses;
- (void)setShouldSortClasses:(BOOL)newFlag;
- (BOOL)shouldSortClassesByInheritance;
- (void)setShouldSortClassesByInheritance:(BOOL)newFlag;
- (BOOL)shouldSortMethods;
- (void)setShouldSortMethods:(BOOL)newFlag;
- (BOOL)shouldShowIvarOffsets;
- (void)setShouldShowIvarOffsets:(BOOL)newFlag;
- (BOOL)shouldShowMethodAddresses;
- (void)setShouldShowMethodAddresses:(BOOL)newFlag;
- (BOOL)shouldMatchRegex;
- (void)setShouldMatchRegex:(BOOL)newFlag;
- (BOOL)shouldShowHeader;
- (void)setShouldShowHeader:(BOOL)newFlag;
- (BOOL)shouldGenerateXML;
- (void)setShouldGenerateXML:(BOOL)newFlag;
- (BOOL)setRegex:(char *)regexCString errorMessage:(NSString **)errorMessagePointer;
- (BOOL)regexMatchesString:(NSString *)aString;
- (NSString *)outputPath;
- (void)setOutputPath:(NSString *)aPath;
- (cpu_type_t)preferredCPUType;
- (void)setPreferredCPUType:(cpu_type_t)aPreferredCPUType;
- (BOOL)containsObjectiveCSegments;
- (CDStructureTable *)structureTable;
- (CDStructureTable *)unionTable;
- (CDTypeFormatter *)ivarTypeFormatter;
- (CDTypeFormatter *)methodTypeFormatter;
- (CDTypeFormatter *)structDeclarationTypeFormatter;
- (BOOL)processFilename:(NSString *)aFilename;
- (BOOL)_processFilename:(NSString *)aFilename;
- (void)generateOutput;
- (void)generateXMLToStandardOut;
- (void)generateToStandardOut;
- (void)generateSeparateHeaders;
- (void)generateStructureHeader;
- (void)logInfo;
- (void)appendStructuresToString:(NSMutableString *)resultString symbolReferences:(CDSymbolReferences *)symbolReferences;
- (CDMachOFile *)machOFileWithID:(NSString *)anID;
- (void)machOFile:(CDMachOFile *)aMachOFile loadDylib:(CDDylibCommand *)aDylibCommand;
- (void)appendHeaderToString:(NSMutableString *)resultString;
- (CDType *)typeFormatter:(CDTypeFormatter *)aFormatter replacementForType:(CDType *)aType;
- (NSString *)typeFormatter:(CDTypeFormatter *)aFormatter typedefNameForStruct:(CDType *)structType level:(int)level;
- (void)registerPhase:(int)phase;
- (void)endPhase:(int)phase;
- (void)phase1RegisterStructure:(CDType *)aStructure;
- (BOOL)phase2RegisterStructure:(CDType *)aStructure usedInMethod:(BOOL)isUsedInMethod countReferences:(BOOL)shouldCountReferences;
- (void)generateMemberNames;
- (void)buildClassFrameworks;
- (NSString *)frameworkForClassName:(NSString *)aClassName;
- (void)appendImportForClassName:(NSString *)aClassName toString:(NSMutableString *)resultString;
@end