Only get custom classes for --classes parameter add customClassInformation method to class manager

This commit is contained in:
Gregory John Casamento 2023-07-08 13:04:25 -04:00
parent b35ce5e205
commit b0e2483aae
3 changed files with 17 additions and 1 deletions

View file

@ -121,6 +121,7 @@
- (NSString *) classNameForObject: (id)object;
- (NSString *) findClassByName: (NSString *)name;
- (NSDictionary *) classInformation;
- (NSDictionary *) customClassInformation;
/* Parsing and creating classes */
- (BOOL) makeSourceAndHeaderFilesForClass: (NSString *)className

View file

@ -2265,6 +2265,21 @@
return classInformation;
}
- (NSDictionary *) customClassInformation
{
NSEnumerator *en = [customClasses objectEnumerator];
NSMutableDictionary *result = [NSMutableDictionary dictionary];
NSString *name = nil;
while ((name = [en nextObject]) != nil)
{
NSDictionary *o = [classInformation objectForKey: name];
[result setObject: o forKey: name];
}
return result;
}
- (NSString *) description
{
return [NSString stringWithFormat: @"<%s: %lx> = %@",

View file

@ -254,7 +254,7 @@
opt = [args objectForKey: @"--classes"];
if (opt != nil)
{
NSDictionary *classes = [[doc classManager] classInformation];
NSDictionary *classes = [[doc classManager] customClassInformation];
NSLog(@"classes = %@", classes);
}