0001 #include "Entry/Entry.h" 0002 #define QlistNodePosi(T) QuadlistNode<T>* //跳转表节点位置 0003 0004 template <typename T> struct QuadlistNode { //QuadlistNode模板类 0005 T entry; //所存词条 0006 QlistNodePosi(T) pred; QlistNodePosi(T) succ; //前驱、后继 0007 QlistNodePosi(T) above; QlistNodePosi(T) below; //上邻、下邻 0008 QuadlistNode //构造器 0009 ( T e = T(), QlistNodePosi(T) p = NULL, QlistNodePosi(T) s = NULL, 0010 QlistNodePosi(T) a = NULL, QlistNodePosi(T) b = NULL ) 0011 : entry ( e ), pred ( p ), succ ( s ), above ( a ), below ( b ) {} 0012 QlistNodePosi(T) insertAsSuccAbove //插入新节点,以当前节点为前驱,以节点b为下邻 0013 ( T const& e, QlistNodePosi(T) b = NULL ); 0014 };