forked from Naville/class-dump-utf8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CDOCModule.m
82 lines (62 loc) · 1.29 KB
/
CDOCModule.m
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
// -*- mode: ObjC -*-
// 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-2009 Steve Nygard.
#import "CDOCModule.h"
#import <Foundation/Foundation.h>
#import "CDObjectiveC1Processor.h"
#import "CDOCSymtab.h"
@implementation CDOCModule
- (id)init;
{
if ([super init] == nil)
return nil;
version = 0;
name = nil;
symtab = nil;
return self;
}
- (void)dealloc;
{
[name release];
[symtab release];
[super dealloc];
}
- (uint32_t)version;
{
return version;
}
- (void)setVersion:(uint32_t)aVersion;
{
version = aVersion;
}
- (NSString *)name;
{
return name;
}
- (void)setName:(NSString *)newName;
{
if (newName == name)
return;
[name release];
name = [newName retain];
}
- (CDOCSymtab *)symtab;
{
return symtab;
}
- (void)setSymtab:(CDOCSymtab *)newSymtab;
{
if (newSymtab == symtab)
return;
[symtab release];
symtab = [newSymtab retain];
}
- (NSString *)description;
{
return [NSString stringWithFormat:@"[%@] name: %@, version: %u, symtab: %@", NSStringFromClass([self class]), name, version, symtab];
}
- (NSString *)formattedString;
{
return [NSString stringWithFormat:@"/*\n * %@\n */\n", name];
}
@end