//
//  keyInfo.m
//  DictionaryViewer
//
//  Created by Allanon on 18/08/06.
//  Copyright 2006 __MyCompanyName__. All rights reserved.
//

#import "keyInfo.h"


@implementation KeyInfo

@synthesize key;
@synthesize val;
@synthesize reason;

- (id)initWithKeyValReason:(const char *)keyVal:(const char *)valVal:(CPhidgetDictionary_keyChangeReason)reasonVal
{
	if(self = [super init])
	{
		self.key = [NSString stringWithCString:keyVal];
		self.val = [NSString stringWithCString:valVal];
		reason = reasonVal;
	}
	return self;
}
- (BOOL)isEqual:(id)anObject{
	if ([key isEqual:[anObject key]]) return true;
	return false;
}
- (NSComparisonResult)compareKey:(KeyInfo *)aKeyInfo
{
    return [key compare:[aKeyInfo key]];
}
- (void) dealloc
{
    [key release];
    [val release];
    [super dealloc];
}

@end
