Sha256: c3ab7a807c6758f9006630d5140e8306a0bbddeae8e2d72ada87ffb0772f2bc1

Contents?: true

Size: 1.76 KB

Versions: 34

Compression:

Stored size: 1.76 KB

Contents

//
//  Notification.m
//  PureMVC_ObjectiveC
//
//  PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
//  PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
//

#import "Notification.h"


@implementation Notification

@synthesize name, body, type;

/**
 * Static Convienence Constructor. 
 * 
 * @param name name of the <code>Notification</code> instance.
 * @param body the <code>Notification</code> body.
 * @param type the type of the <code>Notification</code>
 */
+(id)withName:(NSString *)name body:(id)body type:(NSString *)type {
	return [[[self alloc] initWithName:name body:body type:type] autorelease];
}

+(id)withName:(NSString *)name {
	return [[[self alloc] initWithName:name body:nil type:nil] autorelease];
}

+(id)withName:(NSString *)name body:(id)body {
	return [[[self alloc] initWithName:name body:body type:nil] autorelease];
}

+(id)withName:(NSString *)name type:(NSString *)type {
	return [[[self alloc] initWithName:name body:nil type:type] autorelease];
}

/**
 * Constructor. 
 * 
 * @param name name of the <code>Notification</code> instance.
 * @param body the <code>Notification</code> body.
 * @param type the type of the <code>Notification</code>
 */
-(id)initWithName:(NSString *)_name body:(id)_body type:(NSString *)_type {
	if (self = [super init]) {
		self.name = _name;
		self.body = _body;
		self.type = _type;
	}
	return self;
}

/**
 * Get the string representation of the <code>Notification</code> instance.
 * 
 * @return the string representation of the <code>Notification</code> instance.
 */
-(NSString *)description {
	return [NSString stringWithFormat:@"Notification Name: %@ \nBody:%@ \nType:%@", name, body, type];
}

-(void)dealloc {
	self.name = nil;
	self.body = nil;
	self.type = nil;
	[super dealloc];
}

@end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
appjam-0.1.8.11 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.10 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.9 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.8 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.7 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.6 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.5 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.4 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.3 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.2 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.1 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.pre13 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.pre12 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.pre11 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.pre10 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.pre9 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.pre7 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.pre6 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m
appjam-0.1.8.pre5 lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/observer/Notification.m