Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (34 sloc) 0.678 kb
//
// KWFutureObject.m
// iOSFalconCore
//
// Created by Luke Redpath on 13/01/2011.
// Copyright 2011 LJR Software Limited. All rights reserved.
//
#import "KWFutureObject.h"
@implementation KWFutureObject
+ (id)objectWithObjectPointer:(id *)pointer;
{
return [self futureObjectWithBlock:^{ return *pointer; }];
}
+ (id)futureObjectWithBlock:(KWFutureObjectBlock)block;
{
return [[[self alloc] initWithBlock:block] autorelease];
}
- (id)initWithBlock:(KWFutureObjectBlock)aBlock;
{
if ((self = [super init])) {
block = [aBlock copy];
}
return self;
}
- (id)object;
{
return block();
}
- (void)dealloc
{
[block release];
[super dealloc];
}
@end
Jump to Line
Something went wrong with that request. Please try again.