25 #include <tulip/BmdLink.h> 28 template <
typename TYPE>
31 typedef tlp::BmdLink<TYPE> BMDTYPE;
37 TYPE entry(BMDTYPE *it);
39 BMDTYPE *nextItem(BMDTYPE *p, BMDTYPE *predP);
40 BMDTYPE *predItem(BMDTYPE *p, BMDTYPE *succP);
41 BMDTYPE *cyclicPred(BMDTYPE *it, BMDTYPE *succIt);
42 BMDTYPE *cyclicSucc(BMDTYPE *it, BMDTYPE *predIt);
43 BMDTYPE *push(
const TYPE &a);
44 BMDTYPE *append(
const TYPE &a);
45 TYPE delItem(BMDTYPE *it);
49 void conc(BmdList<TYPE> &l);
51 void swap(BmdList<TYPE> &l);
58 #include <tulip/cxx/BmdList.cxx> 61 template<
typename TYPE>
62 struct BmdListIt :
public Iterator<TYPE> {
64 BmdListIt(BmdList<TYPE> &bmdList):bmdList(bmdList) {
65 pos = bmdList.firstItem();
72 TYPE val = pos->getData();
73 tlp::BmdLink< TYPE > *tmp = pos;
74 pos = bmdList.nextItem(pos, pred);
79 tlp::BmdLink< TYPE > *pos;
80 tlp::BmdLink< TYPE > *pred;
81 BmdList<TYPE> &bmdList;
84 template<
typename TYPE>
85 struct BmdListRevIt :
public Iterator<TYPE> {
86 BmdListRevIt(BmdList<TYPE> &bmdList):bmdList(bmdList) {
87 pos = bmdList.lastItem();
94 TYPE val = pos->getData();
95 tlp::BmdLink< TYPE > *tmp = pos;
96 pos = bmdList.predItem(pos, suc);
101 tlp::BmdLink< TYPE > *pos;
102 tlp::BmdLink< TYPE > *suc;
103 BmdList<TYPE> &bmdList;
Interface for Tulip iterators. Allows basic iteration operations only.