2015-01-31 02:39:38 +03:00

38 lines
548 B
Objective-C

#import "SEvent.h"
@implementation SEvent
- (instancetype)initWithNext:(id)next
{
self = [super init];
if (self != nil)
{
_type = SEventTypeNext;
_data = next;
}
return self;
}
- (instancetype)initWithError:(id)error
{
self = [super init];
if (self != nil)
{
_type = SEventTypeError;
_data = error;
}
return self;
}
- (instancetype)initWithCompleted
{
self = [super init];
if (self != nil)
{
_type = SEventTypeCompleted;
}
return self;
}
@end