Sha256: 140b0758c0e8a8e93aa69f1c0b18bcb9a62d4e208b55cdaa038b075e7797b940
Contents?: true
Size: 1.16 KB
Versions: 1
Compression:
Stored size: 1.16 KB
Contents
#import "SQLite3FactoryBase.h" #import "SQLite3.h" #import "SQLite3Singleton.h" @implementation SQLite3FactoryBase -(id)init { self = [super init]; mSQLite3Instances = [[NSMutableDictionary dictionaryWithCapacity:4] retain]; mSQLite3Singleton = nil; return self; } -(id<ISQLite3>) getSQLite3ByID:(NSString*)ID { id<ISQLite3> obj = (SQLite3*)[mSQLite3Instances objectForKey:ID]; if (obj == nil) { obj = [self createSQLite3ByID:ID]; [mSQLite3Instances setObject:obj forKey:ID]; } return obj; } -(void) destroyObjectByID:(NSString*)ID { SQLite3* obj = [mSQLite3Instances objectForKey:ID]; if (obj != nil) { [mSQLite3Instances removeObjectForKey:ID]; } } -(id<ISQLite3>)createSQLite3ByID:(NSString*)ID { SQLite3* obj = [[SQLite3 alloc] init]; return obj; } -(id<ISQLite3Singleton>) getSQLite3Singleton { if (mSQLite3Singleton == nil) { mSQLite3Singleton = [[SQLite3Singleton alloc] init]; } return mSQLite3Singleton; } -(NSArray*) enumerateSQLite3Instances { return [mSQLite3Instances allKeys]; } -(void)dealloc { [mSQLite3Instances release]; [super dealloc]; } @end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tauplatform-1.0.1 | lib/commonAPI/coreapi/ext/platform/iphone/generated/base_impl/SQLite3FactoryBase.m |