Skip to content

Instantly share code, notes, and snippets.

@abutcher
Created July 2, 2010 22:08
Show Gist options
  • Save abutcher/461971 to your computer and use it in GitHub Desktop.
Save abutcher/461971 to your computer and use it in GitHub Desktop.
//
// 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