Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
53
dll/europa/cse476/list.h
Normal file
53
dll/europa/cse476/list.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#ifndef _LIST_H_
|
||||
#define _LIST_H_
|
||||
|
||||
#include "gnode.h"
|
||||
|
||||
struct listNode;
|
||||
typedef struct listNode {
|
||||
char *item;
|
||||
List *itemList;
|
||||
genericNode *itemNode;
|
||||
|
||||
listNode *nextPtr; // pointer to next option
|
||||
listNode *prevPtr;
|
||||
};
|
||||
|
||||
class List {
|
||||
public:
|
||||
List();
|
||||
~List();
|
||||
void InsertBefore(char *item);
|
||||
void InsertBefore(List *item);
|
||||
void InsertBefore(genericNode *item);
|
||||
void InsertAfter(char *item);
|
||||
void InsertAfter(List *item);
|
||||
void InsertAfter(genericNode *item);
|
||||
|
||||
// returns true if everything is good, false if operation failed
|
||||
bool GoTop(void); // GOOD
|
||||
bool GoNext(void); // GOOD
|
||||
bool GoPrev(void);
|
||||
bool GoItem(int n);
|
||||
bool empty(void); // GOOD
|
||||
int length(void); // GOOD
|
||||
|
||||
char *currItem(void);
|
||||
List *currItemList(void);
|
||||
genericNode *currItemNode(void);
|
||||
void Print(void);
|
||||
|
||||
friend List *MakeFeatList(char *text);
|
||||
|
||||
friend List *makeFeatureList(char *text); // GOOD
|
||||
friend ostream &operator<<(ostream &out_file, const List &l); // GOOD
|
||||
friend List *substitute(List *old, List *assign);
|
||||
|
||||
private:
|
||||
listNode *rootPtr;
|
||||
listNode *currPtr;
|
||||
};
|
||||
|
||||
List *MakeList(char *text);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user