2009-06-23 22:31:13 +00:00
|
|
|
// -*- mode: ObjC -*-
|
|
|
|
|
2005-08-13 20:32:02 +00:00
|
|
|
// This file is part of class-dump, a utility for examining the Objective-C segment of Mach-O files.
|
2019-03-02 06:56:10 +00:00
|
|
|
// Copyright (C) 1997-2019 Steve Nygard.
|
2004-01-06 01:52:00 +00:00
|
|
|
|
2003-12-09 01:50:32 +00:00
|
|
|
#import "CDOCSymtab.h"
|
|
|
|
|
2004-02-02 22:19:00 +00:00
|
|
|
#import "CDOCCategory.h"
|
2004-02-02 19:46:44 +00:00
|
|
|
#import "CDOCClass.h"
|
2003-12-09 01:50:32 +00:00
|
|
|
|
|
|
|
@implementation CDOCSymtab
|
2012-02-23 10:28:37 +00:00
|
|
|
{
|
2012-07-16 04:10:34 +00:00
|
|
|
NSMutableArray *_classes;
|
|
|
|
NSMutableArray *_categories;
|
2012-02-23 10:28:37 +00:00
|
|
|
}
|
2003-12-09 01:50:32 +00:00
|
|
|
|
|
|
|
- (id)init;
|
|
|
|
{
|
2011-05-13 08:56:08 +00:00
|
|
|
if ((self = [super init])) {
|
2012-07-16 04:10:34 +00:00
|
|
|
_classes = [[NSMutableArray alloc] init];
|
|
|
|
_categories = [[NSMutableArray alloc] init];
|
2011-05-13 08:56:08 +00:00
|
|
|
}
|
2004-01-05 21:01:25 +00:00
|
|
|
|
2003-12-09 01:50:32 +00:00
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2011-06-19 00:50:16 +00:00
|
|
|
#pragma mark - Debugging
|
|
|
|
|
|
|
|
- (NSString *)description;
|
2003-12-09 07:01:13 +00:00
|
|
|
{
|
2011-06-19 00:50:16 +00:00
|
|
|
return [NSString stringWithFormat:@"[%@] classes: %@, categories: %@", NSStringFromClass([self class]), self.classes, self.categories];
|
2003-12-09 07:01:13 +00:00
|
|
|
}
|
|
|
|
|
2011-06-19 00:50:16 +00:00
|
|
|
#pragma mark -
|
|
|
|
|
2007-06-14 10:07:26 +00:00
|
|
|
- (void)addClass:(CDOCClass *)aClass;
|
2003-12-09 07:01:13 +00:00
|
|
|
{
|
2011-06-19 00:50:16 +00:00
|
|
|
[self.classes addObject:aClass];
|
2003-12-09 07:01:13 +00:00
|
|
|
}
|
|
|
|
|
2012-07-16 10:20:50 +00:00
|
|
|
- (void)addCategory:(CDOCCategory *)category;
|
2003-12-09 07:01:13 +00:00
|
|
|
{
|
2012-07-16 10:20:50 +00:00
|
|
|
[self.categories addObject:category];
|
2003-12-09 07:01:13 +00:00
|
|
|
}
|
|
|
|
|
2003-12-09 01:50:32 +00:00
|
|
|
@end
|