// Copyright 1998-2000 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 "OHHTMLLink.h"

#import <Foundation/Foundation.h>
#import <OmniBase/OmniBase.h>
#import <OmniFoundation/OmniFoundation.h>
#import <OWF/OWF.h>
#import "OWScriptEventHandlerHolder.h"

RCS_ID("$Header: /Network/Source/CVS/OmniGroup/Frameworks/OmniHTML/View.subproj/OHHTMLLink.m,v 1.4 2000/01/20 00:28:03 kc Exp $")

@implementation OHHTMLLink

- init
{
    self = [super init];
    name = nil;
    address = nil;
    eventHandlers = [[OWScriptEventHandlerHolder allocWithZone:[self zone]] init];
    return self;
}

- (void)dealloc
{
    [address release];
    [name release];
    [eventHandlers release];
    [super dealloc];
}

- (OWAddress *)address;
{
    return address;
}

- (void)setAddress:(OWAddress *)anAddress;
{
    if (address == anAddress)
        return;
    [address release];
    address = [anAddress retain];
}

- (NSString *)name;
{
    return name;
}

- (void)setName:(NSString *)aString;
{
    if (name == aString)
        return;
    [name release];
    name = [aString retain];
}

- (OWScriptEventHandlerHolder *)eventHandlers
{
    return eventHandlers;
}

// Debugging

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

   debugDictionary = [super debugDictionary];
   if (address)
       [debugDictionary setObject:address forKey:@"address"];
   if (name)
       [debugDictionary setObject:name forKey:@"name"];
   [debugDictionary setObject:eventHandlers forKey:@"eventHandlers"];

   return debugDictionary;
}

@end



