open-source-search-engine/LinkedList.h

26 lines
532 B
C
Raw Normal View History

2013-08-03 00:12:24 +04:00
// Copyright Matt Wells Nov 2002
// manages a link list of fixed-size links
class LinkedList {
public:
// . returns false and set g_errno on error
// . comparison key is first 16 bytes of link data
bool init ( long linkSize , long maxNumLinks );
// . TRY to add a slot
// . returns false if not added, true if added
// . may kick out other links to make room
bool addLink ( char *link );
// get head link
char *getHeadLink ( );
// . get next link
// . returns NULL if empty
char *getNextLink ( char *link );
};