Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 54 lines (37 sloc) 0.913 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
//
// Licensed under the terms in License.txt
//
// Copyright 2010 Allen Ding. All rights reserved.
//

#import "KWBlockNode.h"

@implementation KWBlockNode

@synthesize description = _description;

#pragma mark -
#pragma mark Initializing

- (id)initWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(KWVoidBlock)aBlock{
    if ((self = [super init])) {
        callSite = [aCallSite retain];
        _description = [aDescription copy];

        if (aBlock != nil)
            block = Block_copy(aBlock);
    }

    return self;
}

- (void)dealloc {
    [callSite release];
    [description release];

    if (block != nil)
        Block_release(block);

    [super dealloc];
}

- (void)performBlock
{
  if (block != nil) { block(); }
}

#pragma mark -
#pragma mark Getting Call Sites

@synthesize callSite;

#pragma mark -
#pragma mark Accepting Visitors

@synthesize block;

@end
Something went wrong with that request. Please try again.