?? list.h
字號(hào):
//
// Micro Windows Implementation
// list.h: abstract data type, an dobule-linked list.
//
// 雙向連結(jié)串列 (double linked-list) 是一種常用的 ADT. 如果不
// 靠 C++ 提供的 class 和封裝功能, 用 C 來寫可累人的.
//
// $Revision: 1.1 $
// $Source: P:/MWINDOWS/INCLUDE/rcs/list.h $
// $Date: 1993/10/03 03:44:53 $
//
#ifndef __list_h
#define __list_h
#ifndef __collect_h
# include "collect.h"
#endif
class ListNode : public Object
{
public:
ListNode (Object *pobj=NULL, ListNode *pprev=NULL, ListNode *pnext=NULL)
{
obj = pobj;
next = pnext;
prev = pprev;
}
Object *obj;
ListNode *next, *prev;
};
class List : public IndexedCollection
{
public:
List ();
~List();
BOOL put (Object *obj);
BOOL hasElement (Object *obj);
Object *get () { return (here()); }
void purge ();
BOOL isEmpty ();
Object *first ();
Object *next ();
Object *last ();
Object *previous ();
Object *here () { return (current->obj); }
BOOL remove ();
protected:
ListNode *head, *tail, *current;
};
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -