0001 #include "Entry/Entry.h" 0002 template <typename T> struct QuadlistNode; 0003 template <typename T> using QListNodePosi = QuadlistNode<T>*; //跳转表节点位置 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 };