// Copyright 1997-1999 Omni Development, Inc.  All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
// distributed with this project and can also be found at
// http://www.omnigroup.com/DeveloperResources/OmniSourceLicense.html.

#import "OWDataStreamProcessor.h"

#import <Foundation/Foundation.h>
#import <OmniBase/OmniBase.h>
#import <OmniFoundation/OmniFoundation.h>

#import "OWDataStream.h"
#import "OWDataStreamCursor.h"
#import "OWPipeline.h"

RCS_ID("$Header: /Network/Source/CVS/OmniGroup/Frameworks/OWF/Processors.subproj/OWDataStreamProcessor.m,v 1.4 1999/03/30 21:26:32 kc Exp $")

@implementation OWDataStreamProcessor

// Init and dealloc

- initWithPipeline:(OWPipeline *)aPipeline;
{
    if (![super initWithPipeline:aPipeline])
        return nil;

    dataCursor = [[(id <OWOptionalContent>)[pipeline lastContent] contentCursor] retain];
    if (!dataCursor) {
        [self release];
        return nil;
    }

    return self;
}

- (void)dealloc;
{
    [dataCursor release];
    [super dealloc];
}

// OWProcessor subclass

- (void)abortProcessing;
{
    [dataCursor abort];
    [super abortProcessing];
}

// Debugging

- (NSMutableDictionary *)debugDictionary;
{
    NSMutableDictionary *debugDictionary;

    debugDictionary = [super debugDictionary];
    if (dataCursor)
        [debugDictionary setObject:dataCursor forKey:@"dataCursor"];

    return debugDictionary;
}

@end
