#import <Cocoa/Cocoa.h>
#import "Greeter.h"

void greetTheWorld(void) {
    Greeter * worldGreeter = [[Greeter alloc] init];
    [worldGreeter sayHello];
    [worldGreeter release];
}

// START:code.objects.greetperson
void greetAPerson(NSString * personName) {
    Greeter * personGreeter = [[Greeter alloc] initWithName:personName];
    [personGreeter sayHello];
    [personGreeter release];
}
// END:code.objects.greetperson

// START:code.objects.callgreetperson
int main(int argc, char *argv[])
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    greetTheWorld();
    // START_HIGHLIGHT
    greetAPerson(@"Daniel");
    // END_HIGHLIGHT
    [pool release];
    return NSApplicationMain(argc,  (const char **) argv);
}
//END:code.objects.callgreetperson
