Cog/Plugins/GME/GamePropertiesReader.m

44 lines
705 B
Mathematica
Raw Normal View History

2007-10-11 19:11:58 -04:00
//
// GamePropertiesReader.m
// GME
//
// Created by Vincent Spader on 10/10/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import "GamePropertiesReader.h"
#import "GameDecoder.h"
@implementation GamePropertiesReader
+ (NSDictionary *)propertiesForSource:(id<CogSource>)source
{
NSDictionary *properties;
GameDecoder *decoder;
decoder = [[GameDecoder alloc] init];
if (![decoder open:source])
{
NSLog(@"Could not open");
2007-10-13 03:51:42 -04:00
[decoder release];
2007-10-11 19:11:58 -04:00
return nil;
}
properties = [decoder properties];
NSLog(@"Properties! %@", properties);
[decoder close];
[decoder release];
return properties;
}
+ (NSArray *)fileTypes
{
return [GameDecoder fileTypes];
}
@end