Fork of Sam Grove's Linked list library OS6 compliant.

Dependents:   DS1820

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LinkedList2.h Source File

LinkedList2.h

00001 
00002 #ifndef LINKEDLIST_H_
00003 #define LINKEDLIST_H_
00004 
00005 #include <stdint.h>
00006 #include "mbed.h"
00007 
00008 struct node
00009 {
00010     void *data;
00011     struct node *next;
00012 };
00013 
00014 template<class retT>
00015 class LinkedList2
00016 {
00017 protected:
00018     retT *_head;
00019 public:    
00020     LinkedList2();    
00021     ~LinkedList2();
00022     retT *push(void *data);
00023     retT *append(void *data);
00024     retT *remove(uint32_t loc);
00025     retT *pop(uint32_t loc);
00026     uint32_t length(void);
00027 };
00028 
00029 #endif