ScummVM API documentation
llist.h
1
2/* ScummVM - Graphic Adventure Engine
3 *
4 * ScummVM is the legal property of its developers, whose names
5 * are too numerous to list here. Please refer to the COPYRIGHT
6 * file distributed with this source distribution.
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef BAGEL_BOFLIB_LLIST_H
24#define BAGEL_BOFLIB_LLIST_H
25
26namespace Bagel {
27
31class CLList {
32protected:
33 CLList *_pPrev; // Pointer to next link in chain
34 CLList *_pNext; // Pointer to previous link in chain
35 void *_pData; // Pointer to owning CData
36
37public:
42
46 CLList(void *pObj);
47
51 virtual ~CLList();
52
58 void Insert(CLList *pNewList);
59
63 void Delete();
64
71 void addToHead(CLList *pNewList);
72
79 void addToTail(CLList *pNewList);
80
84 void MoveToHead();
85
89 void MoveToTail();
90
94 void MoveLeft();
95
99 void MoveRight();
100
106
112 CLList *getPrev() const {
113 return _pPrev;
114 }
115
116 CLList *getNext() const {
117 return _pNext;
118 }
119
120 void *getData() const {
121 return _pData;
122 }
123
124 void PutData(void *pObj) {
125 _pData = pObj;
126 }
127
131 void FlushList();
132};
133
134} // namespace Bagel
135
136#endif
Definition: llist.h:31
CLList * getHead()
void Insert(CLList *pNewList)
void MoveToHead()
CLList * getTail()
void addToTail(CLList *pNewList)
void MoveToTail()
void addToHead(CLList *pNewList)
void FlushList()
void MoveRight()
virtual ~CLList()
CLList(void *pObj)