Created
July 2, 2010 22:08
-
-
Save abutcher/461971 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// dllist.m | |
// doublylinkedlist | |
// | |
// Created by Andrew Butcher on 3/20/10. | |
// Copyright 2010 West Virginia University. All rights reserved. | |
// | |
#import "dllist.h" | |
@implementation dllist | |
-(id) init { | |
if (self = [super init]) { | |
data = 0; | |
prev = NULL; | |
next = NULL; | |
} | |
return(self); | |
} | |
-(void) setData: (int) d { | |
data = d; | |
} | |
-(int) getData { | |
return data; | |
} | |
-(void) setNext: (dllist *) n { | |
next = n; | |
} | |
-(dllist *) getNext { | |
return next; | |
} | |
-(void) setPrev: (dllist *) p { | |
prev = p; | |
} | |
-(dllist *) getPrev { | |
return prev; | |
} | |
-(void) description { | |
NSLog(@"%d", data); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment