Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 44 lines (34 sloc) 0.678 kb
c089783 Ported my AssertEventually macro[1] to the Kiwi API, for testing of asyn...
Luke Redpath authored
1 //
2 // KWFutureObject.m
3 // iOSFalconCore
4 //
5 // Created by Luke Redpath on 13/01/2011.
6 // Copyright 2011 LJR Software Limited. All rights reserved.
7 //
8
9 #import "KWFutureObject.h"
10
11
12 @implementation KWFutureObject
13
14 + (id)objectWithObjectPointer:(id *)pointer;
15 {
cfdc8be @lukeredpath Deprecated pointer-based future values; a block implementation is all th...
lukeredpath authored
16 return [self futureObjectWithBlock:^{ return *pointer; }];
c089783 Ported my AssertEventually macro[1] to the Kiwi API, for testing of asyn...
Luke Redpath authored
17 }
18
cfdc8be @lukeredpath Deprecated pointer-based future values; a block implementation is all th...
lukeredpath authored
19 + (id)futureObjectWithBlock:(KWFutureObjectBlock)block;
35b9d8c The theObject() construct is only useful for pointers to an object, but ...
Luke Redpath authored
20 {
21 return [[[self alloc] initWithBlock:block] autorelease];
22 }
23
24 - (id)initWithBlock:(KWFutureObjectBlock)aBlock;
25 {
08b42ce Fix assignment warning
Luke Redpath authored
26 if ((self = [super init])) {
35b9d8c The theObject() construct is only useful for pointers to an object, but ...
Luke Redpath authored
27 block = [aBlock copy];
28 }
29 return self;
30 }
31
c089783 Ported my AssertEventually macro[1] to the Kiwi API, for testing of asyn...
Luke Redpath authored
32 - (id)object;
33 {
cfdc8be @lukeredpath Deprecated pointer-based future values; a block implementation is all th...
lukeredpath authored
34 return block();
c089783 Ported my AssertEventually macro[1] to the Kiwi API, for testing of asyn...
Luke Redpath authored
35 }
36
35b9d8c The theObject() construct is only useful for pointers to an object, but ...
Luke Redpath authored
37 - (void)dealloc
38 {
39 [block release];
40 [super dealloc];
41 }
42
c089783 Ported my AssertEventually macro[1] to the Kiwi API, for testing of asyn...
Luke Redpath authored
43 @end
Something went wrong with that request. Please try again.