home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_08_03
/
8n03114a
< prev
next >
Wrap
Text File
|
1990-03-20
|
937b
|
36 lines
*****Listing 4*****
// LIST.HPP - linked list interface
#ifndef _LIST_HPP
#define _LIST_HPP
class LIST
{
struct listelem
{
struct listelem *prev, *next;
void *data;
unsigned int size;
};
struct listelem *head, *curr, *tail;
public:
LIST();
~LIST();
void *get_head(unsigned int &sz);
void *get_curr(unsigned int &sz);
void *get_tail(unsigned int &sz);
void *get_prev(unsigned int &sz);
void *get_next(unsigned int &sz);
void add_before(void *vptr, unsigned int sz);
void add_after(void *vptr, unsigned int sz);
void add_head(void *vptr, unsigned int sz);
void add_tail(void *vptr, unsigned int sz);
void delete_curr(void);
virtual void delete_data(struct listelem *lptr);
virtual void create_data(struct listelem *lptr);
virtual void copy_data(struct listelem *lptr, void *from);
};
#endif // ifndef _LIST_HPP