class-dump/Source/CDOCSymtab.m

47 lines
904 B
Mathematica
Raw Permalink Normal View History

2009-06-23 22:31:13 +00:00
// -*- mode: ObjC -*-
// 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
#import "CDOCSymtab.h"
#import "CDOCCategory.h"
#import "CDOCClass.h"
@implementation CDOCSymtab
{
NSMutableArray *_classes;
NSMutableArray *_categories;
}
- (id)init;
{
if ((self = [super init])) {
_classes = [[NSMutableArray alloc] init];
_categories = [[NSMutableArray alloc] init];
}
return self;
}
2011-06-19 00:50:16 +00:00
#pragma mark - Debugging
- (NSString *)description;
{
2011-06-19 00:50:16 +00:00
return [NSString stringWithFormat:@"[%@] classes: %@, categories: %@", NSStringFromClass([self class]), self.classes, self.categories];
}
2011-06-19 00:50:16 +00:00
#pragma mark -
- (void)addClass:(CDOCClass *)aClass;
{
2011-06-19 00:50:16 +00:00
[self.classes addObject:aClass];
}
- (void)addCategory:(CDOCCategory *)category;
{
[self.categories addObject:category];
}
@end