1
0
mirror of https://github.com/thes3m/XNI synced 2024-12-26 13:26:06 +01:00
XNI/Classes/Retronator/Xni/Framework/GameServiceContainer.m
Matej Jan fbfd1e7ab6 Adding game host and game classes.
git-svn-id: http://xni.googlecode.com/svn/XNI@8 ac433895-eea3-a490-d80a-17149a75e588
2010-07-27 13:42:07 +00:00

41 lines
755 B
Objective-C

//
// GameServiceContainer.m
// XNI
//
// Created by Matej Jan on 27.7.10.
// Copyright 2010 Retronator. All rights reserved.
//
#import "GameServiceContainer.h"
@implementation GameServiceContainer
- (id) init {
if (self = [super init]) {
services = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
}
return self;
}
- (void)addService:(id)provider ofType:(id)type {
CFDictionarySetValue(services, type, provider);
}
- (id)getServiceOfType:(id)type {
return (id)CFDictionaryGetValue(services, type);
}
- (void)removeServiceOfType:(id)type {
CFDictionaryRemoveValue(services, type);
}
- (void) dealloc
{
CFRelease(services);
[super dealloc];
}
@end