Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/sound/src/ceguilua/ceguilua-0.5.0/package/Iterators.pkg @ 2896

Last change on this file since 2896 was 2710, checked in by rgrieder, 16 years ago

Merged buildsystem3 containing buildsystem2 containing Adi's buildsystem branch back to the trunk.
Please update the media directory if you were not using buildsystem3 before.

  • Property svn:eol-style set to native
File size: 6.5 KB
Line 
1/************************************************************************
2    Lua iterator implementation
3*************************************************************************/
4$[
5
6function CEGUI.iterator_impl_next(p)
7    if p:isAtEnd() then
8        return nil;
9    end
10    local k,v = p:key(), p:value();
11    p:next();
12    return k,v;
13end
14
15function CEGUI.iterator_impl(self)
16   return CEGUI.iterator_impl_next, self;
17end
18
19$]
20
21
22
23/************************************************************************
24    PropertyIterator
25*************************************************************************/
26class Property
27{
28    string getHelp() const;
29    string getName() const;
30};
31
32class PropertyIterator
33{
34    string getCurrentKey @ key() const;
35    Property* getCurrentValue @ value() const;
36
37    bool isAtEnd() const;
38    bool isAtStart() const;
39
40    PropertyIterator& __operator_increment @ next();
41    PropertyIterator& __operator_decrement @ previous();
42    bool operator== (const PropertyIterator& rhs) const;
43
44    void toStart();
45    void toEnd();
46
47    PropertyIterator(const PropertyIterator& org);
48};
49
50// lua iterator
51$[
52
53CEGUI.PropertyIterator.iterator = CEGUI.iterator_impl;
54
55$]
56
57
58
59/************************************************************************
60    EventIterator
61*************************************************************************/
62class EventIterator
63{
64    string getCurrentKey @ key() const;
65    Event* getCurrentValue @ value() const;
66
67    bool isAtEnd() const;
68    bool isAtStart() const;
69
70    EventIterator& __operator_increment @ next();
71    EventIterator& __operator_decrement @ previous();
72    bool operator== (const EventIterator& rhs) const;
73
74    void toStart();
75    void toEnd();
76
77    EventIterator(const EventIterator& org);
78};
79
80// lua iterator
81$[
82
83CEGUI.EventIterator.iterator = CEGUI.iterator_impl;
84
85$]
86
87
88
89/************************************************************************
90    WindowIterator
91*************************************************************************/
92class WindowIterator
93{
94    string getCurrentKey @ key() const;
95    Window* getCurrentValue @ value() const;
96
97    bool isAtEnd() const;
98    bool isAtStart() const;
99
100    WindowIterator& __operator_increment @ next();
101    WindowIterator& __operator_decrement @ previous();
102    bool operator== (const WindowIterator& rhs) const;
103
104    void toStart();
105    void toEnd();
106
107    WindowIterator(const WindowIterator& org);
108};
109
110// lua iterator
111$[
112
113CEGUI.WindowIterator.iterator = CEGUI.iterator_impl;
114
115$]
116
117
118
119/************************************************************************
120    WindowFactoryIterator
121*************************************************************************/
122class WindowFactoryIterator
123{
124    string getCurrentKey @ key() const;
125    WindowFactory* getCurrentValue @ value() const;
126
127    bool isAtEnd() const;
128    bool isAtStart() const;
129
130    WindowFactoryIterator& __operator_increment @ next();
131    WindowFactoryIterator& __operator_decrement @ previous();
132    bool operator== (const WindowFactoryIterator& rhs) const;
133
134    void toStart();
135    void toEnd();
136
137    WindowFactoryIterator(const WindowFactoryIterator& org);
138};
139
140// lua iterator
141$[
142
143CEGUI.WindowFactoryIterator.iterator = CEGUI.iterator_impl;
144
145$]
146
147
148
149/************************************************************************
150    FalagardMappingIterator
151*************************************************************************/
152class FalagardMappingIterator
153{
154    string getCurrentKey @ key() const;
155    FalagardWindowMapping getCurrentValue @ value() const;
156
157    bool isAtEnd() const;
158    bool isAtStart() const;
159
160    FalagardMappingIterator& __operator_increment @ next();
161    FalagardMappingIterator& __operator_decrement @ previous();
162    bool operator== (const FalagardMappingIterator& rhs) const;
163
164    void toStart();
165    void toEnd();
166
167    FalagardMappingIterator(const FalagardMappingIterator& org);
168};
169
170// lua iterator
171$[
172
173CEGUI.FalagardMappingIterator.iterator = CEGUI.iterator_impl;
174
175$]
176
177
178
179/************************************************************************
180    ImagesetIterator
181*************************************************************************/
182class ImagesetIterator
183{
184    string getCurrentKey @ key() const;
185    Imageset* getCurrentValue @ value() const;
186
187    bool isAtEnd() const;
188    bool isAtStart() const;
189
190    ImagesetIterator& __operator_increment @ next();
191    ImagesetIterator& __operator_decrement @ previous();
192    bool operator== (const ImagesetIterator& rhs) const;
193
194    void toStart();
195    void toEnd();
196
197    ImagesetIterator(const ImagesetIterator& org);
198};
199
200// lua iterator
201$[
202
203CEGUI.ImagesetIterator.iterator = CEGUI.iterator_impl;
204
205$]
206
207
208
209/************************************************************************
210    ImageIterator
211*************************************************************************/
212class ImageIterator
213{
214    string getCurrentKey @ key() const;
215    Image getCurrentValue @ value() const;
216
217    bool isAtEnd() const;
218    bool isAtStart() const;
219
220    ImageIterator& __operator_increment @ next();
221    ImageIterator& __operator_decrement @ previous();
222    bool operator== (const ImageIterator& rhs) const;
223
224    void toStart();
225    void toEnd();
226
227    ImageIterator(const ImageIterator& org);
228};
229
230// lua iterator
231$[
232
233CEGUI.ImageIterator.iterator = CEGUI.iterator_impl;
234
235$]
236
237
238
239/************************************************************************
240    SchemeIterator
241*************************************************************************/
242class SchemeIterator
243{
244    string getCurrentKey @ key() const;
245    Scheme* getCurrentValue @ value() const;
246
247    bool isAtEnd() const;
248    bool isAtStart() const;
249
250    SchemeIterator& __operator_increment @ next();
251    SchemeIterator& __operator_decrement @ previous();
252    bool operator== (const SchemeIterator& rhs) const;
253
254    void toStart();
255    void toEnd();
256
257    SchemeIterator(const SchemeIterator& org);
258};
259
260// lua iterator
261$[
262
263CEGUI.SchemeIterator.iterator = CEGUI.iterator_impl;
264
265$]
266
267
268
269/************************************************************************
270    FontIterator
271*************************************************************************/
272class FontIterator
273{
274    string getCurrentKey @ key() const;
275    Font* getCurrentValue @ value() const;
276
277    bool isAtEnd() const;
278    bool isAtStart() const;
279
280    FontIterator& __operator_increment @ next();
281    FontIterator& __operator_decrement @ previous();
282    bool operator== (const FontIterator& rhs) const;
283
284    void toStart();
285    void toEnd();
286
287    FontIterator(const FontIterator& org);
288};
289
290// lua iterator
291$[
292
293CEGUI.FontIterator.iterator = CEGUI.iterator_impl;
294
295$]
Note: See TracBrowser for help on using the repository browser.